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

closed as unclear what you're asking by Johannes_B, user13907, Thorsten, Andrew, moewe Mar 10 '16 at 10:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 9 '16 at 4:52
  • 3
    This doesn't show any obvious signs of being problematic. What do you get? – Werner Feb 9 '16 at 5:46
  • 2
    Is there a \makeatletter...\makeatother pair around this \def\def@... stuff in your trial document? – user31729 Feb 9 '16 at 8:03
  • 1
    Welcome, why the classicthesis tag? – Johannes_B Feb 9 '16 at 8:32
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.