Overleaf 使用了损坏的独立版本吗?

Overleaf 使用了损坏的独立版本吗?

我在 Overleaf 上有一个很长的 tex 文件,刚开始的时候,不知怎么的,编译失败了。我把它简化成了一个最小的工作示例

\documentclass{article}

%%%%%%%%%%%%%%%%%% Pre-Load Packages Order %%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage[mode=buildnew,subpreambles=true,group=false]{standalone} % For side loaded Tikz Figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{TBD}
\author{Me!}

\begin{document}

\maketitle
blah blah blah

\end{document}

我收到以下错误:

Extra }, or forgotten \endgroup.
l.555   }
         %
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

但是,如果我删除选项“subpreambles=true”,错误就会消失。这是为什么呢?

答案1

如果没有更多日志中的上下文,调试起来会很困难,但显示的行是第 555 行,standalone.sty其中

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

所以我猜测之前的运行写入了一个错误的.sta文件。

您可以通过 overleaf 菜单清除所有此类生成的文件

“从头开始重新编译”

在此处输入图片描述

或者

“清除缓存文件”

在此处输入图片描述

相关内容