On 5/11/2015 6:16 PM, Aditya Mahajan wrote:
On Sun, 10 May 2015, Hans Hagen wrote:

next beta: when one of the stylealternatives text mode else mathmode
(default nothing == mathupright)

\starttext

\setupmathematics[functionstyle=,functioncolor=darkred]

{\ss $\sin x$} {\bf $\sin x$}

\setupmathematics[functionstyle=sansbold,functioncolor=darkblue]

{\ss $\sin x$} {\bf $\sin x$}

\setupmathematics[functionstyle=roman,functioncolor=darkgreen]

{\ss $\sin x$} {\bf $\sin x$}

\stoptext

functionstyle=roman is affected by font switches \bf and \it. It should
not be affected.

\setupmathematics[functionstyle=roman]
{\it $\sin x$}

This is especially important because typically theorems, etc are typeset
in italic. It tried setting functionstyle=\normalrm but that turns
everything into italic.

Complete example:


\starttext
\setupmathematics[functionstyle=,functioncolor=darkred]

{\ss $\sin x$} {\bf $\sin x$} {\it $\sin x$}

\setupmathematics[functionstyle=sansbold,functioncolor=darkblue]

{\ss $\sin x$} {\bf $\sin x$} {\it $\sin x$}

\setupmathematics[functionstyle=serif,functioncolor=darkgreen]

{\ss $\sin x$} {\bf $\sin x$} {\it $\sin x$}

\stoptext

we can add

\unprotect

\def\v!sansnormal {sansnormal}
%def\v!sansbold   {sansbold}
\def\v!serifnormal{serifnormal}
\def\v!serifbold  {serifbold}

\definealternativestyle [\v!sansnormal]  [\ss\tf]
%definealternativestyle [\v!sansbold]    [\ss\bf]
\definealternativestyle [\v!serifnormal] [\rm\tf]
\definealternativestyle [\v!serifbold]   [\rm\bf]

\protect

\setupmathematics[functionstyle=sansbold,functioncolor=darkblue]


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to