Is it possible to define a list environment where each item has a user-specified amount of space below it? I'm looking for something to the effect of
\begin{myitemize}
\item[1in] One
\item[.5in] Two
\item[2in] Three
\end{myitemize}
Some text...
In the compiled document, there should be 1 in of space between "One" and "Two", .5 in between "Two" and "Three", and 2 in between "Three" and "Some text".
My best attempt so far resembles
\documentclass{article}
\newlength{\itemspace}
\let\olditem\item
\newenvironment{myitemize}{
\setlength{\itemspace}{0in}
\begin{itemize}
\renewcommand{\item}[1][0in]{
\vspace{\itemspace}
\olditem
\setlength{\itemspace}{##1}}
}{
\vspace{\itemspace}
\end{itemize}
}
\begin{document}
Some text
\begin{myitemize}
\item[0in] Foo\underline{\hspace{4.3in}}
\item Bar
\item Baz
\end{myitemize}
Some other text
\end{document}
The problem shows up in the first item. With 0in specified, the spacing between Foo and Bar should be the same as the spacing between Bar and Baz. However, I get something like this:
The problem seems to be that the length of the first line is exactly the maximum line width. Adding the vspace afterwards seems to be also add a small amount of horizontal space, forcing TeX to start a new line before the next item. Shortening the hspace to only 4.2in causes the extra line to disappear.
Edit: For an even simpler example of my problem,
\begin{itemize}
\item Foo\underline{\hspace{4.3in}}\vspace{0in}
\item Bar
\item Baz
\end{itemize}
has no extra line, but
\begin{itemize}
\item Foo\underline{\hspace{4.3in}}
\vspace{0in}
\item Bar
\item Baz
\end{itemize}
does. Why does this happen?
\vspace{1in}\item One \vspace{xx} \item two
? – David Carlisle Jan 27 '16 at 10:37horizontal space is most likely due to you not using
%` at ends of lines so adding white space (also you should have a \par or blank line before vspace. – David Carlisle Jan 27 '16 at 23:29