[Tex/LaTex] Best math font with Times New Roman in XeLaTeX

timesunicode-mathxetex

I compile my document with the following commands in the header:

\usepackage{fontspec}
\setmainfont{Times New Roman}

which works fine. What is the "best" math font that will match the text in the body, and what are the commands to set up this font? I tried using:

\usepackage{newtxmath}

but

  1. I think newtxmath is a Times clone, not a Times New Roman clone,
  2. I get a lot of "size substitutions" errors when I compile my document with XeLaTeX.

Best Answer

I'm not sure what's supposed to be best. The following methods work well, though.

For the Times (New) Roman text font, you could choose (via \setmainfont)

For a Times (New) Roman-like math font, first load the unicode-math package and then load (via \setmathfont)

  • XITS Math
  • TeX Gyre Termes Math
  • Stix Two Math.

Alternatively, just use

\usepackage{fontspec}
\usepackage{newtxtext,newtxmath}

First Addendum: A personal comment on the mostly minuscule differences between Times (aka Times Roman) and Times New Roman. To the best of my knowledge, there are only two readily-noticeable differences among the two fonts when using Latin letters (more differences occur with Greek letters):

  • the italic lowercase letter z: it's "swashy" with Times Roman, but non-swashy with Times New Roman; and

  • the % symbol, in both upright and italic mode: the first, i.e., upper "0" symbol and the solidus (aka slash symbol) are not connected with Times New Roman, but they are connected with Times Roman.

enter image description here

Would you -- or anyone else who's not a rather serious font afficionado -- ever take note of these differences and say, "tut, tut, why is this document using Times if it should be using Times New Roman? (Some even less readily visible differences between the two fonts are listed on the Wikipedia page.)


Second Addendum: If you happen to have access to the commercial MathTime Professional II ("mtpro2") Times-like math font package and wish to use under either XeLaTeX or LuaLaTeX, you should (a) load it before loading fontspec, (b) load the fontspec package with the option no-math, and (c) not load the unicode-math package at all. I.e., the relevant part of your document's preamble should look roughly like this:

\usepackage{mtpro2} % or: \usepackage[lite]{mtpro2}
%% load 'fontspec' only if we are running either XeLaTeX or LuaLaTeX
\usepackage{ifluatex,ifxetex}
\ifxetex       \usepackage[no-math]{fontspec}
\else\ifluatex \usepackage[no-math]{fontspec}
\fi\fi
\usepackage[osf]{newtxtext} % or some other suitable Times-like text font

Finally, here's the code needed to produce the little table shown above; compile it with either XeLaTeX or LuaLaTeX. (Of course, you will need to have access to the fonts Myriad Pro, Times, and Times New Roman in order to be able to compile it.)

\documentclass{article}
\usepackage[no-math]{fontspec}
\setmainfont{Myriad Pro}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{@{}lcc@{}}
\toprule 
& \multicolumn{2}{c@{}}{``Times''-like font}\\
\cmidrule(l){2-3}
                  & Times & Times New Roman \\
\midrule
Text-italic ``z'' & \setmainfont{Times}[ItalicFont={Times Italic}] \textit{z}
                  & \setmainfont{Times New Roman} \textit{z}\\   
Percent symbol    & \setmainfont{Times} \% 
                  & \setmainfont{Times New Roman} \% \\
\bottomrule
\end{tabular}
\end{document}