P.S.你上面的提问内容意味着让「每一位潜在的回答者」都要花20积分下载,这会大大打击回答的热情,你显然应该上传文件。(帮你做了...)
注意,由于latexmk会同时进行多个操作,并不利于定位问题debug和简化问题,同时压缩包中包含的.latexmkrc命令默认的配置为pdflatex,这与模板不契合,且在这里恶行累累,做测试的时候务必不要使用这个.latexmkrc配置.(到底是哪里在流传这份.latemkrc配置...)
请说明你的两种情况下的编译命令,如有报错信息,也应该提供。由于链接中还包含了latexmkrc配置,使用latexmk和xelatex编译在这个例子里是大不相同的.
- 使用TL21编译成功
- 使用新版本(具体是哪个版本),编译命令是?
Edited:
在texpage平台使用xelatex测试的编译结果为:
TL21正常
TL22不正常
TL23不正常
TL24不正常
TL25不正常(不interrupt编译过程,但是编译效果也是不正确的)
Re-Edited:
Description
首先一个主要的观点是,conbine模块和combinet宏包已经和现在的latex2e内核格格不入,cfr在这里提到:
don't use combine with current latex.在combine的CTAN主页上,这个包已经有十几年没有根据新的内核做适配和更新了...
This Package seems not to be maintaned anymore. It is not working with current distributions (since at least November 2020). See for instance the following comments on github: https://tex.stackexchange.com/questions/591145/extra-endgroup-error-when-using-the-combine-document-class
累累罪状
1.本问题OP遇到的\contentsline参数问题:
直接使用TL22及以上编译会得到如下错误:
LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \contentsline
{coltocauthor}{\numberline {}钱学森 \hskip 1em\relax 乌家培}{8}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.可以看一下编译生成的main.toc文件:
% main.toc
\contentsline {coltoctitle}{\numberline {}组织管理的技术——系统工程}{1}
\contentsline {coltocauthor}{\numberline {}钱学森 \hskip 1em\relax 许国志 \hskip 1em\relax 王寿云}{1}
\contentsline {coltoctitle}{\numberline {}组织管理社会主义建设的技术——社会工程}{2}
\contentsline {coltocauthor}{\numberline {}钱学森 \hskip 1em\relax 乌家培}{2}
\contentsline {coltoctitle}{\numberline {}军事系统工程}{3}
\contentsline {coltocauthor}{\numberline {}钱学森 \hskip 1em\relax 王寿云 \hskip 1em\relax 柴本良}{3}注意到这里的\contentsline只吞下3个参数:
{coltocauthor}{\numberline {}钱学森 \hskip 1em\relax 乌家培}{8}
而在source2e.pdf中提到,在2021-11以后,为了兼容hypperref,\contentsline现在已经修改为四参数形式。这也正是在TL21之后不能正确编译的原因。

要想暂时patch这个问题也很简单,重新声明一个默认使用三参数(置第四个为空)的即可。
实现留做习题,读者自行实现不难🐶。
2.不能直接使用,需要对\begingroup做patch
- https://tex.stackexchange.com/questions/591145/extra-endgroup-error-when-using-the-combine-document-class/591171#591171
- https://tex.stackexchange.com/a/655986/322482
- https://tex.stackexchange.com/questions/571625/trouble-with-combine-class#comment1440314_571625
这也正是上述模板中main.tex的Line20-22使用的patch:
\makeatletter
\let\document\c@ladocument\begingroup%
\makeatother3.与fancyhdr的兼容性不好
参考链接:https://tex.stackexchange.com/a/348189/322482
\begin{papers}
\makeatletter\let\@makecol\latex@makecol\makeatother
\import{sub}
\end{papers}4.与tikz/newtx/xcolor的兼容性同样不好
使用TL22及以上编译会得到:
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
l.6 \end{document}参考链接:https://tex.stackexchange.com/q/723346/322482
..




























问 用TexLive2021版成功,新版本编译则目录中作者的格式会出错