Euler Math
Hermann Zapf’s Euler for the formulas, ET Book for the text
Hermann Zapf drew Euler for the American Mathematical Society in the early 1980s, with Donald Knuth and his students at Stanford: an upright alphabet with the look of a mathematician’s handwriting, which avoids the slant of the usual math italic.Knuth set Concrete Mathematics (with Graham and Patashnik, 1989) in Euler for the formulas and Concrete Roman for the text, a typeface he made for it from Computer Modern. In LaTeX the euler and eulervm packages do the same with any text font. This page sets its formulas in Euler and its text in ET Book, as \usepackage{eulervm} would.
Turning it on#
One page sets mathFont: euler in its front matter, as this one does; a whole site sets
[params.math]
font = "euler"KaTeX then writes MathML only, which the browser typesets with Euler Math, the OpenType version of Euler by Khaled Hosny and Daniel Flipo, bundled with the theme.An OpenType math font carries its own layout rules: the size of superscripts, the gap above a fraction bar, how far a radical or a brace stretches. MathML hands them to the browser, while KaTeX’s own output is drawn for its own fonts and would place another font’s letters with the wrong measurements. Text inside a formula, written with \text{…}, stays in the text font, ET Book.
Inline and display#
In the running text: Euler’s identity , a sum , the letters upright, as Zapf drew them, and the other alphabets: , a -algebra , a Lie algebra , a vector . A display stands on its own lines:
Multi-line derivations keep their alignment,
and matrices and cases work as well:
Numbers and references#
A \label numbers a display, as everywhere else in the theme:
and (1) refers to it. A \tag gives a display a name of its own, here the one Concrete Mathematics uses for the sum of a geometric progression:
A sidenote holds math in Euler too.For every , .
A proof#
Theorem (Gauss). For every integer , .
Proof. Write the sum twice, once forwards and once backwards, and add the two term by term:
■Browsers#
Chrome and Edge (109 and later), Firefox and Safari (16.4 and later) lay out MathML. The theme adds what KaTeX’s MathML leaves to the browser and Chromium does not do: the alignment and spacing of the columns of aligned, matrices and cases, the other alphabets, unary signs (), the thin space around an operator name (, ), boxes and strikes (, ) and wide accents (, ). A page that keeps the default, font = "katex", is set by KaTeX in its own fonts, as on the math and code page.