[texhax] How to prevent page break in description environment item
Alan Litchfield
alan at alphabyte.co.nz
Sat Oct 31 19:48:08 CET 2015
Hi,
Put \newpage{} at the end of the prior description item.
\begin{description}
\item[first item] \hfill \\
Description of first item \newpage{}
\item[second item] \hfill \\
Description of second item
\end{description}
HIH
Alan
On 1/11/15 2:26 am, Moritz Sichert wrote:
> Hi,
>
> I have this code:
>
> \begin{description}
> \item[first item] \hfill \\
> Description of first item
> \item[second item] \hfill \\
> Description of second item
> \end{description}
>
>
> And it generates something like this:
>
> First Item
> Description of first Item
> Second Item
> -------- PAGE BREAK ----------
> Description of second item
>
>
> How can I prevent the page break between the title of an item and its
> description?
>
> I tried adding \nopagebreak after \descriptionlabel like this:
>
> \let\orig at descriptionlabel\descriptionlabel
> \renewcommand*{\descriptionlabel}[1]{\orig at descriptionlabel{#1}\nopagebreak}
>
> But that didn't change anything. Adding \nopagebreak around the second
> item in the code also didn't prevent the break.
>
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
--
Dr Alan Litchfield
AlphaByte
PO Box 1941
Auckland, New Zealand 1140
More information about the texhax
mailing list