我处于一个棘手的境地,如下所述。
我刚刚写完一篇(相当长的)数学文章,它利用了这个包diffcoeff
便于编写(偏微分和常微分)。此文件旨在提交给 IEEE 期刊,并将使用 进行处理pdflatex
。
然而,我刚刚发现 IEEE 的文章提交系统(ScholarOne 门户)无法处理我的 tex 文件,因为它显然使用了旧版本的 TexLive(TL2017)
这个错误是由于我使用的包依赖于和其他与 latex3 相关的现代基础设施diffcoeff
所提供的设施。l3kernel
expl3
我该如何解决这个问题尽量少的努力并使文档在 TL2017 下编译?使用另一个包重写方程式页面当然只是最后的选择。
将最新版本复制diffcoeff.sty
到项目根目录会将错误移至xparse
。复制最新版本xparse.sty
会导致错误投诉“内核太旧”。复制最新版本expl3.sty
会导致错误,提示“expl3 不匹配”等等。
这是一个简单的例子:
\documentclass{IEEEtran}
\usepackage{amsmath}
\usepackage{diffcoeff}
\diffdef { p }
{
op-symbol = \partial ,
left-delim = \left .,
right-delim = \right | ,
subscr-nudge = 0 mu
}
\begin{document}
\begin{equation}
\diff*{\mean{q}_\lambda}{t} = -30 \frac{D_{\text{s}_\lambda}} R^2_{\text{p}_\lambda}} - \frac{45}{2}\frac{j_\lambda}{R^2_{\text{p}_\lambda}}
\end{equation}
在 IEEE 下编译时会出现以下错误
?Undefined control sequence.
l.12164 \diffdef
{ p }
以下是日志中的一些相关内容
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2017/05/29 L3 Experimental document command parser
\l__xparse_current_arg_int=\count389
\g__xparse_grabber_int=\count390
\l__xparse_m_args_int=\count391
\l__xparse_mandatory_args_int=\count392
\l__xparse_v_nesting_int=\count393
)
Package: diffcoeff 2016/06/27 v1.0 Write differential coefficients easily.
\l__diffco_curr_tok_int=\count394
\l__diffco_curr_state_int=\count395
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \diffset with sig. 'o' on line 108.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \diff with sig. 'somt/mg' on line 190.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \Diff with sig. 'ommg' on line 200.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \diffd with sig. 'ommg' on line 210.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \Diffd with sig. 'ommg' on line 220.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \diffp with sig. 'soomt/mg' on line 351.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \jacob with sig. 'mm' on line 356.
.................................................
)
/compile/main.tex:12164: Undefined control sequence.
l.12164 \diffdef
{ p }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
/compile/main.tex:12164: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.12164 \diffdef { p
}
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
/compile/main.tex:12166: Missing $ inserted.
<inserted text>
$
l.12166 op-symbol = \partial
,
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
答案1
最好从 CTAN 获取预先解压的 zip 文件:
提取所有三个并复制一切从tex/latex/l3...
目录上传到您要上传“支持”包的任何位置。(对于l3packages
,您只需上传 的内容即可tex/latex/l3packages/xparse
。)
答案2
我正在使用最新的 MiKTeX。您提供的公式在 之前缺少一个左括号R^2
。当我插入它并更改\mean
为\overline
时,它会为我编译。将整个公式的内容简化为\mean{q}
然后尝试编译会给出“未定义的控制序列”消息(无论有没有diffcoeff
)。
但是,diffcoeff
确实需要相当最新的l3kernel
。它使用一个候选函数\seq_mapthread_function:NNN
,该函数目前还不是内核的一部分,尽管它已经“存在”了一段时间。