我正在使用MIT LaTeX 论文模板作为模板。
在cover.tex
页面上,我尝试注释掉/删除该\chairman
命令。
%\chairman{Arthur C. Smith}{Chairman, Department Committee on Graduate Theses}
但这会导致意外的错误:
line 91: Undefined control sequence \maketitle
line 91: There's no line here to end. \maketitle
line 91: Undefined control sequence \maketitle
此行为的根本原因是什么?在我看来,此模板似乎需要某些命令(例如 等)\thesisdate
。\degreeyear
答案1
你引用的错误信息具有误导性,实际的错误是
! Undefined control sequence.
<argument> \@chairmanname
\\ \@chairmantitle
l.91 \maketitle
未定义的命令始终是第二行的最后一个标记,因此\@chairmanname
后面的行显示检测到错误的上下文\maketitle
。
请注意文件中的注释
%% Make the titlepage based on the above information. If you need
%% something special and can't use the standard form, you can specify
%% the exact text of the titlepage yourself. Put it in a titlepage
%% environment and leave blank lines where you want vertical space.
%% The spaces will be adjusted to fill the entire page. The dotted
%% lines for the signatures are made with the \signature command.
因此,您要做的就是使用\begin{titlepage}
而不是\maketitle
重新定义\maketitle
原文:
\def\maketitle{\begin{titlepage}
\large
{\def\baselinestretch{1.2}\Large\bf \choosecase{\@title} \par}
by\par
{\Large \choosecase{\@author}}
\par
\@prevdegrees
\par
\choosecase{Submitted to the} \choosecase{\@department} \\
\choosecase{in partial fulfillment of the requirements for the}
\choosecase{\@degreeword}
\choosecase{of}
\par
\choosecase{\@degree}
\par
at the
\par\MIT\par
\@degreemonth\ \@degreeyear
\par
\@copyrightnotice
\par
\vskip 3\baselineskip
\signature{Author}{\@department \\ \@thesisdate}
\par
\vfill
\unvbox\@titlesupervisor
\par
\vfill
\signature{Accepted by}{\@chairmanname \\ \@chairmantitle}
\vfill
\end{titlepage}}
所以如果你删除
\signature{Accepted by}{\@chairmanname \\ \@chairmantitle}
错误将会消失。
答案2
对于 OP 来说,这个回复来得太晚了,但由于问题已存档,我会提一下,麻省理工学院于 2023 年发布了一个新的论文模板:https://ctan.org/pkg/mitthesis
这个新的 latex 模板允许删除主席(或论文“接受者”),只需省略命令即可\Acceptor{..}{..}{..}
。要隐藏由此产生的错误消息,请将其放在\SuppressAcceptorError
前面\maketitle*
。请参阅包文档了解各种命令的详细信息。