I have made a class file. It defines commands for use in document files. I want to change some of the command names, but I also want old document files to work without changing them.
Here's an example to illustrate:
\begin{filecontents}{a.cls}
\ProvidesClass{a}
\LoadClass{scrartcl}
\RequirePackage{scrpage2}
%
\def\commandnameA#1{\def\@commandnameA{#1}}
\commandnameA{}
%
\newpagestyle{a}{{}{}{A:\@commandnameA}}{{}{}{}}
\pagestyle{a}
\end{filecontents}
\documentclass{a}
\begin{document}
\commandnameA{test}
test
\end{document}
For this example I want to change "commandnameA" to "commandnameB" in
the class file and have the document file work whether it contains
\commandnameA{test} or \commandnameB{test}.
Any help is appreciated.