[luatex] Refuses to page break between section headings

Reinhard Kotucha reinhard.kotucha at web.de
Mon Mar 9 21:27:13 CET 2015


On 2015-03-09 at 18:24:57 +0100, luigi scarso wrote:

 > On Mon, Mar 9, 2015 at 5:28 PM, Jonas Olson <jolson at kth.se> wrote:
 > 
 > > Den 2015-03-09 16:35, Ulrike Fischer skrev:
 > >
 > >> But imho the source of your problem is the misuse of \section. Why
 > >> are you using it if you actually don't want a section title? Why
 > >> don't you define a command that is more suitable?
 > >>
 > >
 > > I don't really know enough to construct a suitable command myself,
 > > especially things like adding a vertical space above the heading iff it is
 > > not the first thing on the page, and adding a vertical space below the
 > > heading iff it has a text body.
 > >
 > > Jonas
 > >
 > something like this ?
 > \documentclass[]{article}
 > 
 > \begin{document}
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 [....]
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 > \section{A}\vfill\eject
 > 
 > \end{document}

Well, as far as I understand Jonas, not all sections are empty.  But
if there are too many empty sections on one page, no pagebreak occurs
and you get a big overfull \hbox.  Thus, I suppose that DPC's
suggestion to insert pagebreaks manually (\clearpage) is an
appropriate solution.

Ulrike, the reason Jonas [ab]uses \section is because this macro
contains discardable vertical space i.e., the space above the section
header disappears if the section begins at the top of a page.  This is
exactly what Jonas wants, hence using \section is appropriate.

Writing a dedicated macro is certainly possible.  But unless the
document is large or has to be revised in the future, inserting
\clearpage manually where needed makes sense.  I suppose that Jonas
needs a solution soon and is not interested in an everlasting reseach
project.

Jonas, does \clearpage, as suggested by David, solve your problem?

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the luatex mailing list