21
$\begingroup$

One thing newcomers to TeX or MathJax often get wrong is that they write something like $sin(x)$ instead of $\sin(x)$ - the point being that common mathematical functions with names consisting of several letters are usually typeset in non-italic letters as opposed to the names of variables. So, if you write sin you'll get $sin$ typeset as if you meant to multiply the variables $s$, $i$, and $n$ while with \sin it looks much better.

[In case this is new to you: Should you need something like $\operatorname{diag}$ where \diag is not defined, you can for example use \operatorname{diag}.]

This is for example explained in Knuth's TeX book in the chapter about the "fine points of mathematics typing". However, there are at least two other situations where I think non-italics are also to be used:

  • The Leibniz notation should not be used like this: $\frac{{\color{red}d}^2y}{{\color{red}d}x^2}$, but rather like so: $\frac{\mathrm{{\color{red}d}}^2y}{\mathrm{{\color{red}d}}x^2}$, because we're not talking about a variable $d$ but an operator $\mathrm d$.

  • Well-known constants should not be typeset in italics because, well, they're not variables. So, Euler's identity is not ${\color{red}e}^{{\color{red}i}\pi}-1=0$ but $\mathrm{\color{red}e}^{\mathrm{\color{red}i}\pi}-1=0$.

[For the record, Knuth's TeX book doesn't agree with this.]

I've already learned from this question that in case of the Leibniz notation there's actually an international standard saying it should be done like this, but that still leaves a couple of questions open for me:

  • What is the history of these typographical conventions? (Or maybe one should better ask when and why typesetters started to use italics for variables.)

  • Does the ISO-80000-2:2009 standard (which sadly is not accessible to mere mortals) say something about $\mathrm e$ vs. $e$ and $\mathrm i$ vs. $i$?

  • How do publishers of mathematical books or papers deal with this? Have you ever encountered one who insisted on getting things like the above "right" one way or the other?

[My apologies for cramming several questions into one, but I think they are all intimately related.]

$\endgroup$
  • 7
    $\begingroup$ I've always found bizarre the imposition that mathematical constants should be upright and physical constants italics. Very few pure mathematicians use upright “e” and “i”, as far as I know. Some publishers insist that “d” for the differential is upright. Whether “d” is an operator is debatable. $\endgroup$ – egreg Sep 17 '14 at 9:49
  • 2
    $\begingroup$ Regarding $sin$, note that also the spacing is different fro sin, to mimic the product of three separate variables $s\cdot i \cdot n$. $\endgroup$ – Hagen von Eitzen Sep 17 '14 at 9:59
  • 1
    $\begingroup$ @Frunobulax As far as I know, the speed of light is $c$ (italic). The rationale for this was that physical constants can change their value when more precise measurements are available. So I was told: being a mere mortal, I can't access the ISO secret books without paying a huge amount of money, so I can only speak “second hand”. If the real rationale is that, I'm happy not to follow that convention. $\endgroup$ – egreg Sep 17 '14 at 10:11
  • 2
    $\begingroup$ Yeah, what's the point of a standard when you don't have access to it? $\endgroup$ – Frunobulax Sep 17 '14 at 10:15
  • 1
    $\begingroup$ Perhaps ask in tex.stackexchange.com ? $\endgroup$ – lhf Sep 17 '14 at 13:05
2
$\begingroup$

$\LaTeX$ was set down while the conventions were different, and to preserve the older texts, the rules have not been changed. However, it could be possible for someone to write some .sty file that implements the sort of definitions at the particular date, eg math2000.sty or something, with \renewcommand{vec}[1]{\mathbf{#1}} and \newcommand{dif}[1]{\mathrm{d}#1} and \newcommand{ddif}[2]{\frac{\mathrm{d}#1}{\mathrm{d}#2}.

Then you put something like ddif{q}{t} to get the desired result.

Because the thing has a date in it, and invoked by \usepackage{} then it is more robust to formatting changes &c.

But \operatorname{} is a bit long, and i reassign this to \fn{}, eg \fn{isi}(values).

$\endgroup$
  • $\begingroup$ I support this idea. I always start writing any paper with redefining these things. $\endgroup$ – sigvaldm Mar 13 at 10:25
0
$\begingroup$

I've just read an article which at least partly answers my questions: https://nickhigham.wordpress.com/2016/01/28/typesetting-mathematics-according-to-the-iso-standard/.

$\endgroup$
0
$\begingroup$

This not about $\TeX$. It is a typographical convention designed to aid in understanding. Remember books have been printed on paper centuries before the computer era.

In any mathematical expression or formula, we use the signs, $+, -, /$ denoting arithmetical operations. But for some reasons (economy?) the symbol for multiplication, $\times$, is omitted. So the high school formula is never written as $(a+b)^2 = a^2 + b^2 + 2\times a\times b$. So when we see $max$ in an expression typographers want to help the readers not to confuse with the product of $m$, $a$, and $x$.

For this purpose all variable names (usually single letters) are written in italics and word-abbreviations such as max, min, deg, tan, log, exp are written in upright fonts. (I am told physicists following Einstein summation convention have to be pre-empt such an assumption in rare situations where no summation is intended).

Now $\TeX$ is smart enough to know that between two variables if there is no arithmetical operator it should be multiplication: that is why when we type spaces between two variables inside dollars that space is ignored by the $\TeX$ engine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.