我对标题页有以下定义:
%----- TITLE PAGE -----%
\newcommand*{\plogo}{\raisebox{+1.25ex}{\includegraphics[height=1in]{logo}} } % Generic publisher logo
\newcommand*{\titleAT}{
\begingroup % Create the command for including the title page in the document
\newlength{\drop} % Command for generating a specific amount of whitespace
\drop=0.1\textheight % Define the command as 10% of the total text height
\rule{\textwidth}{2pt}\par % Thick horizontal line
\vspace{3pt}\vspace{-\baselineskip} % Whitespace between lines
%\rule{\textwidth}{0.4pt}\par % Thin horizontal line
\vspace{0.75\drop} % Whitespace between the top lines and title
\centering % Center all text
\textcolor{Blue}{
{\Huge Title of the document}\\[0.5\baselineskip]} % Title line 1
%{\Large OF}\\[0.75\baselineskip] % Title line 2
%{\Huge \LaTeX ~Templates}} % Title line 3
\vspace{0.5\drop} % Whitespace between the title and short horizontal line
\rule{0.4\textwidth}{1.25pt}\par % Short horizontal line under the title
\vspace{\drop} % Whitespace between the thin horizontal line and the author name
{\LARGE \textsc{First Author nanme \\ \ \\ Second Author name }}\par % Author name
\vfill % Whitespace between the author name and publisher text
{\large \textcolor{blue}{\plogo}}\\[0.5\baselineskip] % Publisher logo
{\Large \textsc{ Publisher} } }\par % Publisher
\vspace{\drop} % Whitespace under the publisher text
\rule{\textwidth}{0.4pt}\par % Thin horizontal line
\vspace{2pt}\vspace{-\baselineskip} % Whitespace between lines
\rule{\textwidth}{1pt}\par % Thick horizontal line
\endgroup}
%---- END TITLE PAGE ----%
我不断收到以下错误:
! Undefined control sequence.
<argument> \drop
答案1
请始终发布完整的文件,但是
\newcommand*{\titleAT}{
\begingroup % Create the command for including the title page in the document
\newlength{\drop}
应该
\newlength{\drop}
\newcommand*{\titleAT}{%
\begingroup % Create the command for including the title page in the document
寄存器分配应该在顶层,而不是在组内。如果没有示例文件进行测试,就无法判断这是否足以解决问题。