Redefining latex macro using same name
Asked Answered
A

1

15

Currently I use a \mytodo macro, which just calls \todo[inline]:

\newcommand{\pbtodo}[1]{\todo[inline]{#1}}

But I'd like to call this macro \todo. The simplest solution:

\renewcommand{\todo}[1][]{\todo{#1}} 

unsurprisingly resulted in what I presume to be a stack overflow:

! TeX capacity exceeded, sorry [input stack size=5000].

Does anyone know a way to use the old \todo macro in a redefinition?

Anstice answered 7/8, 2009 at 14:58 Comment(1)
I'm voting to close this question as off-topic because it is answered elsewhere: tex.stackexchange.com/q/47351/2148Orthopedics
W
16

I often see advice on the web along the lines of:

\let\Oldtodo\todo
\renewcommand{\todo}[1]{\Oldtodo[inline]{#1}}

for this situation. I believe that \let is a plain TeX feature.

Wilmot answered 7/8, 2009 at 16:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.