
Hi, I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic? Here is a minimal example: ``` \define\somename{HX\style[italic]{print}\autoinsertnextspace} \setuphead[section, subject][style={\bfc}] \starttext \startsection[title=The \somename name] \somename is a strange written name. \stopsection \stoptext ``` In the normal text, HXprint is written correctly, in the section heading "print" is italic but not bold. Best Gerion

On 9/3/24 18:28, Gerion Entrup wrote:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic? Hi Gerion,
you may combine emphasis with bold and set emphasis to italic (default is slanted), such as in: \setupbodyfontenvironment [default] [em=italic] \define\somename{HX{\em print}\autoinsertnextspace} I hope it helps, Pablo

Am Dienstag, 3. September 2024, 20:31:31 MESZ schrieb Pablo Rodriguez via ntg-context:
On 9/3/24 18:28, Gerion Entrup wrote:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic? Hi Gerion,
you may combine emphasis with bold and set emphasis to italic (default is slanted), such as in:
\setupbodyfontenvironment [default] [em=italic]
\define\somename{HX{\em print}\autoinsertnextspace}
I hope it helps,
Pablo
Thank you, that works for the minimal example and in my case but has the side effect to modify emphasis. I wonder, if there is another solution without side effects. Gerion

Am 03.09.24 um 18:28 schrieb Gerion Entrup:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic?
try \bi Hraban

Am Dienstag, 3. September 2024, 20:34:28 MESZ schrieb Henning Hraban Ramm:
Am 03.09.24 um 18:28 schrieb Gerion Entrup:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic?
try \bi
Hraban
This does not really work in my case, since I have the italic style embedded in a command that I want to use in several contexts as sketched in the minimal example. Gerion

Gerion Entrup schrieb am 03.09.2024 um 18:28:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic?
Here is a minimal example: ``` \define\somename{HX\style[italic]{print}\autoinsertnextspace}
You want \italicface (or \style[italicface]) which selects either \it or \bi. \define\somename{HX{\italicface print}\autoinsertnextspace} or \define\somename{HX\style[italicface]{print}\autoinsertnextspace} Wolfgang

Am Dienstag, 3. September 2024, 20:51:39 MESZ schrieb Wolfgang Schuster:
Gerion Entrup schrieb am 03.09.2024 um 18:28:
Hi,
I have the situation that I want to typeset a special formatted name within a section heading. The name contains an italic part while the heading is bold, but both styles are defined at another place. Is there a way to tell ConTeXt to combine them, so that it is bold _and_ italic?
Here is a minimal example: ``` \define\somename{HX\style[italic]{print}\autoinsertnextspace}
You want \italicface (or \style[italicface]) which selects either \it or \bi.
\define\somename{HX{\italicface print}\autoinsertnextspace}
or
\define\somename{HX\style[italicface]{print}\autoinsertnextspace}
Wolfgang
Thanks, that answers my question! Gerion
participants (4)
-
Gerion Entrup
-
Henning Hraban Ramm
-
Pablo Rodriguez
-
Wolfgang Schuster