在 Sharelatex 中写入,出现“扫描 \@xargdef 的使用时文件结束。”错误

在 Sharelatex 中写入,出现“扫描 \@xargdef 的使用时文件结束。”错误

在尝试计算我的报告时分享LaTeX我收到错误信息

“扫描 \@xargdef 的使用情况时文件结束。”

我尝试在文档中查找花括号中的错误{},但似乎找不到任何错误,也无法找到任何相关信息\@xargdef,如能提供任何帮助我将不胜感激。

由于文档代码太长,我将其概括为:https://gist.github.com/ZzimonNanoq/527855642ed275fc0c67

完整错误信息如下:

File ended while scanning use of \@xargdef.
<inserted text>
\par
<*> main.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> main.tex

*** (job aborted, no legal \end found)


Here is how much of TeX's memory you used:
7316 strings out of 495028
109339 string characters out of 6181497
229851 words of memory out of 5000000
10500 multiletter control sequences out of 15000+600000
3940 words of font info for 15 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
42i,0n,43p,1192b,38s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

答案1

您的源文档中指出了两个问题。

  1. 的定义\namesigdate缺少右括号。正确的代码应为:

    \newcommand{\namesigdate}[2][5cm]{% \begin{tabular}{@{}p{#1}@{}} #2 \\[2\normalbaselineskip] \hrule \\[15pt] \end{tabular}}

  2. 要么\begin{comment}在第 61 行不必要地使用,要么在文档中没有及时结束。

解决以上两个问题即可解决问题。

相关内容