使用相同的名称重新定义乳胶宏 [英] Redefining latex macro using same name
本文介绍了使用相同的名称重新定义乳胶宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当前我使用的是\mytodo macro
,它仅调用\todo[inline]
:
Currently I use a \mytodo macro
, which just calls \todo[inline]
:
\newcommand{\pbtodo}[1]{\todo[inline]{#1}}
但是我想将此宏称为\todo
.最简单的解决方案:
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].
有人知道重新定义旧版\todo
宏的方法吗?
Does anyone know a way to use the old \todo
macro in a redefinition?
推荐答案
我经常在网上查看建议,其内容如下:
\let\Oldtodo\todo
\renewcommand{\todo}[1]{\Oldtodo[inline]{#1}}
在这种情况下.我相信\let
是TeX的普通功能.
for this situation. I believe that \let
is a plain TeX feature.
这篇关于使用相同的名称重新定义乳胶宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文