[texhax] List of Examples
Uwe Lueck
uwe.lueck at web.de
Fri Sep 25 12:40:07 CEST 2015
On Freitag, 25. September 2015 um 00:42 Uhr, DPC a écrit :
UL >> it seems to be very difficult to avoid a page break after a header paragraph,
DPC > Just call the latex macro \@afterheading which will handle suppressing page breaks
\@afterheading in latex.ltx, \@xsect, /follows/ the \vskips that frightened me.
However, I see there and with \showlists, that \par\nobreak protects next \vskips,
it /precedes/ next \parskip. TeXbook p. 262: "Then comes `\noindent', which
causes TeX to go into horizontal mode and to emit \parskip glue."
@Bob: \vskip in horizontal mode (with no \vadjust{\nobreak}) creates a
possible breakpoint.
Through this thread, I have realized that a low-level heading construction
of my own in an ongoing project allowed a page break immediatly after.
Cheers,
Uwe.
\ProvidesFile{sechdbrk.tex}[2015/09/25 dem. pbrk. after sechd.]
\documentclass{article}
\begin{document}
\tracingonline=1 \showboxdepth=0 \showboxbreadth=10
{\large A %% attempt to format heading at low level
% \par %% uncomment to get vertical \penalty 10000
\nobreak
\vskip3.333pt } %% ensures vmode without earlier \par,
%% including \large \baselineskip
\makeatletter \@afterheading B \par \showlists
\end{document}
More information about the texhax
mailing list