Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
I see something like @afterheading. That makes sense. Inserting \@afterheading after my \endgroup fixes the problem. Thanks! –  topskip Sep 7 '12 at 11:27
1  
Couldn't you just not group your heading, that would be safer;-) –  David Carlisle Sep 7 '12 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 '12 at 11:38
add comment

Your Answer

 
discard

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.