[Tex/LaTex] How to get around \renewcommand

macros

Say I've redefined some command

\renewcommand{\oldcommand}{\newcommand}

If I want to use this new command everywhere in my LaTex document except for once or twice, where I need to make use of the old command, is there a way to use the old command, without getting rid of my \renecommand statement?

This is a hypothetical question, so I don't have a concrete example of a document where I would need an answer to this, but I am curious.

Thanks a lot.

Best Answer

\documentclass{article}
\let\oldLarge\Large
\renewcommand{\Large}{\Huge}
\begin{document}
This is {\Large now huge}

This is {\oldLarge still Large}

\end{document}

output of code

There are some circumstances in which this simple approach won't work, depending on how the command you're redefining was defined initially. See:

Related Question