Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

[I posted this question first on stackoverflow since I wasn't aware of the existence of this site]

Hi,

I am using a special usepackage to write my thesis in tex and I need to adjust one of the provided macros. Usually there would be the way to use \renewcommand but in this case it doesn't work. Either the command is not changed or I get the error message that the overridden macro is not set, although I set it. The defined macro I'd like to change is as follows:


\gdef\TUD@thesis@referee{\PackageError{\@currname}{No '\noexpand\refereegiven!\MessageBreak See documentation for details.}\@ehc}
\def\referee#1#2{\@ifnextchar[{\TUD@thesis@referee@three{#1}{#2}}{\TUD@thesis@referee@two{#1}{#2}}}
\def\TUD@thesis@referee@two#1#2{
  \gdef\TUD@thesis@referee{1. Gutachten: #1\\2. Gutachten: #2}
}
\def\TUD@thesis@referee@three#1#2[#3]{
  \gdef\TUD@thesis@referee{1. Gutachten: #1\\2. Gutachten: #2\\3. Gutachten: #3}
}
\newcommand{\gutachter}[2]{%
  \referee{#1}{#2}
  \PackageError{\@currname}{Command '\noexpand\gutachter deprecated! Use '\noexpand\referee` instead.}\@ehc%
}

the way I use the command is:

\referee{ref1}{ref2}

and instead of having

{1. Gutachten: #1\\2. Gutachten: #2}

I would like to have

{Betreuer:\\#1\\#2}

I can solve this by simply modifying this part within the sty file but that means I have to adjust the file on every machine I possibly work on.

I tried to use

\renewcommand{\referee}[2]{Betreuer:\\#1\\#2}

But that obviously didn't work^^.

Thanks for your help.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Try to include the following code in your document preamble (untested):

\makeatletter
\def\TUD@thesis@referee@two#1#2{%
  \gdef\TUD@thesis@referee{Betreuer:\\#1\\#2}%
}
\def\TUD@thesis@referee@three#1#2[#3]{%
  \gdef\TUD@thesis@referee{Betreuer:\\#1\\#2\\#3}%
}
\makeatother
share|improve this answer
    
Great it works :). I already stopped believing to find a solution before reading a complete book about tex macros. Now that I know that something like \makeatletter and \makeatother exists I am a little bit surprised I didn't stumble upon them during my search for a solution. –  LeoR Oct 8 '10 at 21:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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