6

it looks as if there is a bug in math-typeseeting with lualatex using ams. An minimum example showing this is

\documentclass[12pt]{report}
\usepackage{amsmath}

\begin{document}

This looks OK, but uses the "wrong" non-AMS-environment eqnarray

\begin{eqnarray}
  \label{eq:1}
  s&=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}
\end{eqnarray}

This is no not OK and using the equation-environment
\begin{equation}
  \label{eq:1}
  s=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}
\end{equation}

And again with align
\begin{align}
  \label{eq:1}
  s&=\sqrt{\frac{1}{N-1}\sum\limits_{i=1}^N x_i}
\end{align}

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-engine: luatex
%%% coding: utf-8
%%% TeX-PDF-mode: t
%%% End: 

The last (%%%%-preceded) lines are for emacs to call lualatex -shell-escape filename and generate pdf-output, which ia OK, in the eqnarray-case (but ugly, non-AMS-Style) and in the latter two cases weared things happen: There is one line with the square-root with a big black block underneath and the somewhot lower the rest of the formular. This is totally messed up.

Can someone help on this, I still hope it's my fault and not TeX's (btw: it works OK with "old" latex -> dvi -> ps or pdf workflow.

Versioning and output of Latex is

Running LaTeX on min_ex with lualatex -shell-escape -interaction=nonstopmode min_ex.tex:

This is LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9) 
 \write18 enabled.

(c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.tex
LaTeX2e <2011/06/27>
LuaTeX adaptation of babel <v3.8m-luatex-1.5> and hyphenation patterns for english, loaded.
("C:/Program Files/MiKTeX 2.9/tex/latex/base/report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:/Program Files/MiKTeX 2.9/tex/latex/base/size12.clo"))
("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amstext.sty"
("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsgen.sty"))
("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsbsy.sty")
("C:/Program Files/MiKTeX 2.9/tex/latex/ams/math/amsopn.sty"))
(c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.aux

LaTeX Warning: Label `eq:1' multiply defined.


LaTeX Warning: Label `eq:1' multiply defined.

) [1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]
(c:/Users/gerald/Documents/02_akademia/Seminare/slides/utf8/temp_specials/min_example/min_ex.aux)

LaTeX Warning: There were multiply-defined labels.

 )
 336 words of node memory still in use:
    nodes
avail lists: 2:12,3:29,4:152,5:45,6:188,7:9,9:109,10:6
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmex10.pfb><C:/Program     
Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi12.pfb><C:/Program Files/MiKTeX 
2.9/fonts/type1/public/amsfonts/cm/cmmi8.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1
/public/amsfonts/cm/cmr12.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts
/cm/cmr8.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy8.pfb>

Output written on min_ex.pdf (1 page, 63918 bytes).
Transcript written on min_ex.log.

LaTeX finished at Tue Sep 11 08:10:56

2 Answers 2

5

for LuaTeX use

\documentclass[12pt]{report}
    
\usepackage{amsmath}

\usepackage{unicode-math}
    
[...]
9
  • Thanks, Herbert, but that is causing even more trouble. With this line (I tried it already in the larger project), even the example above does not even compile, giving all sorts of errors startuing with warning:
    – gobers
    Sep 11, 2012 at 6:52
  • sorry, here the warning: LaTeX Warning: You have requested, on input line 24, version 2012/08/14' of package expl3, but only version 2012/04/23 v3570 L3 Experimental code bundle wrapper' is available. which may be the root cause, but Miktex does not provide a more recent package, and after that latex does not even find \begin{document} anymore and on and n and on....
    – gobers
    Sep 11, 2012 at 6:54
  • you should update your TeX distribution. The expl3 packages are updated frequently. With current TeXLive 2012 there is no problem.
    – user2478
    Sep 11, 2012 at 7:06
  • @gobers: The version with unicode-math works fine with a current miktex. If you have a multiuser installation make sure that you run updates as user and as admin. The other problem needs probably an update of the binaries see tex.stackexchange.com/questions/61952/…. Sep 11, 2012 at 7:39
  • When including version 2012/05/30 I get a strange Undefined control sequence. \textellipsis ->\futurelet \ellipsis@token \@textellipsis l.3538 ...acter[\UTFencname]{x2026}{\textellipsis}. Being on Ubuntu 12.04 LTS with backports I had to manually install a newer lmodern package from 12.10 to get lmmath-regular.otf. Any ideas? :/
    – Christian
    Oct 6, 2012 at 17:06
3

this is, how I succeeded (finally):

Thanks to Herbert, the preamble needs to look like

\documentclass[12pt]{report}

\usepackage{amsmath}

\usepackage{unicode-math}
 
[...]

and updated the entire package

However, in Miktex this required to download Latin Modern Math fonts from http://www.gust.org.pl/projects/e-foundry/lm-math/index_html downloading the file, putting it under ....Miktex 2.9/fonts/opentype/public/lm renaming it to lmmath-regular.otf installing the font (windows: doubleclick on a.m. file and hit "install")

Alternatively, one can use one of the fonts with Miktex and modify the preamble to

\documentclass[12pt]{report}%
\usepackage{amsmath}%
\usepackage{unicode-math}%
%\usepackage{fontspec}%
%\setmathfont{Asana Math}%
%\setmathfont{Xits Math}%
%\setmathfont{Cambria Math}%
[...]

where on of the \setmathfonts... must be activated by removing the preceeding %.

Thanks for the help

gerald

You must log in to answer this question.

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