[tex-eplain] \@optionalarg in \footnote

Stefan Becuwe stefan.becuwe at ua.ac.be
Fri Jun 15 16:09:01 CEST 2007


Hello,

I'd like to print the optional argument as a footnote in a table of 
contents.  It seems there's something wrong with the following 
construction, since "\@optionalarg" is printed as a footnote, not the 
"value" of \@optionalarg which is correctly displayed by \message...

\catcode`\@=11
\def\newchapter{\@getoptionalarg\finnewchapter}
\def\finnewchapter#1{%
   [...]
   \ifx\@optionalarg\empty\writenumberedtocentry{chapter}{#1}{\expandchapter}%
   \else\message{[\@optionalarg]}\writenumberedtocentry{chapter}{#1\footnote{\@optionalarg}}{\expandchapter}%
}

Any idea what's wrong?

Best regards and thanks in advance


Stefan Becuwe


More information about the tex-eplain mailing list