# [NTG-context] Changing font for math function

Sat May 16 02:24:13 CEST 2015

On Sat, 16 May 2015, Maggyero wrote:

>> The default should be \mathupright (as is the case in amstex
> and latex, and probably also plaintex).
>
>> Hans Hagen:
>> next beta: when one of the stylealternatives text mode else mathmode
>> (default nothing == math upright)
>
>> Hans Hagen:
>>> Because like in \mtext, the \text command is ESSENTIAL (for the function
> names to have the mathcodes, kerning and ligatures of the text mode instead
> of the ones of the math mode).
>> that is not needed because if you use a style known as text style a text
> font is used
>
> Alright, but why not ALWAYS use your text style (or my \text), why talking
> about \mathupright then? \mathupright should never be used to display a
> name in text style in my opinion. I don't get it, is there something that I
> missed with that \mathupright? (And I'm not managing to download the new
> beta of yesterday so I don't have access to the new code yet).

Plaintex, amstex, and latex, all default to using \mathupright (or
equivalent).

Compare the output of the following:

1. Plain tex:
\font\tenrm=ptmr7t at 10pt
\tenrm
log $\log$ log
\bye

2. Latex:
\documentclass{article}
\usepackage{times} % Only changes the text font
\begin{document}
log $\log$ log
\end{document}

3. Context:
\definetypeface[mainfont][rm][serif][times][default]
\definetypeface[mainfont][mm][math] [modern][default]
\setupbodyfont[mainfont]
\starttext
log $\log$ log
\stoptext

By default, in all three formats the font for \log is mathupright rather
than textrm. There needs to be a rationale for ConTeXt default to be
different from other formats. Do you have any reference to a math book or
journal that uses text fonts for \log-like operators?

If you want you can set \setupmathematics[functionstyle=normal] and
achieve the behaviour that you want.