0

Is it possible to have an environment like {itemfill} that would behave something like \begin{itemize}[itemsep=\fill] from the enumerate package, so that, in the imaginary code sample:

\documentclass{mwe}
\newenvironment{itemfill}{ %%What goes here?
    }{}
\begin{document}
\begin{itemfill}
\item A1
\item A2
\end{itemfill}

\begin{itemfill}
\item B1
\item B2
\item B3
\end{itemfill}
\end{document}

each {itemfill} environment would occupy about half the page, with approximately one half of the vertical space on the page between A1 and A2, and approximately one quarter of the vertical space on the page between each consecutive pair of B1, B2, and B3?

(In this particular example, I could do

\documentclass{mwe}
\begin{document}
\begin{itemize}
\item A1
\vfill\vfill
\item A2
\end{itemize}

\begin{itemize}
\item B1
\vfill
\item B2
\vfill
\item B3
\end{itemize}
\end{document}

but I want the counting done automatically for me. By comparison, \begin{itemize}[itemsep=\fill] puts approximately equal space between each pair of items, with no concern for their semantic grouping, so that there would be roughly one third of the vertical space between A1 and A2, and roughly one third between each consecutive pair of B1, B2, and B3.)

4
  • You can create proportional glue using something like \advance \itemsep by 0pt plus 2fil Commented Jan 23, 2022 at 1:11
  • @JohnKormylo, thanks! And of course that's better than my repeated \vfill solution. But it still requires me to count manually. I'd like a way to say "allot this unit as much vertical space as if I'd said \vfill when comparing it to other glue on the page, but allocate that vertical space equally among however many items are in the list."
    – LSpice
    Commented Jan 23, 2022 at 1:50
  • 1
    You might find tex.stackexchange.com/questions/230464/… interesting. Commented Jan 23, 2022 at 14:45
  • I will have a look at that, although it seems likely to take some time to digest. Thank you for the link.
    – LSpice
    Commented Jan 24, 2022 at 0:30

0

You must log in to answer this question.

Browse other questions tagged .