3

For a document I'm writing with XeLaTeX, I have to use Times New Roman as a main font. For math environment only, I'd like to use newtxmath with Libertine font. For my TexShop 2016 I installed Libertine using texhash and updmap-sys (as was described in the guide). So now there're many *.tfm files of Libertine in texfm-local. I also installed *.otf Libertine fonts directly into the system.

For this simple example

\documentclass[a4paper,14pt]{extreport}
\usepackage[no-math]{fontspec}
\usepackage[libertine]{newtxmath}
\setmainfont{Times New Roman}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}
\((5!)^5\)
\end{document}

in pdffonts I see

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
HHHARJ+txsys                         Type 1C           Builtin          yes yes no       4  0
GMSUHV+LMRoman12-Regular             Type 1C           WinAnsi          yes yes no       5  0
CZQOLM+LMRoman10-Regular             Type 1C           WinAnsi          yes yes no       6  0
SRWENI+TimesNewRomanPSMT             CID TrueType      Identity-H       yes yes yes      8  0

There are no warnings in the log.

Could you please clarify the following questions

  1. Am I right expecting only Libertine fonts in the pdffont's output? After all, only math environment is in the document.
  2. Why do I see LMRoman and Times in the output? Shouldn't there be Libertine?
  3. What is txsys?

And what can I do to fix this? As I understand, with a proper setup I should see only Libertine fonts in pdffont's output...

Any help is appreciated:)

8
  • Welcome to TeX.SX! Why Libertine for math in a Times context?
    – egreg
    Apr 24, 2017 at 18:01
  • @egreg I was just searching for some nice fonts for math environment and newtxmath + Libertine was like the most frequently recommended option:) Unfortunately, I can't abandon Times New Roman, since its use is required in my university
    – swasta
    Apr 24, 2017 at 18:11
  • Try \usepackage{unicode-math}\setmathfont{libertinusmath-regular.otf}. PS: How did you install the otf fonts? Apr 24, 2017 at 18:20
  • @HerbSchulz probably I should've mentioned, I'm using macOS, so to install otf fonts I just dragged them in the Font Book. Your suggestion on libertinusmath didn't work out, because fontspec error: "font libertinusmath-regular cannot be found" :(
    – swasta
    Apr 24, 2017 at 18:29
  • @swasta: That's why I asked how you installed the fonts. If you installed them in the TeX Live distribution (/usr/local/texlive/texmf-local/fonts/opentype) the file names should work. If you installed the Libertinus fonts (not Libertine!) via Font Book you should use \setmathfont{Libertinus Math} rather than the file name. On the other hand, if you have an updated TeX Live 2016 (you may get one more update using TeX Live Utility if you haven't updated lately) you should have the Libertinous opentype fonts already installed in /usr/local/texlive/2016/texmf-dist/fonts/opentype/public/... . Apr 24, 2017 at 19:40

1 Answer 1

2

N.B.: Before TL 2017 is released I advise against using XeTeX for any kind of math typesetting. There are a couple of problems.

It is much easier to just use unicode-math and the official math version of Libertine called Libertinus Math.

\documentclass[a4paper,14pt]{extreport}
\usepackage{unicode-math}
\setmainfont{Times New Roman}
\setmathfont{Libertinus Math}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}
\((5!)^5\)
\end{document}

enter image description here

It is even better to substitute everything by TeX Gyre Termes, a completely free Times clone.

\documentclass[a4paper,14pt]{extreport}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}
\((5!)^5\)
\end{document}

enter image description here

You must log in to answer this question.

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