Changes

Jump to navigation Jump to search
initial page
{{Reference
|name=definehighlight
|attributes=
}}

== [[Help:Reference|Syntax]] ==

<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\definehighlight<span class="first" >[...]</span><span class="second" >[...,...=...,...]</span></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[...]</td>
<td>name </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[...,...=...,...]</td>
<td>see [[Command/setuphighlight|\setuphighlight]] </td>
</tr>
</table>


== Description ==

''Highlights'' are a generic facility for defining and maintaining
different emphases.
<texcode>
\definehighlight [important] [style=bold] %% define a highlight
\definehighlight [reallyimportant] [important] %% inherit setups
\setuphighlight [reallyimportant] [color=red] %% modify the copy
\starttext
This \important{you} need to know.\par
This, however, \reallyimportant{everybody} needs to know!
\stoptext
</texcode>
Highlights are respected by the
[[Command/setupbackend|XML export]],
resulting in a tag <code>highlight</code>, with the respective names as
Argument to the attribute ''detail''.
<xmlcode>
<document language="en" file="example-highlight" date="Sat Jun 16 12:20:48 2012" context="2012.06.13 23:46" version="0.30" xmlns:m="http://www.w3.org/1998/Math/MathML">
This <highlight detail="important">you</highlight> need to know.
<break/>
This, however, <highlight detail="reallyimportant">everybody</highlight> needs to know!
</document>
</xmlcode>
The functionality is implemented in
[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/core-sys.mkiv#l197 core-sys.mkiv].


== Help from ConTeXt-Mailinglist/Forum ==

All issues with:

{{Forum|{{SUBPAGENAME}}}}

[[Category:Commands|definehighlight]]
188

edits

Navigation menu