QUESTION
Here are a few cases in which one could use such a list:
- Is there a "prepend" version of
\g@addto@macro? A "local" version? - What's the most efficient way of gobbling n characters?
- Can I use LaTeX's internal macros to define my own starred commands?
etc.
ANSWER
-
The
etoolboxgives you local and global prepending macros\preto,\gpreto,\epretoand\xpreto. -
I would say use a version of
\@gobblewhich takes n arguments. If you need to gobble more than 9 characters/tokens let the first macro expand to a second gobble macro. See Benchmarking various operations of TeX for an discussion about this. -
Yes, sure you can, see macros2e in Documentation reference for LaTeX internal commands? for a list of useful internal macros.