[texhax] How to prevent page break in description environment item
Moritz Sichert
moritz.sichert at googlemail.com
Sat Oct 31 14:26:24 CET 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://tug.org/pipermail/texhax/attachments/20151031/5a84b6c5/attachment.bin>
More information about the texhax
mailing list