3

I would like to use LuaLaTeX with unicode-math to use some OTF math font, but when I switch on unicode-math the spacing in integrals looks bad. Compare the result with the legacy Computer Modern Math font

\documentclass{article}
\begin{document}
\[
  \int_{-A}^{B} dx
\]
\end{document}

enter image description here

with OTF Latin Modern Math

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\[
  \int_{-A}^{B} dx
\]
\end{document}

enter image description here

\setmathfont{XITS Math} looks even worse

enter image description here

Is there a problem with my installation (fully upgraded TeX Live 2016 on linux, luatex -v gives Version 0.95.0) or this is the best that I should expect with unicode-math?

15
  • I seem to remember there were some bugs in this area, I get this image with xits-math with luatex 1.0.2 (and everything else from current texlive 2016) Feb 6, 2017 at 21:20
  • You can also use xelatex of course which should produce better output than you show. Feb 6, 2017 at 21:21
  • Unfortunately, it's a long standing bug in LuaTeX
    – egreg
    Feb 6, 2017 at 21:26
  • @egreg you don't get what I show in the first comment? Feb 6, 2017 at 21:32
  • 1
    @Marco: I use ConTeXt minimals, which typically includes the latest binary of luatex.
    – Aditya
    Feb 7, 2017 at 1:59

1 Answer 1

4

Luatex had some bugs in this area but using luatex 1.0.2 (as will go into texlive 2017, or may be built from source) I get

enter image description here

using

\setmathfont{XITS Math}

You can also get essentially the same output using xelatex if that is an option.

8
  • 1
    Is there any chance at all that LuaTeX 1.0.2 will be distributed with TeXLive2016 and MacTeX2016? (Please, please, cherry on top?)
    – Mico
    Feb 6, 2017 at 21:46
  • @Mico Not down to us but 'very likely no': you can get builds from W32TeX/ConTeXt minimals which work with TeX Live
    – Joseph Wright
    Feb 6, 2017 at 21:48
  • David: Where is the git master (or equivalent) source code for LuaTeX? The project page only provides release versions, as far as I can tell. I can compile on Ubuntu 16.04 and regularly do that for GIMP dev version. I wouldn't mind trying LuaTeX 1.0.2 installed in /opt if possible.
    – user103221
    Feb 6, 2017 at 21:53
  • you can get the texlive svn but actually I built off luatex experimental branch, svn info says it comes from URL: foundry.supelec.fr/svn/luatex/branches/experimental Relative URL: ^/branches/experimental Repository Root: foundry.supelec.fr/svn/luatex Feb 6, 2017 at 21:55
  • 1
    @Marco copy the luatex from your texlive bin directory (just in case) and then copy the context one in to place, then run fmtutil-sys to rebuild the formats. the executable will detect its location and default to picking up the texlive 2016 paths Feb 6, 2017 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.