1

I'm using XeLaTeX to typeset documents containing maths, and using the Libertine font with some packages to get it working in math mode. However, whereas the output is fine on Windows with MikTex, the math font is broken when building in Linux with TeXlive. (see screenshots and MWE below)

\documentclass[12pt,a4paper]{article}

\usepackage[libertine,frenchmath]{newtxmath}
\usepackage{mathspec}
\usepackage{MnSymbol}\undef\mathdollar
\usepackage{libertine}
\begin{document}

These two $N$ N does not look the same on Linux.

\end{document}

In Linux In Windows

Edit : Here is the log of Linux build :https://pastebin.com/raw/H0nrSPV4

And the Windows one : https://pastebin.com/raw/5ejbs5g1

4
  • Could you please post both logs (Windows and Linux) here?
    – TeXnician
    May 16, 2018 at 16:27
  • I edited the post, both logs are available.
    – Enzo S.
    May 16, 2018 at 16:40
  • What's the reason for loading mathspec?
    – egreg
    May 16, 2018 at 16:41
  • Without mathspec, MnSymbol can't be loaded, despite being necessary for big operators such as sum not being akward with Libertine. I must point out however that letters work just fine this way.
    – Enzo S.
    May 16, 2018 at 16:55

1 Answer 1

1

You didn't show the log-files but only the terminal output so a lot details are missing. But your texsystem on linux is at least two years older than your miktex system and this quite probably is the reason for the difference.

Beside this: you are loading four package which are trying to change the math setup (newtxmath, mathspec, mnsymbol and through libertine fontspec). That is not a good idea. Better use only the one you really need and load fontspec with the no-math option, e.g.

\documentclass[12pt,a4paper]{article}

\usepackage[libertine,frenchmath]{newtxmath}
\usepackage{MnSymbol}

\usepackage[no-math]{fontspec}
\usepackage{libertine}
\begin{document}

These two $N$ N does not look the same on Linux.

\end{document} 
4
  • For math on XeLaTeX, how about: \usepackage[math-style=French]{unicode-math} followed by \setmathfont[Scale=MatchUppercase]{Libertinus Math}. Also what the libertine package recommends. Drop mnsymbol, as unicode-math declares all the symbols from it anyway.
    – Davislor
    May 20, 2018 at 4:59
  • It was indeed the old version provided by Ubuntu Xenia repositories which was the problem. Installed a vanilla version of TeXLive 2018 and it solved the problem.
    – Enzo S.
    May 20, 2018 at 9:55
  • @Davislor switching to unicode-math is an option. But it changes a lot things and wasn't necessary to answer the question here. May 20, 2018 at 9:57
  • @UlrikeFischer Agreed! Nothing wrong with what you wrote. Just suggesting an alternative in the comments.
    – Davislor
    May 20, 2018 at 12:37

You must log in to answer this question.

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