Difference between revisions of "Command/definehighlight"
< Command
Jump to navigation
Jump to search
(5 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>definehighlight</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 29: | Line 32: | ||
resulting in a tag {{code|highlight}}, with the respective names as | resulting in a tag {{code|highlight}}, with the respective names as | ||
argument to the attribute ''detail''. | argument to the attribute ''detail''. | ||
+ | |||
+ | When converting from font switches (as {{code|{\bf text}}} to defined highlights, | ||
+ | be sure to convert the syntax to command syntax ( {{code|\important{text}}} ). | ||
== Example == | == Example == | ||
Line 53: | Line 59: | ||
== See Also == | == See Also == | ||
− | * {{cmd| | + | * {{cmd|setuphighlight}} |
* {{src|core-sys.mkiv#l197|core-sys.mkiv}} | * {{src|core-sys.mkiv#l197|core-sys.mkiv}} | ||
Line 62: | Line 68: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Fonts|definehighlight]] |
− | [[Category: | + | [[Category:Command/MkIV only|definehighlight]] |
Revision as of 14:41, 15 November 2019
\definehighlight
Syntax (autogenerated)
\definehighlight[...][...][...=...,...] | |
[...] | name |
[...] | name |
...=...,... | inherits from \setuphighlight |
Syntax
\definehighlight[...][...,...=...,...] | |
[...] | name |
[...,...=...,...] | see \setuphighlight |
Description
(MkIV only) 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
} ).
Example
\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
<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>
See Also
Help from ConTeXt-Mailinglist/Forum
All issues with: