2

Trying to understand \def\def@ sintax primitives

As a followup to this question, I'm currently working on a BA, using a set of definitions I found on a template's .cls file. Currently:

% 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}}

Runs smoothly, but when I add

% The name of the adviser

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

It breaks with a problem with \@argdef apparently.

I get

Luke X
  • 21
  • Hello there, welcome to the site. The > markdown is for quotes, when you add code, you should use code sample markdown. The easiest way to do this is just paste the code in, highlight it all and hit the Code Sample button (the one like { }) or hit Ctrl+k. The long way is to use four spaces before each line instead of the >s – Au101 Feb 09 '16 at 04:52
  • 3
    This doesn't show any obvious signs of being problematic. What do you get? – Werner Feb 09 '16 at 05:46
  • 2
    Is there a \makeatletter...\makeatother pair around this \def\def@... stuff in your trial document? –  Feb 09 '16 at 08:03
  • 1
    Welcome, why the classicthesis tag? – Johannes_B Feb 09 '16 at 08:32

1 Answers1

1

Works fine for me:

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

Suggest you create an example that demonstrates your problem.