3

The code below give a strange result when I comment out the \begingroup end \endgroup: the quotation environment has different vertical space to the text before ("Some text").

What is it that chapter defines that the quotation environment behaves different?

\documentclass{book}
\parindent 0pt
\begin{document}

%\begingroup  % <--- remove 
\chapter{abc}
%\endgroup    % <--- remove

Some text

\begin{quotation}
quotation with(out) vertical distance to the previous text
\end{quotation}

\end{document}

1 Answer 1

4

LaTeX section headings locally redefine \everypar to remove indentation in the first paragraph so if you put them in a group things will go wrong.

Also, in particular it causes \if@nobreak to be true rather than false just before the quotation, which makes the latex list code take a different path.

3
  • I see something like @afterheading. That makes sense. Inserting \@afterheading after my \endgroup fixes the problem. Thanks!
    – topskip
    Sep 7, 2012 at 11:27
  • 1
    Couldn't you just not group your heading, that would be safer;-) Sep 7, 2012 at 11:33
  • This is code I inherited from a grand master of TeX with so many complex definitions. I don't dare to change the definition, there must be something behind it. I have now added \@afterheading after the \endgroup in the hope that it has no bad effect.
    – topskip
    Sep 7, 2012 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .