With texdef it is easy to find definitions for (La)TeX commands. It can show what a definition for a given command is. For instance if I issue texdef -t latex \LaTeX I get the following definitions:
\LaTeX:
macro:->\protect \LaTeX
\LaTeX :
\long macro:->L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.15em\TeX
A problem is that the latter is very hard to read because it is just one long line. In the source it is easier to read because it is indented. It reads:
\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
{\sbox\z@ T%
\vbox to\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
A}%
\vss}%
}%
\kern-.15em%
\TeX}
Is it possible to make texdef return indented definitions?
Indented definitions are much easier to read. Also, indented definitions are preferable if you want to use them as a base for a redefinition because you do not have to indent them yourself to be able to efficiently work with them.
texdefis a simple tool. So the easiest way is to write a new script which uses the functionality ofgrep,texdef(maybefind). – Marco Daniel Feb 4 '12 at 10:57texdefuses\meaningfrom TeX, not the actual definition text in some file. – egreg Feb 4 '12 at 10:57