Graphics, Figures & Tablesnobreak on items

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
Zetison
Posts: 17
Joined: Fri Dec 02, 2011 2:05 pm

nobreak on items

Post by Zetison »

I want the environment itemize to avoid all breaks of \items.

The following code

Code: Select all

\documentclass[10pt,a4paper]{report}
\usepackage{blindtext}
\begin{document}
        \blindtext\blindtext\blindtext
        \begin{itemize}
        	\item \blindtext
        	\item \blindtext
        	\item \blindtext
        \end{itemize}
\end{document}
breaks the second item over two pages. How can I avoid that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

nobreak on items

Post by cgnieder »

You can put the contents of the items in a \parbox. A \parbox cannot be broken.

Code: Select all

\documentclass[10pt,a4paper]{report}
\usepackage{blindtext}
\begin{document}
\blindtext\blindtext\blindtext
\begin{itemize}
  \item \parbox[t]{\linewidth}{\blindtext}
  \item \parbox[t]{\linewidth}{\blindtext}
  \item \parbox[t]{\linewidth}{\blindtext}
\end{itemize}
\end{document}
Regards
site moderator & package author
Post Reply