ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Combining styles (especially bold and italic)
@ 2024-09-03 16:28 Gerion Entrup
  2024-09-03 18:31 ` [NTG-context] " Pablo Rodriguez via ntg-context
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Gerion Entrup @ 2024-09-03 16:28 UTC (permalink / raw)
  To: ntg-context mailing list


[-- Attachment #1.1: Type: text/plain, Size: 659 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 16:28 [NTG-context] Combining styles (especially bold and italic) Gerion Entrup
@ 2024-09-03 18:31 ` Pablo Rodriguez via ntg-context
  2024-09-04 10:20   ` Gerion Entrup
  2024-09-03 18:34 ` Henning Hraban Ramm
  2024-09-03 18:51 ` Wolfgang Schuster
  2 siblings, 1 reply; 7+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-09-03 18:31 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 16:28 [NTG-context] Combining styles (especially bold and italic) Gerion Entrup
  2024-09-03 18:31 ` [NTG-context] " Pablo Rodriguez via ntg-context
@ 2024-09-03 18:34 ` Henning Hraban Ramm
  2024-09-04 10:20   ` Gerion Entrup
  2024-09-03 18:51 ` Wolfgang Schuster
  2 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2024-09-03 18:34 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 16:28 [NTG-context] Combining styles (especially bold and italic) Gerion Entrup
  2024-09-03 18:31 ` [NTG-context] " Pablo Rodriguez via ntg-context
  2024-09-03 18:34 ` Henning Hraban Ramm
@ 2024-09-03 18:51 ` Wolfgang Schuster
  2024-09-04 10:27   ` Gerion Entrup
  2 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2024-09-03 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Gerion Entrup

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 18:34 ` Henning Hraban Ramm
@ 2024-09-04 10:20   ` Gerion Entrup
  0 siblings, 0 replies; 7+ messages in thread
From: Gerion Entrup @ 2024-09-04 10:20 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 626 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 18:31 ` [NTG-context] " Pablo Rodriguez via ntg-context
@ 2024-09-04 10:20   ` Gerion Entrup
  0 siblings, 0 replies; 7+ messages in thread
From: Gerion Entrup @ 2024-09-04 10:20 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 882 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [NTG-context] Re: Combining styles (especially bold and italic)
  2024-09-03 18:51 ` Wolfgang Schuster
@ 2024-09-04 10:27   ` Gerion Entrup
  0 siblings, 0 replies; 7+ messages in thread
From: Gerion Entrup @ 2024-09-04 10:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 829 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-04 10:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-03 16:28 [NTG-context] Combining styles (especially bold and italic) Gerion Entrup
2024-09-03 18:31 ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-09-04 10:20   ` Gerion Entrup
2024-09-03 18:34 ` Henning Hraban Ramm
2024-09-04 10:20   ` Gerion Entrup
2024-09-03 18:51 ` Wolfgang Schuster
2024-09-04 10:27   ` Gerion Entrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).