ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Any way to forbid boldface for a section of text?
       [not found] <72666261.6179731.1724461743139.ref@mail.yahoo.com>
@ 2024-08-24  1:09 ` Joel via ntg-context
  2024-08-24  6:25   ` [NTG-context] " Denis Maier via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Joel via ntg-context @ 2024-08-24  1:09 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


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

If there any way to forbid boldface text for a section, e.g.:
\starttext
\stopboldface\input file\startboldface

\stoptext
Assume file.tex includes some boldface commands there, how to tell it to just ignore them temporarily, then resume normal behavior latter?
--Joel

[-- Attachment #1.2: Type: text/html, Size: 979 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] 4+ messages in thread

* [NTG-context] Re: Any way to forbid boldface for a section of text?
  2024-08-24  1:09 ` [NTG-context] Any way to forbid boldface for a section of text? Joel via ntg-context
@ 2024-08-24  6:25   ` Denis Maier via ntg-context
  2024-08-24 15:49     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Maier via ntg-context @ 2024-08-24  6:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Denis Maier

[-- Attachment #1: Type: text/html, Size: 2141 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] 4+ messages in thread

* [NTG-context] Re: Any way to forbid boldface for a section of text?
  2024-08-24  6:25   ` [NTG-context] " Denis Maier via ntg-context
@ 2024-08-24 15:49     ` Wolfgang Schuster
  2024-08-25  9:35       ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2024-08-24 15:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Denis Maier via ntg-context

Denis Maier via ntg-context schrieb am 24.08.2024 um 08:25:
> You could define a specific typescript for that without a definition for 
> bold.

Below is an implementation of your suggestion which gets rid of all font 
styles for serif, sans serif and monospace fonts.

\starttypescript [serif,sans,mono] [uprightonly]
     \definefontsynonym [\typescriptprefix\typescriptone Italic] 
[\typescriptprefix\typescriptone]
     \definefontsynonym [\typescriptprefix\typescriptone Slanted] 
[\typescriptprefix\typescriptone]
     \definefontsynonym [\typescriptprefix\typescriptone Bold] 
[\typescriptprefix\typescriptone]
     \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] 
[\typescriptprefix\typescriptone]
     \definefontsynonym [\typescriptprefix\typescriptone BoldSlanted] 
[\typescriptprefix\typescriptone]
\stoptypescript

\starttypescript [uprightonly]
     \definetypeface [\typescriptone] [rm] [serif] [\typescriptone]
     \definetypeface [\typescriptone] [ss] [sans]  [\typescriptone]
     \definetypeface [\typescriptone] [tt] [mono]  [\typescriptone]
\stoptypescript

\setupbodyfont[pagella]

\starttext

xxx {\bf yyy} xxx {\it zzz} xxx

\start \switchtobodyfont[uprightonly]
xxx {\bf yyy} xxx {\it zzz} xxx
\stop

xxx {\bf yyy} xxx {\it zzz} xxx

\stoptext

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] 4+ messages in thread

* [NTG-context] Re: Any way to forbid boldface for a section of text?
  2024-08-24 15:49     ` Wolfgang Schuster
@ 2024-08-25  9:35       ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2024-08-25  9:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Denis Maier via ntg-context

Wolfgang Schuster schrieb am 24.08.2024 um 17:49:
> Denis Maier via ntg-context schrieb am 24.08.2024 um 08:25:
>> You could define a specific typescript for that without a definition 
>> for bold.
> 
> Below is an implementation of your suggestion which gets rid of all font 
> styles for serif, sans serif and monospace fonts.
> 
> \starttypescript [serif,sans,mono] [uprightonly]
>      \definefontsynonym [\typescriptprefix\typescriptone Italic] 
> [\typescriptprefix\typescriptone]
>      \definefontsynonym [\typescriptprefix\typescriptone Slanted] 
> [\typescriptprefix\typescriptone]
>      \definefontsynonym [\typescriptprefix\typescriptone Bold] 
> [\typescriptprefix\typescriptone]
>      \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] 
> [\typescriptprefix\typescriptone]
>      \definefontsynonym [\typescriptprefix\typescriptone BoldSlanted] 
> [\typescriptprefix\typescriptone]
> \stoptypescript
> 
> \starttypescript [uprightonly]
>      \definetypeface [\typescriptone] [rm] [serif] [\typescriptone]
>      \definetypeface [\typescriptone] [ss] [sans]  [\typescriptone]
>      \definetypeface [\typescriptone] [tt] [mono]  [\typescriptone]
> \stoptypescript
> 
> \setupbodyfont[pagella]
> 
> \starttext
> 
> xxx {\bf yyy} xxx {\it zzz} xxx
> 
> \start \switchtobodyfont[uprightonly]
> xxx {\bf yyy} xxx {\it zzz} xxx
> \stop
> 
> xxx {\bf yyy} xxx {\it zzz} xxx
> 
> \stoptext

In the next release you don't have to create the typescript anymore 
because Hans is including it with the other typescripts and in addition 
it will also support math input.

The new complete minimal example is now:

\usetypescriptfile[uprightonly]

\starttext

xxx {\bf yyy} xxx {\it zzz} xxx

\start \switchtobodyfont[uprightonly]
xxx {\bf yyy} xxx {\it zzz} xxx
\stop

xxx {\bf yyy} xxx {\it zzz} xxx

\stoptext

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] 4+ messages in thread

end of thread, other threads:[~2024-08-25  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <72666261.6179731.1724461743139.ref@mail.yahoo.com>
2024-08-24  1:09 ` [NTG-context] Any way to forbid boldface for a section of text? Joel via ntg-context
2024-08-24  6:25   ` [NTG-context] " Denis Maier via ntg-context
2024-08-24 15:49     ` Wolfgang Schuster
2024-08-25  9:35       ` Wolfgang Schuster

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).