I am currently using Latin Modern Math fonts on LuaTeX to get a complete set of math fonts. In particular consideration is the ability to use bold greek \mathbfup{\lambda}
fonts and bold calligraphic fonts \mathbfcal{F}
. I was wondering if there is another fonts which supports all such symbols?
2 Answers
Here's an overview of how 11 different unicode math fonts display \mathcal{F}
, \symbfcal{F}
, \lambda
, and \symbfup{\lambda}
, plus XITS-Stylistic Set 1 and Asana Math Alternate. (The 11 math fonts were chosen primarily because they happen to be available on my system. Your system may have either more of fewer unicode math fonts.) Feel free to adjust the contents of the \blurb
macro to feature the symbols you're really interested in.
In the screenshot, you'll notice that Neo Euler
doesn't feature an upright-bold lambda symbol. This isn't really surprising, since the Euler math font is an upright (as opposed to "slanted" or "sloped") font anyway.
In addition to judging a math font by the completeness of its symbol set -- of course, no font's collection of symbols can ever be truly "complete" -- you should also think about whether the appearance, or look, of the symbols (including sum, product, and integral symbols) satisfies your typographic needs. E.g., if for some reason you are required to use a Times Roman text font, and if you are required to make the math font mesh reasonably well with the text font, visually speaking, you should probably restrict your search to Stix Math
, Stix Two Math
, XITS Math
, and Termes Math
, as those are the math fonts based on/derived from Times Roman.
% !TEX TS-program = lualatex
\documentclass{article}
\newcommand\blurb{%
$\mathcal{F}\symbfcal{F}\quad
\lambda \symbfup{\lambda}\quad
\sum\prod\int\quad
\displaystyle\sum\prod\int$}
\usepackage{unicode-math}
%% Load 10 math fonts, plus two alternate/stylistic set variants
\setmathfont{Latin Modern Math}[version=LM]
\setmathfont{Stix Math}[version=Stix]
\setmathfont{XITS Math}[version=XITS]
\setmathfont{XITS Math}[StylisticSet=1,version=XITS1]
\setmathfont{Stix Two Math}[version=Stix2] % see http://stixfonts.org/
\setmathfont{Cambria Math}[version=Cambria]
\setmathfont{Asana Math}[version=Asana]
\setmathfont{Asana Math}[Alternate,version=AsanaAlt]
\setmathfont{TeX Gyre Pagella Math}[version=Pagella]
\setmathfont{TeX Gyre Termes Math}[version=Termes]
\setmathfont{TeX Gyre DejaVu Math}[version=DejaVu]
\setmathfont{Neo Euler}[version=Euler]
\setmathfont{Libertinus Math}[version=Libertinus]
\begin{document}
\renewcommand\arraystretch{1.8}
\begin{tabular}{@{}ll@{}}
Latin Modern & \mathversion{LM} \blurb \\
Stix & \mathversion{Stix} \blurb \\
XITS & \mathversion{XITS} \blurb \\
XITS, StySet1& \mathversion{XITS1} \blurb \\
Stix Two & \mathversion{Stix2} \blurb \\
Cambria & \mathversion{Cambria} \blurb \\
Asana & \mathversion{Asana} \blurb \\
Asana Alt & \mathversion{AsanaAlt}\blurb \\
Pagella & \mathversion{Pagella} \blurb \\
Termes & \mathversion{Termes} \blurb \\
DejaVu & \mathversion{DejaVu} \blurb \\[0.5ex]
Neo Euler & \mathversion{Euler} \blurb \\[0.5ex]
Libertinus Math& \mathversion{Libertinus} \blurb
\end{tabular}
\end{document}
-
2
-
2Also, some of those fonts, especially XITS, have alternative styles as well. You can use commands such as
\setmathfont[range={\mathcal,\mathbfcal},Alternate]{Asana Math}
or\setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math}
to get them, or even to get separate\mathcal
and\mathscr
letters within the same document.– DavislorMar 3, 2018 at 14:23 -
2@Nasser You do need to install all the fonts that aren’t already part of your distro in order to display them. On Linux, if there’s no package for your distro, download the files (usually
.otf
, but sometimes.ttf
or.ttc
) to your~/.fonts
directory to make them available for you, or/usr/local/share/fonts
to make them available to everyone. If you have a choice, install the.otf
version. On Windows, download the files, double-click to open the font viewer, and hit the install button.– DavislorMar 4, 2018 at 0:28 -
2You can get Neo Euler from github.com/khaledhosny/euler-otf but Cambria Math is a proprietary font that comes with MS Windows or Office. (You could technically buy a workstation license from Monotype, if you’re crazy.) You can search your Windows partition for
cambria_01.ttf
on the same computer, but be aware that this file is copyrighted. You should have the others, but if not, they’re at stixfonts.org and gust.org.pl/projects/e-foundry/tg-math– DavislorMar 4, 2018 at 0:42 -
1
Since Mico graciously suggested I should expand my comments into an answer, I would like to add that there is another large class of math symbols available.
Many math fonts use the OpenType stylistic set or alternate font features to add variants. STIX Two is especially profligate with them: it comes with seventeen stylistic sets in addition to the default! These aren’t complete alternative fonts, but groupings of a few variants each.
I gave as one example in my comment, and Mico added to his answer, that you can use \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1,Scale=MatchUppercase]{XITS Math}
in unicode-math
to use the alternative script font from XITS Math for \mathcal
and \mathbfcal
. Some fonts use a different OpenType feature, shown by \setmathfont[range={\mathcal,\mathbfcal},Alternate,Scale=MatchUppercase]{Asana Math}
. (This leaves the defaults in place as \mathscr
and \mathbfscr
: Unicode maps both the calligraphic and script alphabets to the same code points, but unicode-math
can set them to different fonts should you wish to for some reason.) STIX Two Math has this and the other stylistic sets from XITS Math, but also quite a few others, including smaller variants for ∑ and ∏ in stylistic set 7, a more upright ∫ in stylistic set 8, and variant mathematical letters g, u, v, w and z in stylistic set 2.
You can set a stylistic set as the default, or set a range of characters to one as in the previous example, or replace individual code points. For example, I like to use Paul Halmos’ black “tombstone” for the Q.E.D. symbol, like DEK did (some of the time, including the 1997 edition of The Art of Computer Programming), and XITS Math has an attractive version of it at U+220E:
\renewcommand{\qedsymbol}{\ensuremath{\char"220E}}
\setmathfont[range="220E]{XITS Math}
You could similarly test the smaller ∑ and ∏ in STIX Two with \setmathfont[range={"2211,"220F},StylisticSet=7]{STIX Two Math}
.
There is also the option to remap a font to a particular math alphabet, such as Fraktur or blackboard bold.
The STIX Two stylistic sets are fully documented in a file called docs/STIX_2.0.0_stylistic_sets.pdf
in the STIX distribution. You can also open any math font in FontForge and check for stylistic and alternate sets: stylistic sets have names such as ss01
and alternates, such as the one for Asana Math, are salt
.
texdoc unimath-symbols
to view a 130-page document that lists all symbols supported by 8 different math fonts; all of them are usable under LuaLaTeX.Stix Math
andXITS Math
each feature about 2400 mathy symbols; Latin Modern has about 1600 symbols;Neo Euler
features "only" 576 symbols. However, don't let sheer numbers guide your decision about which math font to use. For all I know, the 576 symbols provided byNeo Euler
may satisfy all of your typesetting needs.texdoc comprehensive
at a command prompt, you'll get to view a (as of Jan. 2017) 338-page document that lists 14,283 math symbols, along with the packages that provide the symbols.