Any way to forbid boldface for a section of text?
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
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
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
participants (3)
-
Denis Maier
-
Joel
-
Wolfgang Schuster