# XeLaTeX: packages & fonts for a project that requires math and small caps support

What fonts & packages would you recommend for a project in XeLaTeX that requires:

• serif font (Latin script + French, German, Spanish, and Polish diacritics) with small caps support,
• math font that in addition to standard / simple equations supports Greek letters (upper and lowercase + their bold versions for vectors or matrices) - so no 'real math' ;P,
• sans-serif font (Latin script + French diacritics),
• typewriter font to typeset some source code.

I did check: LaTeX font catalogue http://www.tug.dk/FontCatalogue/, GUST resources (e.g. http://www.gust.org.pl/projects/e-foundry/tg-math or http://www.gust.org.pl/projects/e-foundry/tg-math/gust_e-foundry-math_fonts-presentation.pdf) and read some related questions like: State of Unicode math typesetting fonts?, What are all the font styles I can use in math mode? or How to use system font for equation in XeLaTeX?. But 1) the answers are about 2 / 3 years old and it changes quickly and 2) I'm interested in current, informed recommendations (I can only pick sth that looks nice and experiment).

• How about Latin Modern and Latin Modern Math? – Mico Dec 28 '16 at 23:17

Ultimately, this is a matter of taste.

Essentially, you require a set of serif, sans serif and monospaced typefaces, with extended Latin diacritics, Greek letters, but you don't require a font with support for proper mathematical typesetting.

You're also open to using XeLaTeX, which makes things a great deal easier.

Commercially available typefaces are often available in 'pro' versions, which will have most, if not all, of these features, with the exception of the serif-sans serif-monospaced family.

This means that you simply have to browse the available type catalogues (Adobe, MyFonts, FontShop, Linotype, Hoefler & Co., &c.) and choose serif, sans serif and monospaced typefaces that you like. These catalogues will list the features, and will link related typefaces that are designed to form families.

It's best to use font files in OpenType format, since using the advanced font features of the OpenType format is much easier in XeLaTeX than the old way of 'alternate' fonts.

To load the fonts for use as text fonts in XeLaTeX, you can use the fontspec package. To load the fonts for use in mathematics mode, you can use either the mathspec package (which works very much like fontspec), or the unicode-math package, which offers greater control over the loading of fonts at the expense of a more difficult interface.

It is a matter of taste, but Libertinus is a free OTF package on CTAN that has everything you need.

\documentclass{article}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{mathspec}

\setmainfont[Numbers={Proportional, OldStyle} ]{Libertinus Serif}
\setmathfont{Libertinus Math}
\setlength{\parskip}{1.5ex}
\begin{document}
\textrm{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

\textbf{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

{\sffamily {The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}}

{\sffamily \textit{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}}

{\sffamily \textbf{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}}

\textsc{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

\textbf{\textsc{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}}

\textit{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

\textsl{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

\texttt{The Quick brown fox jumped over the lazy dog; H\^otel; \'el\eve}

$\frac{\partial \boldsymbol{D}}{\partial t} = \nabla \times \boldsymbol{H}$

\end{document}


• Thx, for the reference. I've just checked it. It look nice but I believe it does not have neither true small caps nor bold math characters. Do I miss sth? – Szpilona Dec 31 '16 at 1:06
• @Szpilona Yes, you missed. Serif has full bold math and small caps, and sans-serif has small caps – Scott Seidman Dec 31 '16 at 1:42