[texhax] List of Examples (page break?)

bnb at ams.org bnb at ams.org
Fri Sep 25 23:15:56 CEST 2015


    i wrote:
    > all very well, but is there a way to
    > avoid a page break when the next bit
    > after the heading is \begin{enumerate}
    > or one of its kin?
    
uwe lueck answered:

    Isn't current LaTeX such a way? I have 
    studied some code (\if at nobreak), and
    \showlists doesn't show a possible breakpoint:

    \ProvidesFile{sechdbrk.tex}[2015/09/25 v3 dem. pbrk. after sechd.]
    \documentclass{article}
    \begin{document}
      \tracingonline=1 \showboxdepth=0 \showboxbreadth=10
      {\large A \par}  \nobreak
      \makeatletter    \@afterheading
      \begin{itemize}  \item B   \par  \showlists
      \end  {itemize}
    \end{document}

    Or do you have a counterexample?

indeed, that works, but here's the
situation i'm faced with:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\begin{document}
text at top of page\par
\vspace{30\baselineskip}
some more text\par
\vspace{12\baselineskip}
\begin{theorem} $ $ % something to get into horizontal mode
%                   % to avoid list starting on same line
\begin{itemize}
\item xxxx
\item yyyy
\end{itemize}
\end{theorem}

\end{document}

			--------------------

usually, the text of a theorem is
expected to start on the same line as
the header, but some authors insist
on starting with a list.  and that
can leave the header by itself at the
bottom of a page.
					-- bb


More information about the texhax mailing list