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

In my answer to a question on page breaking, I used a private switch that the user had to set by hand to prevent tables which start just after a section from breaking (at the first line).

It seems that \@nobreaktrue is set after each heading, and restored as soon as the next paragraph begins (see definition of \@afterheading).

Is this the only place where \if@nobreak is altered? Am I right that the intent of this switch is to indicate places where macros should avoid at all costs to insert page breaks?

share|improve this question
up vote 10 down vote accepted

From source2e:

\if@nobreak Switch used to avoid page breaks caused by \label after a section heading, etc. It should be GLOBALLY set true after the \nobreak and globally set false by the next invocation of \everypar. Commands that reset \everypar should globally set it false if appropriate.

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.