Apologized for my unclear description. I wish I could explain my problem more clearly.
In document, I wish I can just write something as
"how to use \cmd \mbox in xxx" or "what is \cmd minipage xxx".
The string with/without \ is the argument of \cmd. \cmd reads
token until meeting space or .,; (any char except a-zA-Z)
Following \def
taking next word as argument? I can try to do this.
Next, in the definition of \cmd
, I wish there's a variable to store the string (without \
), that is, \def\cmd#1{\def\A{} xxx}
, then \A
would store {mbox}
(without \
) or {minipage}
. So I can use \A
in index
/toc
/ etc.
I'm trying to write a manual of some commands of LaTeX (in Chinese). So, it's more easily to maintain the code by this way. (I use \verb
and others to do this. But it becomes more and more difficult to maintain the code now).
So, I hope I can just type
"even though you specify \cmd \pagestyle to force an empty xxx"
rather than "even though you specify \bscmd{mbox} to force xxx"
(\bs for backslash) and "even though you specify \cmd{minipage} to
force xxx" (\cmd for normal none-backslash)
Then, because of index
/hyperref
/footnote
/etc, so I need something stores \mbox
or minipage
.