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?
- 161
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}
- 506,678
-
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\mathcaland\mathscrletters within the same document. – Davislor Mar 03 '18 at 14:23 -
@Davislor - Many thanks for this comment. I'll edit my answer to mention how to load XITS Math with Stylistic Set 1 and Asana Math with
Alternate(akaAlternate=1). – Mico Mar 03 '18 at 17:30 -
And I should probably mention that you can also see the stylistic or alternate sets of any font in FontForge, which is one way to check whether they exist. – Davislor Mar 03 '18 at 22:56
-
@Davislor - You should post these comments and observations as a separate, standalone answer. :-) – Mico Mar 03 '18 at 22:57
-
-
It will really help if Latex experts as you could show the command you used to compile the above file, and any pre-requists one needs to make it compile for the rest of us newbies. This might be obvious for the experts, but I can't get your file to compile. I use
lualatex foo.tex. I only used one font from your code. Error isThe font "NeoEuler" cannot be found.So I assume these fonts needs to be manually installed before? Here is MWE I used .... – Nasser Mar 03 '18 at 23:57 -
`% !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} \setmathfont{Neo Euler}[version=Euler]
\begin{document} Neo Euler \mathversion{Euler} \blurb \end{document}`
– Nasser Mar 03 '18 at 23:57 -
@Nasser - To compile the latex document shown above, it's necessary to use LuaLaTeX. How to run, or invoke, LuaLaTeX depends importantly on your front-end software. Which editor/front end do you employ? – Mico Mar 04 '18 at 00:16
-
I use texlive 2017 on Linux. Just typed from the command line
lualatex foo.texwherefoo.texis the code I pasted above. Small portion of your file. Did I do something wrong? Here is screen shot.
lualatex foo.tex This is LuaTeX, Version 1.0.4 (TeX Live 2017) restricted system commands enabled. (./foo.tex LaTeX2e <2017-04-15> ....– Nasser Mar 04 '18 at 00:21 -
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.ttfor.ttc) to your~/.fontsdirectory to make them available for you, or/usr/local/share/fontsto make them available to everyone. If you have a choice, install the.otfversion. On Windows, download the files, double-click to open the font viewer, and hit the install button. – Davislor Mar 04 '18 at 00:28 -
2You can get Neo Euler from https://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.ttfon the same computer, but be aware that this file is copyrighted. You should have the others, but if not, they’re at http://stixfonts.org/ and http://www.gust.org.pl/projects/e-foundry/tg-math – Davislor Mar 04 '18 at 00:42 -
If you don’t already own one of those products, I believe it is also possible to download the right version of the MS PowerPoint viewer and extract the ClearType fonts, including Cambria Math, from that, but at that point you are probably better off just commenting those lines of the MCVE out. – Davislor Mar 04 '18 at 01:06
-
1
-
-
Just for completeness, here is Minion Math. (Even though this is a proprietary font it seems quite a lot of people use it or at least inquire about it, so it might be of interest.) – TivV Jan 24 '20 at 19:08
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.
- 44,045

texdoc unimath-symbolsto view a 130-page document that lists all symbols supported by 8 different math fonts; all of them are usable under LuaLaTeX.Stix MathandXITS Matheach feature about 2400 mathy symbols; Latin Modern has about 1600 symbols;Neo Eulerfeatures "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 Eulermay satisfy all of your typesetting needs. – Mico Mar 03 '18 at 09:12texdoc comprehensiveat 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. – Mico Mar 03 '18 at 09:20Terminalapp brings up what I call a "command window". – Mico Mar 03 '18 at 09:45texdoc unimath-symbolsand hit Enter, I get an error. – Mar 03 '18 at 10:02texdoc ...causes an error, then something must have gone wrong while TeXLive was installed on your system. Sorry. – Mico Mar 03 '18 at 10:11texdocworking properly on your computer, you can use the website texdoc.net — type “comprehensive” or “unimath-symbols” into the search bar. – ShreevatsaR Mar 03 '18 at 17:30