On Mon, 11 May 2015, Hans Hagen wrote:
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
These appear to work. Note that sansbold is already defined font-pre.mkiv Aditya