context sensitive highlight styles
In my current project, section titles are typeset in SansBold while the body text (and that of the ToC) is roman. How can I define \definehighlight[emph], so that I get SansBoldItalic in titles and SerifItalic in body text and ToC? (Body text is not a problem.) MNWE: \setuphead[chapter][page=yes,style={\ss\bfc}] \setuphead[section][page=no,style={\ss\bfa}] \definehighlight[emph][style=\it] \starttext \completecontent \startchapter[title={My book \emph{\ConTeXt\ for Runaways}}] \startsection[title={Knuth, \emph{the professor}}] \input knuth \stopsection \stopchapter \stoptext Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
On 08/16/2017 05:47 PM, Henning Hraban Ramm wrote:
In my current project, section titles are typeset in SansBold while the body text (and that of the ToC) is roman.
How can I define \definehighlight[emph], so that I get SansBoldItalic in titles and SerifItalic in body text and ToC? (Body text is not a problem.)
Hi Hraban, if I get your question, the reply would be: \definehighlight[emph][style=\em] \setupbodyfontenvironment[default][em=italic] Was this what you needed? Pablo -- http://www.ousia.tk
Am 2017-08-16 um 18:09 schrieb Pablo Rodriguez
On 08/16/2017 05:47 PM, Henning Hraban Ramm wrote:
In my current project, section titles are typeset in SansBold while the body text (and that of the ToC) is roman.
How can I define \definehighlight[emph], so that I get SansBoldItalic in titles and SerifItalic in body text and ToC? (Body text is not a problem.)
Hi Hraban,
if I get your question, the reply would be:
\definehighlight[emph][style=\em] \setupbodyfontenvironment[default][em=italic]
Was this what you needed?
Great, thank you! I should have tried \em myself... I don’t even need \setupbodyfontenvironment, because I defined slanted as italics in my typescript. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
Henning Hraban Ramm mailto:texml@fiee.net 16. August 2017 um 17:47 In my current project, section titles are typeset in SansBold while the body text (and that of the ToC) is roman.
How can I define \definehighlight[emph], so that I get SansBoldItalic in titles and SerifItalic in body text and ToC? (Body text is not a problem.)
MNWE:
\setuphead[chapter][page=yes,style={\ss\bfc}] \setuphead[section][page=no,style={\ss\bfa}] \definehighlight[emph][style=\it] \definestyle[emph][style=\italicface]
Wolfgang
participants (3)
-
Henning Hraban Ramm
-
Pablo Rodriguez
-
Wolfgang Schuster