fontspec icon indicating copy to clipboard operation
fontspec copied to clipboard

Document differences between XeTeX and LuaTeX handling of fonts in math mode (for example viz ``TeX Ligatures'')

Open jfbu opened this issue 9 years ago • 2 comments
trafficstars

I got baffled by the following for a while.

Consider

\documentclass{article}

\usepackage{fontspec}
\setmainfont{texgyretermes-regular.otf}
\newfontfamily\NoTeXLig {texgyretermes-regular.otf}

\begin{document}

$\Umathchar"0"0"27$ and for comparison {\NoTeXLig '} and {'}

%\ttfamily\makeatletter\meaning\mv@normal
\end{document}

% Local Variables:
% TeX-engine: xetex
% End:

which helped me understand. With XeTeX, the quote produced in math mode is curly like the one in text mode (as fontspec does now Ligatures = TeX by default for \setmainfont).

With LuaLaTeX the quote produced in math mode is straight, like the one obtains with the \NoTeXLig font family.

The above tested on TL2015 and pretest TL2016.

I don't know which one is a bug/feature, perhaps both are features (I sort of understand that the Mapping technique of XeTeX explains its behaviour, which is more satisfactory to me than the LuaTeX one) , but it would be nice to have some documentation. Because 99.99% of people use fontspec for that, the fontspec doc would be the adequate place.

Generally speaking, it would be nice to document in a central place how math mode rendering differs between

  • XeTeX
  • LuaTeX
  • pdfTeX

There are important differences in rendering, for example viz italic corrections. Or for example see this http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext/277628#277628

jfbu avatar Apr 22 '16 13:04 jfbu

Thanks, I’ll put something together… Hopefully sooner rather than later but never any promises :)

wspr avatar Apr 25 '16 10:04 wspr

:+1:

jfbu avatar Apr 25 '16 17:04 jfbu