TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 8 down vote accepted
share|improve this answer
Does this mean this question is a duplicate of tex.stackexchange.com/q/4790/4012? – doncherry Nov 1 '11 at 16:50
The general question is indeed a duplicate, but there also two specific tasks discussed here which makes the question IMHO valid to be on its own. – Martin Scharrer Nov 1 '11 at 18:13

To add some information regarding a local version of \g@addto@macro:

  • KOMA-Script classes define \l@addto@macro as a local version.

  • While \gappto from etoolbox works like \g@addto@macro, a local version is \appto. Prepending versions have been mentioned by Martin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.