LuaLaTeX AMS-排版 sqrt 下 sum\limits 存在错误

LuaLaTeX AMS-排版 sqrt 下 sum\limits 存在错误

看起来 math-typeseeting 在lualatex使用时有一个错误ams。一个最小示例显示这一点

\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: 

最后 ( %%%%-preceded) 行是让 emacs 调用lualatex -shell-escape filename并生成 pdf 输出,在eqnarray-case 中是可以的(但很丑,不符合 AMS 风格),而在后两种情况下,会发生一些奇怪的事情:有一行是平方根,下面有一个大黑块,其余公式稍微低了一点。这完全搞砸了。

有人可以帮忙吗,我仍然希望这是我的错,而不是 TeX 的错(顺便说一句:它可以在“旧”latex -> dvi -> pspdf工作流程中正常运行。

Latex 的版本控制和输出是

min_ex使用以下方式 运行 LaTeX 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

答案1

用来LuaTeX

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

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

答案2

这就是我最终成功的方法:

感谢 Herbert,序言需要看起来像

\documentclass[12pt]{report}

\usepackage{amsmath}

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

并更新了整个包

然而,在 Miktex 中,这需要从以下位置下载拉丁现代数学字体http://www.gust.org.pl/projects/e-foundry/lm-math/index_html 下载文件,将其放在....Miktex 2.9/fonts/opentype/public/lm 下,将其重命名为 lmmath-regular.otf 安装字体(Windows:双击 am 文件并点击“安装”)

或者,也可以使用 Miktex 字体,并将序言修改为

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

其中 \setmathfonts... 必须通过删除前面的 % 来激活。

谢谢您的帮助

杰拉尔德

相关内容