I'm trying to make a class but it needs to remember its arguments
I'm using the file
\documentclass[x]{test}
\begin{document}
\end{document}
With the class
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{test}[2015/01/15 test class]
\DeclareOption*{
\newcommand{\test}{y}
\typeout{\test}
}
\ProcessOptions\relax
\typeout{\test}
\endinput
It outputs
y
y
which is good but that's not what I want to do.
With the class
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{test}[2015/01/15 test class]
\DeclareOption*{
\newcommand{\test}{\CurrentOption}
\typeout{\test}
}
\ProcessOptions\relax
\typeout{\test}
\endinput
I get
x
<- empty line
It like it does not "dereference" \CurrentOption
and take its string value so for the second \typeout
, \CurrentOption
is not defined to anything anymore and I get an empty value :(
Does anyone know how to "dereference" it ? :)