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

If you test the following minimal it does not produce an error. What does it actually do?


Why doesn't it produce an error as one would expect?

share|improve this question
The default value of \everypar is empty. It's a token list internal register. – egreg Nov 6 '11 at 15:22
@MarcoDaniel Since you were the fastest don't you want to put that as an answer? – Yiannis Lazarides Nov 6 '11 at 15:29
@YiannisLazarides: I deleted my comment. The honor goes to 40k egreg ;-) – Marco Daniel Nov 6 '11 at 15:45
up vote 26 down vote accepted

\everypar is a token list register, so its value is assigned by


Its default value in Plain TeX is empty.

What's for? Its contents is delivered into the token list TeX is reading when it switches from vertical to horizontal mode. This happens when TeX, in vertical mode, sees a horizontal command, for instance a character to be typeset or \indent or \noindent.

At that time the horizontal command is set aside; before examining it again, TeX contributes \parskip glue to the vertical list and goes into horizontal mode; now it delivers the contents of \everypar as if \the\everypar was implicit and reexamines the horizontal command that forced the switch to horizontal mode. However the switching to horizontal mode caused by a horizontal command other than \noindent causes TeX to insert an empty box of width \parindent before the contents of \everypar.

One can use \everypar to perform automatically some job at paragraph start, for example to number them.

LaTeX exploits heavily this mechanism, so it's not recommended to play with it when the job involves lists. An example is the declaration


that is in force until \begin{document} is processed; \@nodocument issues the error message Missing \begin{document} in order to warn the user that text starting a paragraph has been found in the preamble.

As all token registers, its value can be augmented by


since \the\everypar will deliver the current register's contents.

share|improve this answer
I want to add, there are other tokens like \everymath, \everycr, \everydisplay, \everyvbox, \everyhbox – Marco Daniel Nov 6 '11 at 16:37
@egreg Great answer thanks. – Yiannis Lazarides Nov 6 '11 at 19:06

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.