【问题标题】:Getting compilation error with latex file in overleaf使用背页中的乳胶文件出现编译错误
【发布时间】:2021-04-16 14:08:37
【问题描述】:

这是我第一次使用背页。我有一个乳胶模板,当我尝试编译它时显示以下错误:

Emergency stop.

<*> header.tex
          
*** (job aborted, no legal \end found)


Here is how much of TeX's memory you used:
28699 strings out of 480906
561966 string characters out of 5908280
1147859 words of memory out of 5000000
43764 multiletter control sequences out of 15000+600000
539149 words of font info for 32 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
73i,1n,97p,10101b,276s stack positions out of 5000i,500n,10000p,200000b,80000s!  ==> Fatal error 
occurred, no output PDF file produced!

我不知道该怎么办。

有人可以建议我如何解决这个问题吗?

如果您需要更多信息,请告诉我。我会在这里补充。

编辑:抛出错误的头文件:http://www.itextpad.com/pH0GJ5Bfmg

【问题讨论】:

  • 显然有些事情没有结束。没有代码很难说。请提供minimal reproducible example。也许你在这样做的时候已经发现了错误:-)
  • 我用示例文件编辑了帖子。
  • @Ragu 如果我将一个实际的文档正文添加到您链接到的代码片段,它编译得很好。请发送minimal reproducible example 以便我们重现问题

标签: latex overleaf


【解决方案1】:

您提供的文件只是一个序言文件。它不包含文档正文 \begin{document} ... \end{document},因此会出现 Emergency stop 致命错误。

您应该以某个名称保存此文件,例如mypreamble.tex。创建一个新的 .tex 文件,并将这两个文件放在同一个文件目录下。最后,在新文件中

\include{mypreamble.tex}
\begin{document}
    \thesistitle
    \section{Section 1}
    /*
     * Write stuff and commands here
     */
\end{document}

您提供的文件似乎不是您复制粘贴、更改某些字段并拥有您的产品的经典模板。它看起来更像是一个包含一些函数和预定义的文件,可以帮助您以某种方式构建文件。我建议寻找另一个包含文档主体的模板,您可以立即实施和使用。

【讨论】:

    猜你喜欢
    • 2011-01-29
    • 2021-03-24
    • 2015-08-09
    • 2022-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-19
    • 1970-01-01
    相关资源
    最近更新 更多