On 6/2/2017 2:45 PM, Florian Grammel wrote:
I have a long text with section headers partly in italics and/or
emphasis. I'd like to setup the formatting in a way that overrules these.
\setuphead[section][style=\tfb\up]
In LaTeX there would be \upshape/\textup -- is there an equivalent in
ConTeXt?
Did you try \tf ?
yes I did, unfortunately it doesn't work
Otherwise \emph{italics \emph{upright} italics} should work (didn’t try).
Nested emph to invert works. But my text has both italicised and regular
headers -- both should be printed upright with the modified style.
Even though I can modify them manually in this present case, something
like \upshape would be good to have.
I uploaded a beta with a new option (in addition to an old one). I need
to discuss with Wolfgang etc what default makes sense (topic for
upcoming context meeting).
\usemodule[art-01]
\starttext
\startbuffer
\startbuffer[demo]
\start
\getbuffer[setup]
\subject{[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted
slanted} ] [ $x=1$ ]}
[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ]
[ $x=1$ ]
\typebuffer[setup]
\blackrule[width=\textwidth,height=1pt,depth=0pt]
\stop
\stopbuffer
\startbuffer[setup]
\setuphead[subject][style=\tfb,before=,after=]
\definealternativestyle [myslanted] [\it] []
\stopbuffer
\getbuffer[demo]
\startbuffer[setup]
\setuphead[subject][style=\tfb,before=,after=]
\definealternativestyle [myslanted] [\it] [\bi]
\stopbuffer
\getbuffer[demo]
\startbuffer[setup]
\setuphead[subject][style=\tfb,before=,after=]
\definealternativestyle [myslanted] [\it] [\tf]
\stopbuffer
\getbuffer[demo]
\startbuffer[setup]
\definealternativestyle [myslanted] [\normalitalicface]
\setuphead[subject][style=bold,before=,after=]
\stopbuffer
\getbuffer[demo]
\startbuffer[setup]
\definealternativestyle [myslanted] [\normalitalicface]
\setuphead[subject][style=\bfd,before=,after=]
\stopbuffer
\getbuffer[demo]
\startbuffer[setup]
\definealternativestyle [myslanted] [\slantedface]
\setuphead[subject][style=boldface,before=,after=]
\stopbuffer
\getbuffer[demo]
\stopbuffer
\unprotect
\setupalternativestyles[method=normal] \getbuffer \page
\setupalternativestyles[method=auto] \getbuffer \page
\starttyping
\emphasistypeface
\emphasisboldface
\normaltypeface == \typeface
\normalboldface == \boldface
\normalslantedface == \slantedface
\normalitalicface == \italicface
\swaptypeface == \swapface
\stoptyping
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________