跟进 \def@

跟进 \def@

尝试理解 \def\def@ 语法原语

作为这个问题的后续,我目前正在研究 BA,使用我在模板的 .cls 文件中找到的一组定义。目前:

% The year and term the thesis is submitted 

\def\degreedate#1{\gdef\@degreedate{#1}}

% The full (unabbreviated) name of the degree

\def\degree#1{\gdef\@degree{#1}}

% The name of your Oxford college (e.g. Christ Church, Pembroke)

\def\college#1{\gdef\@college{#1}}

运行顺利,但当我添加

% The name of the adviser

\def\adviser#1{\gdef\@adviser{#1}}

显然,它因一个问题而破裂\@argdef

我明白了

答案1

对我来说很好用:

\documentclass[a4paper]{article}
\begin{document}
\makeatletter
\def\adviser#1{\gdef\@adviser{#1}}
\def\showadviser{My advisor is: \@adviser}
\makeatother
\adviser{Cazzolato}
\showadviser
\end{document}

建议您创建一个示例来说明您的问题。

相关内容