
有人知道 xelatex 下 amsart 和 microtype 相互作用的問題是什麼 - 這在 Latex、pdflatex 或 lualatex 下不會發生?
隨著文件:
\documentclass{amsart}
\usepackage{microtype}
\begin{document}
\begin{abstract}
This is a test.
\end{abstract}
\end{document}
我收到不太清楚的訊息:
(/usr/local/texlive/2017/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg)
! Bad character code (-815).
<to be read again>
h
l.6 \begin{abstract}
答案1
恕我直言,微型打字有個錯誤。當未載入 fontspec 時,在某些情況下它會檢索錯誤的字形槽,這會導致錯誤。這與amsmart無關。如果您使用 .article,您會遇到相同的錯誤\scshape
。我已經做了錯誤報告。作為解決方法,我建議加載fontspec
:
\documentclass{amsart}
\usepackage{fontspec}
\usepackage{microtype}
\begin{document}
\begin{abstract}
This is a test.
\end{abstract}
\end{document}
答案2
如果您複印
/usr/local/texlive/2017/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg
並將其保存在文件所在的目錄中,然後註解掉第 192-196 行,使其看起來像這樣。
% /one.oldstyle = {100,100},
% /two.oldstyle = { 50, 50},
% /three.oldstyle = { 30, 80},
% /four.oldstyle = { 50, 50},
% /seven.oldstyle = { 50, 80},
然後你的文檔運行就不會出現錯誤。