Possible Duplicate:
What is the meaning of double pound symbol (##1) in an argument?
In the following code, I would like to build one macro \caseWord with two arguments corresponding to Case and end case so as to change the macro \algocf@Case which have two arguments. How can I achieve this ?
\documentclass{article}
\usepackage[longend]{algorithm2e}
\makeatletter
\renewcommand\algocf@Case[2]{%
\KwSty{Case} #1 \algocf@block{#2}{%
\@algocf@endoption{end case}%
}%
}
\makeatother
\begin{document}
\begin{algorithm}
\Begin{
\Switch{X}{
\Case{1}{
\While{Continue}{Action}
}
}
}
\end{algorithm}
\end{document}
##1and##2– David Carlisle Oct 28 '12 at 11:57#here http://tex.stackexchange.com/a/79151/1090 – David Carlisle Oct 28 '12 at 11:59#it is probably more useful to close this as duplicate rather than just delete it. I'm just looking for a good question to reference... – David Carlisle Oct 28 '12 at 12:07