Difference between revisions of "Command/definehighlight"

From Wiki
Jump to navigation Jump to search
(Added admonition on command syntax when converting from font switches)
m (→‎See Also: link to src:search instead of line number)
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
== [[Help:Reference|Syntax]] ==
== [[Help:Reference|Syntax]] (autogenerated) ==
<table cellspacing="4" cellpadding="2" class="cmd">
    <td colspan="2" class="cmd">\definehighlight<span class="first" >[...]</span><span class="second" >[...,...=...,...]</span></td>
  <tr valign="top" class="first">
    <td class="cmd">[...]</td>
    <td>name </td>
  <tr valign="top" class="second">
    <td class="cmd">[...,...=...,...]</td>
    <td>see [[Command/setuphighlight|\setuphighlight]] </td>
== Description ==  
== Description ==  
(MkIV only)
''Highlights'' are a generic facility for defining and maintaining
''Highlights'' are a generic facility for defining and maintaining
different emphases.
different emphases.
Line 57: Line 43:
* {{cmd|setuphighlight}}
* {{cmd|setuphighlight}}
* {{src|core-sys.mkiv#l197|core-sys.mkiv}}
* {{src|core-sys.mkiv?search{{=}}highlight|core-sys.mkiv}}
== Help from ConTeXt-Mailinglist/Forum ==
== Help from ConTeXt-Mailinglist/Forum ==

Latest revision as of 10:41, 19 June 2020


Syntax (autogenerated)

...=...,...inherits from \setuphighlight


Highlights are a generic facility for defining and maintaining different emphases.

Highlights are respected by the XML export (see \setupbackend), resulting in a tag highlight, with the respective names as argument to the attribute detail.

When converting from font switches (as {\bf text} to defined highlights, be sure to convert the syntax to command syntax ( \important{text} ).


\definehighlight [important]       [style=bold] %% define a highlight
\definehighlight [reallyimportant] [important]  %% inherit setups
\setuphighlight  [reallyimportant] [color=red]  %% modify the copy
This \important{you} need to know.\par
This, however, \reallyimportant{everybody} needs to know!

<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.
This, however, <highlight detail="reallyimportant">everybody</highlight> needs to know!

See Also

Help from ConTeXt-Mailinglist/Forum

All issues with: