1

I have an issue with a new command I use, to create a new template for a workgroup.

In my main document, I create a new commant like below, to allow my users to define a new word I will put in the front page of their report. I do so, because I don't want them to mess up the huge amount of code in the frontpage.

% create the new command
\makeatletter
\newcommand\hello[1]{\def\@hello{#1}}
\makeatother

% later one, they use this
\hello{hello world}

In my front page document, this is called in a footnote like below :

\let\thefootnote\relax\footnote{{ 
\makeatletter
\@hello
\makeatother
}

The result of this (via pdflatex in texmaker) is that there is hello wrote in the footnote instead of hello world. Note, when I put the \makeatletter\@hello\makeatother in the main text, it works.

Do I have to define the full footnote in my new command ?

Thx in advance

Gowachin
  • 131
  • 1
    \makeatletter/other must always be outside the command definition or macro call (in your case the \footnote call). You have to use \makeatletter \footnote{\@hello} \makeatother. See here and the linked duplicate: https://tex.stackexchange.com/q/526818/134574 – Phelype Oleinik Feb 05 '20 at 18:03
  • Okay thanks it works now! – Gowachin Feb 05 '20 at 18:07
  • 1
    Great! I marked a duplicate, of your question, for future readers to have more context. By the way, welcome to TeX.SX! – Phelype Oleinik Feb 05 '20 at 18:09

0 Answers0