I know that, whenever I want to see how some control sequence, say \mycontrolsequence, is defined, I can use
\show\mycontrolsequence
then compile my code and look up the .log file. However, robust commands seem impervious to \show. For instance, if I compile the following code,
\documentclass{article}
\newcommand\mycommand{foo}
\show\mycommand
\DeclareRobustCommand{\myrobustcommand}{bar}
\show\myrobustcommand
\begin{document}
hello
\end{document}
my log file contains
\mycommand=\long macro: ->foo. l.4 \show\mycommand\myrobustcommand=macro: ->\protect \myrobustcommand . l.7 \show\myrobustcommand
Note that, whereas the definition of \mycommand is exposed (foo), nothing transpires of \myrobustcommand's definition.
Of course, in practice, I could always identify in which file a given robust command is defined and look up its definition there. However, finding the file in question may not be obvious. Hence my question:
Is there an alternative way of peering into the definition of a robust command?
\usepackage{xpatch}\xshowcmd\mycommand– egreg Jun 01 '13 at 16:51xpatchpackage. That's cheating, egreg: you're the maintainer of that package :p Your comment answers my question completely. Do you want to post it as an answer? – jub0bs Jun 01 '13 at 16:55