I'm typesetting a large document (phdthesis) with pdflatex and I'm using KOMAscriptand the scrreprtdocument class.

I was very surprised as I saw a heading (\subsubsection) standing at the bottom of a page without any text below! This is really bad style and it seems to happen to others also (see How can one keep a \section{} from being at the end of a page in LaTeX? and Avoiding page breaks shortly after section/subsection headings), but in my case the pagebreak is directly after the heading - there are not even 2 lines of text attached...

It seems to have to do with the many and big floats in this chapter and I think I'll have to adjust that manually, when the text is complete and editing is finished.

However, I wonder if pdflatex should not at least print a warning about that in the log file (I could not find any warnings concerning that), if it feels impelled to do such ugly things... And I use the \raggedbottom-option (as I also had problems with very big spacing between large paragraphs), so I had hoped that this would avoid such "orphans".

setting the penalties to 1000 did not change anything:


---------- edit:

I now know where it comes from, but not how to avoid it:
I have defined a command to quickly add fixmenotes to the document with \N{Note}
It is defined as \newcommand{\N}[1]{\fxfatal*[inline=true,nomargin]{/#1/}{}}

... and I used it directly after the problematic section command like:

\subsubsection{Title of the section}
\N{note about what to change in that section later} And now starts the normal text of the section...

If I move the note \N{...} to another place, e. g. after the first sentence of the section, the pagebreak is before the section title.

Question: Is there anything I can do to redefine the \N{} command to avoid that behavior?

It would be difficult to construct a minimal example in this case, so my question is:
1) why is there no warning? 2) I would consider a lonely heading much worse than a page which has some empty white space at the bottom - how can I make pdflatex "know" that?

My preamble has become quite complex with the time - I have left out all "simple" newcommands etc. and tried only to keep things which might interfere with my questions:

\documentclass[11pt, a4paper,  
twoside, autooneside,
headinclude, footexclude, 
liststotoc, bibtotoc,
tablecaptionabove, noonelinecaption, headsepline, halfparskip 




\usepackage[UKenglish, ngerman]{babel} 
\usepackage[TS1, T1]{fontenc}
\usepackage[ngerman, iso]{isodate}
\usepackage[caption=false, format=hang]{subfig} 

\cfoot{\footnotesize Rev.~\svnrev{} (\svnfilerev) \\vom \svnyear-\svnmonth-\svnday \ \svnhour:\svnminute:\svnsecond} 
\ifoot{\footnotesize erstellt:\\\today{} \currenttime} 




\usepackage[numbers, sort&compress]{natbib} 


\fxsetup{theme=color, inline, targetlayout=color, author=} 


\deffootnote[1em]{1em}{1em} {\textsuperscript{\thefootnotemark} }



% Alter some LaTeX defaults for better treatment of figures:
%Quelle: http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html
    % See p.105 of "TeX Unbound" for suggested values.
    % See pp. 199-200 of Lamport's "LaTeX" book for details.
    %   General parameters, for ALL pages:
    \renewcommand{\topfraction}{0.9}    % max fraction of floats at top
    \renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
    %   Parameters for TEXT pages (not float pages):
    \setcounter{totalnumber}{4}     % 2 may work better
    \setcounter{dbltopnumber}{2}    % for 2-column pages
    \renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
    \renewcommand{\textfraction}{0.07}  % allow minimal text w. figs
    %   Parameters for FLOAT pages (not text pages):
    \renewcommand{\floatpagefraction}{0.8}  % require fuller float pages
    % N.B.: floatpagefraction MUST be less than topfraction !!
    \renewcommand{\dblfloatpagefraction}{0.8}   % require fuller float pages
    % remember to use [htp] or [htpb] for placement
  • @Martin: I have shorten the title. I hope you don't mind. Please keep title short and meaningful. Mar 30, 2011 at 9:43
  • @ Martin Scharrer: you're the expert. :-) IMHO meaning also has to do with detail. Should we add a hint to the problem in the title like "caused by command after section", now that its solved? Mar 30, 2011 at 10:04

1 Answer 1


If there is a page break in your document this means that something in your code allows or asks for it. So why should pdflatex complain? It is only executing your code.

Last time that I saw this problem it was due to color commands in the section title (but it shouldn't happen in new KOMA versions). So try at first to remove the color commands from your \setkomafont{sectioning}.

Another possibility is that the text behind the title allows the page break. E.g. longtables could be a problem. In this case the package needspace can help.

  • wow, thanks for your quick reply! I removed the color command (that left: \setkomafont{sectioning}{\normalfont\bfseries}) and even commented out the complete line, but no change. Mar 30, 2011 at 9:36
  • @ Ulrike: "the text behind the title allows the page break" good point -> see my edit in the question. How can I avoid that by changing the command \N{}? Mar 30, 2011 at 9:47
  • 2
    You could try to put text and so start the paragraph before the fixme command. E.g. \newcommand{\N}[1]{\mbox{}\fxfatal*[inline=true,nomargin]{/#1/}{}} Mar 30, 2011 at 9:50
  • thanks - that seems to do the trick! Interestingly, by "adding text" the number of pages in my document decreased by one (to 196). ;-) This change also seems to affect other pages, as I have lots of those notes Mar 30, 2011 at 10:00
  • unfortunately I found a side effect with the '\mbox'-solution: tex.stackexchange.com/questions/15240/… Can you help? Apr 7, 2011 at 14:46

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.