在如下官方链接下载到「WileyNJDv5_Template.zip模板」文件
其目录结构大致为:
其中的主文件原本为「wileyNJDv5_AMA.tex
」,但这并非最小示例
要想复现问题,可以在根目录下新建main.tex
文件:
% main.tex
\documentclass[AMA,Times1COL]{WileyNJDv5}
\begin{document}
Hello, world!
\end{document}
在命令行使用xelatex
编译会得到:
Package etex Warning: Extended allocation already in use.
(etex) etex.sty code will not be used.
(etex) To force etex package to load, add
(etex) \RequirePackage{etex}
(etex) at the start of the document.
)
! Undefined control sequence.
<recently read> \reserveinserts
l.356 \reserveinserts
{28}% included etex package and \reserveinserts{...} to...
?
在2025年的现在,要想顺利编译该模板,最佳实践是什么?
一个也许可行的方案:
(1)删去WileyNJDv5.cls
中的\reserveinserts{28}
(这样做是否稳健...我不清楚...)
% Line 356
\usepackage{etex}%
% \reserveinserts{28}% 注释这一行
% included etex package and \reserveinserts{...} to avoid no room for \newinserts, \newcounts or \newskips etc.
\RequirePackage{graphicx,multicol}%
\RequirePackage{multirow}%
(2)根据这个链接,注意到需要特定版本的listings
宏包,自行补充到根目录即可,或者如果不需要插入listings
...那么断舍离,注释去\usepackage{listings}
% Line 6821
\usepackage{algorithm, algorithmicx, algpseudocode}
% \usepackage{listings}%% 注释这一行
\usepackage{alltt}%
同时注释去wileyNJDv5_AMA.tex
中的
% Line 664
% \begin{lstlisting}[caption={Descriptive caption text},label=DescriptiveLabel, basicstyle=\fontsize{8}{10}\selectfont\ttfamily]
% for i:=maxint to 0 do
% begin
% { do nothing }
% end;
% Write('Case insensitive ');
% WritE('Pascal keywords.');
% \end{lstlisting}
若如此做,在TL2025
下使用latexmk -pdfxe wileyNJDv5_AMA.tex
编译主文件wileyNJDv5_AMA.tex
可以顺利编译得到:
当然,关于这份模板,一切使用务必严格按照Author-guideline_Wiley.pdf。