4

Another program (pandoc) is generating .tex files that are loaded with Unicode math symbols and Greek letters. I am successfully using those files with xelatex, but with the default fonts, it is hard to get math symbols and subscripts. The only "mainstream" serif font I have found that supports all these symbols is DejaVu Serif. But it looks very different from the Times New Roman that I have been using for all my other documents.

Is there another font, more closely approximating Times New Roman, that has extensive Unicode support? I have tried Tinos and Liberation Serif with no luck.

Here is a minimal non-working example:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{STIX} % subscripts are missing
% \setmainfont{DejaVu Serif} % subscripts are present
\begin{document}
I want x₁ ↦ τ₂.
\end{document}

With STIX, I get the math symbol, but not the Unicode subscripts. What font can do both, and looks mostly like Times Roman?

4
  • 3
    There are many, I think, but it's hard to guess which to recommend given the details in the question. What about New TX or Stix or Xits? And have you looked at The LaTeX Font Catalogue?
    – jon
    Mar 12, 2017 at 21:17
  • 1
    stix especially stix2 is designed as a times-inspired font for math Mar 12, 2017 at 21:19
  • I have looked at the Catalogue, but I don't know how to read it to tell which fonts support Unicode subscripts. I will see if I can download New TX and Xits and report back. Mar 12, 2017 at 21:34
  • 1
    you want stix2 not stix but I assumed you were generating math markup, but I think stix2 has the subscripts (it has a lot more text rather than math glyphs, stix 1 was more of a math companion font to go alongside times Mar 12, 2017 at 21:38

2 Answers 2

4

STIX Two Math has (almost) full coverage for upright text; you can use it together with the STIX Two Text fonts.

\documentclass{article}
\usepackage{fontspec}

\setmainfont{STIX Two}[
  UprightFont={* Math},
  ItalicFont={* Text Italic},
  BoldFont={* Text Bold},
  BoldItalicFont={* Text Bold Italic},
]

\begin{document}

I want x₁ ↦ τ₂.

\textit{Italic τ₂}

\textbf{Bold τ₂}

\textbf{\textit{Bold Italic τ₂}}

\end{document}

Math specific characters are of course missing from the Text fonts.

enter image description here

4

Stix2 has separate text and math fonts, but the math font may be enough:

enter image description here

\documentclass{article}
\usepackage{fontspec}
%\setmainfont{STIX2Text-Regular.otf} 
\setmainfont{STIX2Math.otf} 

% \setmainfont{DejaVu Serif} % subscripts are present
\begin{document}
I want x₁ ↦ τ₂.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .