2

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}
projetmbc
  • 13,315

0 Answers0