How to make a list of unbreakable items?
This is how I would do it:
\newenvironment{block-itemize}{%
\itemize
\let\olditem\item
\let\closepage\relax
\renewcommand\item[1][]{%
\closepage\olditem[#1]\minipage[t]{\linewidth}%
\let\closepage\endminipage
}%
}{%
\closepage
\enditemize
}
Then you write
\begin{block-itemize}
\item \lipsum[1]
\item \lipsum[2]
\end{block-itemize}
And a short explanation: When it starts, the environment begins a regular \itemize
and then saves the usual definition of \item
into \olditem
. Then \item
is redefined so that: (1) it closes the “previous” minipage (2) it starts a regular item (using \olditem
) and (3) it opens a new minipage. Of course, for the very first item there is no minipage to close, that's why \closepage
is first defined as \relax
(do nothing) but it is then redefined to \endminipage
right after the first use of \item
. The end of the environment simply closes both the last minipage and the itemize environment.
Note: Actually, I would use something like \my@olditem
and \my@closepage
and throw the whole definition into a style file so that I don't accidentally redefine commands from another package. But I wanted to keep the code above somewhat clean without all those @
's lying around.
This is a response to a comment on Juan's answer.
It's a modified version of his suggestion that works with description
environments.
% ==========================================================
% Adapted from TeX.StackExchange.com user Juan A. Navarro's
% solution for itemize as seen at
% https://tex.stackexchange.com/a/4493/327
% ----------------------------------------------------------
\newcommand\myitem[1][]{%
\closepage\item[#1]\minipage[t]{\linewidth}%
\let\closepage\endminipage%
}
% ----------------------------------------------------------
\newenvironment{block-description}{%
\description
\let\olditem\item
\let\closepage\relax
%\def\item[1][]{\myitem}[1]
}{%
\closepage
\enddescription
}
I don't like having the item definition live outside the environment like that, but the variations that I tried with it inside all failed and I don't know enough to fix it.
Application looks like
\begin{block-description}
\myitem[Week 1] Aug. 18--22 \\
\begin{tabular}{lp{2.5cm}p{7.5cm}}
& Reading & Topic and notes \\
\hline
Mon. & & Intro; administriva; pretest\\
Tue. & \\
Wed. & 18.1--18.5 & Electrostatics; Coulombs law \\
Thu. & \multicolumn{1}{r}{\textbf{Activity day:}} &
sticky electrostatics \\
Fri. & & Electrostatic force and multiple
charges
\end{tabular}
\myitem[Week 2] Another table for the next week
\myitem[Week 3] Yet another table for the third week
\begin{block-description}
Each week appears in its entirety on one page or the other never broken.
Here's a frill that came up today: to enable real footnotes in this context use something like
\NewDocumentCommand\myfootnotetext{o +m}{% One optional and one long mandatory argument
\closepage% End the current item so that we are outside of
% minipage context
\IfNoValueTF{#1}
{\footnotetext{#2}}
{\footnotetext[#1]{#2}}% Call \footnotetext either with or
% without the optional argument
\let\closepage\relax% Re-define \closepage so that the next
% \myitem won't break when it tries \closepage
}
which requires \usepackage{xparse}
. Then you can issue \footnotemark
inside an item and \myfootnotetext
at the bottom of that item and the footnote will appear at the bottom of the page (modulo pathological cases when it can't be placed properly, of course).