spanish
babel
、包和 LuaLaTex 引擎的组合存在一个错误pdfx
,使用此 MWE 可以很容易地进行测试:
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{pdfx}
\begin{document}
\begin{equation*}
P_{\max}=0.1
\end{equation*}
\end{document}
包含.log
! Illegal unit of measure (pt inserted).
<to be read again>
/
l.11 P_{\max
}=0.1
?
! Missing number, treated as zero.
<to be read again>
\xdef
l.11 P_{\max
}=0.1
?
! Illegal unit of measure (pt inserted).
<to be read again>
\xdef
l.11 P_{\max
}=0.1
?
! Illegal unit of measure (pt inserted).
<to be read again>
/
l.11 P_{\max
}=0.1
?
! Missing = inserted for ifdim.
<to be read again>
/
l.11 P_{\max
}=0.1
?
! Missing number, treated as zero.
<to be read again>
/
l.11 P_{\max
}=0.1
?
以及针对同一句话的一系列类似投诉。
答案1
这是 中的一个错误spanish
,在 发生更改后出现pdfx
。作为一种解决方法,在加载 后babel
,写入:
\makeatletter
\def\es@fetchenc{%
\begingroup
\count@\escapechar \escapechar=\m@ne
\edef\es@a{\expandafter\string\the\textfont\mathgroup}%
\expandafter\split@name\es@a////\@nil
\escapechar=\count@
\@expandtwoargs\in@{////}{\f@size}%
\ifin@\else
\PackageError{spanish}{%
Non-NFSS font name. The current math font (\es@a)\MessageBreak
doesn't follow the NFSS conventions. I'll use the\MessageBreak
default \string\i\space for \string\dotlessi,
but expect a wrong output.}%
{Find where this font has been (re)defined, and fix it.}%
\def\f@encoding{OT1}%
\fi
\bbl@exp{\endgroup\def\\\f@encoding{\f@encoding}}}
\makeatother