帮助理解乳胶错误消息

帮助理解乳胶错误消息

我不明白哪个文件缺少括号。有人能帮我理解这个错误信息吗?它是在抱怨 thesis.sta 文件吗?

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./thesis.ltx
LaTeX2e <2018-04-01> patch level 5
(/usr/local/texlive/2018/texmf-dist/tex/latex/extsizes/extreport.cls
Document Class: extreport 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/exscale.sty))
(./usepackages.ltx
(/usr/local/texlive/2018/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty))

Package geometry Warning: Over-specification in `h'-direction.
    `width' (433.62pt) is ignored.


Package geometry Warning: Over-specification in `v'-direction.
    `height' (578.15999pt) is ignored.

(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/standalone/standalone.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/shellesc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/currfile/currfile.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/filehook/filehook.sty))
(./thesis.sta)
! Extra }, or forgotten \endgroup.
l.555   }
         %
? 

当我删除 thesis.sta 文件时,它可以正常编译。但是,我没有在 .sta 文件中看到任何错误。这是它的内容。

\standalonepreambles
\subpreamble{fig-3.tex}
\usepackage {tikz}\usetikzlibrary {arrows.meta, automata, bending, positioning, shapes.misc}\tikzstyle {automaton}=[shorten >=1pt, >={Stealth[bend,round]}, initial text=]\tikzstyle {accepting}=[accepting by arrow]
\endsubpreamble
\subpreamble{fig-7.tex}
\usepackage {tikz}\usetikzlibrary {arrows.meta, automata, bending, positioning, shapes.misc}\tikzstyle {automaton}=[shorten >=1pt, >={Stealth[bend,round]}, initial text=]\tikzstyle {accepting}=[accepting by arrow]
\endsubpreamble

我正在添加 MWE。

\documentclass{article}
\usepackage[subpreambles=true]{standalone}
\begin{document}
test
} %% this is an error, and will correctly cause compilation to fail, but remove it and complilation still failes until you remove the mwe.st
\end{document}

要重现此问题,请使用 latexmk --pdf mwe.ltx 进行编译。由于结尾的 } 字符太多,会报告错误。修复错误,然后重新运行 latexmk,以查看错误:

(./mwe.sta)
! Extra }, or forgotten \endgroup.
l.555   }
         %

答案1

如果你将该文本复制到任何编辑器中并输入结束符,)它应该会显示最接近的不匹配(行是

(/usr/local/texlive/2018/texmf-dist/tex/latex/standalone/standalone.sty

}因此在555 行检测到错误,standalone.sty其中

\begingroup
  \setbox\@tempboxa\hbox{%
    \makeatother
    \InputIfFileExists{\jobname.sta}{}{\PackageInfo{standalone}{STA file not found!}{}{}}%
  }%

这与日志中显示的内容相匹配,紧接着\jobname.sta被读取,如下所示

(./thesis.sta)

但这仅意味着您之前拥有的一些代码可能thesis.sta已损坏。

相关内容