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?


1 Answer 1


\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.

  • 8
    I want to add, there are other tokens like \everymath, \everycr, \everydisplay, \everyvbox, \everyhbox Nov 6, 2011 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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