Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

{expansion} is about expanding tokens, including the manipulation of expansion order and the suppressing of expansion.

(La)TeX has a macro programming language that expands the macros to their definitions. Only TeX primitives for the direct typesetting, boxing and assignments are not expandable, but must be executed by TeX. In advanced macros the order of expansion must sometimes be changed, content must be fully expanded or certain macros must not be expanded until later.

Often used TeX macros for this are:

  • \expandafter
  • \noexpand
  • \edef and its global form \xdef
  • \unexpanded (e-TeX)
history | excerpt history