2

I am trying to create a simple outline document (based on scrbook), that contains just headings (chapter, section, ...) and a few notes inbetween. For that, I removed the clearpage before a new chapter, and adjusted the heading spacings with the titlesec package. Later, I'll comment out the modification and flesh out the outline to be the final document.

I's looking pretty good so far, but Latex insists in inserting rubber between paragraphs and before and after sections. Setting \raggedbottom fixed that, but I still get some section headings pushed to the next page, although there would be enough space on the current page.

I'd like it to put as much text as possible on the current page, even if the page ends with a heading. I tried

\widowpenalty=0
\clubpenalty=0

but that didn't have any effect. What can I try?

7
  • Sounds like you're trying to create a table of contents. You could create a fictitious document via \includeonly{<filename>}. This file contains chapter and subsections but your final document need only show the table of contents. Otherwise, why doesn't just using nested lists suit your purpose?
    – A.Ellett
    Nov 26, 2012 at 14:31
  • Did you try adding also \makeatletter\@clubpenalty=0 \makeatother?
    – egreg
    Nov 26, 2012 at 14:37
  • @A.Ellett: That's what I tried first, just creating the table of contents. However, I want to have some arbitrary text (comments) between the headings. Also, I want to be able to "flesh out" the comments and then have my proper document; writing lists in latex is cumbersome, and I'd have to rewrite the outline with sections afterwards anyway.
    – jdm
    Nov 26, 2012 at 14:44
  • @egreg: That didn't work, unfortunately.
    – jdm
    Nov 26, 2012 at 14:48
  • @lockstep: The solution you posted (concerning nobreak) worked, why did you delete it? If you post it again, I could accept it. I'm also wondering if there is a cleaner way to do it, e.g. with something like \patchcmd{\section}{...}, that really only affects the section headers.
    – jdm
    Nov 26, 2012 at 15:00

1 Answer 1

3

I believe that adding this to your header should solve the problem:

\usepackage[compact]{titlesec}
\renewcommand{\bottomtitlespace}{0pt}

For more details, see Section 3.3 of the package documentation.

1
  • Can you provide an example? I may be misreading the titlesec documentation, but it says this: "A simple ragged bottom on the page before is obtained with a value of 0 pt". That doesn't say the title won't go to the next page, right?
    – Clément
    Nov 6, 2016 at 16:31

You must log in to answer this question.

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