Categories: Tips<< | Page list | >>
Redefining a Command While Keeping the Old One
It is very common for people to want to redefine a LaTeX command while keeping the old one around, perhaps because they want to use the old one in the definition of the new one. Thus, for example, you might want to redefine the
Note that this is different from:
That will not do what you want, because
Steve Litt also points out:- What they forget is this, which is often very necessary because every environment has its own "end" environment:
Without that, an environment whose "end" part actually does something will either do the wrong thing or fail. It's rare, but I've seen it happen.
Also, the hint above works well if you want the new functionality to come before the original, after the original, or both. Where if fails is if you want to insert something in the middle of the original.