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?

Marco
  • 490

1 Answers1

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.

David Carlisle
  • 757,742
  • 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 06 '17 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 06 '17 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. –  Feb 06 '17 at 21:53
  • you can get the texlive svn but actually I built off luatex experimental branch, svn info says it comes from URL: https://foundry.supelec.fr/svn/luatex/branches/experimental Relative URL: ^/branches/experimental Repository Root: https://foundry.supelec.fr/svn/luatex – David Carlisle Feb 06 '17 at 21:55
  • Is it possible to install in the user local tree of TeX Live 2016 the package from TeXLive 2017 with LuaTex 1.x? Where I could find it? – Marco Feb 06 '17 at 22:11
  • @Marco it's an experimental build I compiled from source, as noted in the comment above. – David Carlisle Feb 06 '17 at 22:31
  • Thank all of you for the answers. Before building TeXLive 2017 from source, one last try: @JosephWright I downloaded ConTeXt minimals and installed in /opt/context. In which sense it works with TeX Live? I have the new luatex executable in PATH, but no lualatex of course. When I run latexmk -lualatex, it still runs the TeX Live 2016 version. – Marco Feb 06 '17 at 23:24
  • 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 – David Carlisle Feb 06 '17 at 23:40