我在 ShareLaTeX 中编译文档时遇到问题。我想编译一个 tex-data,其中包括一个config.tex
似乎导致问题的输入文档(名称:)。必须编译的数据基本上如下所示:
\input{config.tex}
\begin{document}
\begin{center}
.......
\end{document}
ShareLaTeX 给了我这个错误:
Emergency stop.
<*> config.tex
*** (job aborted, no legal \end found)
config.tex 如下所示:
\documentclass[%
%.......
\newcommand{\stack}[2]{\makebox[1cm][c]{$\stackrel{#1}{#2}$}}
需要改变什么config.tex
或者问题是另一个问题?
答案1
你有两个文件,zzzz.tex
看起来像
\input{config.tex}
\begin{document}
\begin{center}
.......
\end{center}
\end{document}
看起来config.tex
就像
\documentclass[]{scrartcl}%
%.......
\newcommand{\stack}[2]{\makebox[1cm][c]{$\stackrel{#1}{#2}$}}
如果你使用zzzz.tex
乳胶处理,你会得到:
pdflatex --interaction=nonstopmode zzzz
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./zzzz.tex
LaTeX2e <2017-04-15>
Babel <3.14> and hyphenation patterns for 84 language(s) loaded.
(./config.tex
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2017/09/07 v3.24 KOMA-Script document class (article)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/typearea.sty)))
(./zzzz.aux) [1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdfte
x.map}] (./zzzz.aux) )</usr/local/texlive/2017/texmf-dist/fonts/type1/public/am
sfonts/cm/cmr10.pfb>
Output written on zzzz.pdf (1 page, 10187 bytes).
Transcript written on zzzz.log.
但如果你处理config.tex
你就会得到
$ pdflatex --interaction=nonstopmode config
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./config.tex
LaTeX2e <2017-04-15>
Babel <3.14> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2017/09/07 v3.24 KOMA-Script document class (article)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/typearea.sty)))
! Emergency stop.
<*> config
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on config.log.
这是您显示的错误。您需要处理文档,而不是配置设置文件。