[Tex/LaTex] parbox + itemize = empty space

boxesitemizevertical alignment

Consider the following MWE

\documentclass[12pt,a4paper]{article}
\begin{document}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text:

\parbox[t][][t]{\textwidth}{

\begin{itemize}
 \item More Text More Text More Text More Text More Text More Text More Text More Text More Text 
\item  More Text More Text More Text More Text More Text More Text More Text More Text More Text 
 \end{itemize}}

 \vspace{2cm}

 Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text:


\begin{itemize}
 \item More Text More Text More Text More Text More Text More Text More Text More Text More Text 
\item  More Text More Text More Text More Text More Text More Text More Text More Text More Text 
 \end{itemize}
\end{document}

How can I remove the space that appears between "Text Text.." and the first bullet containing "More Text…" when using parbox and itemize so that it looks just like below, when using only itemize.

(I have good reasons to use parbox not illustrated by this MWE, so telling me to just use itemize to solve my problem isn't a solution 🙂

Best Answer

The paragraph indentation is added to the left of the \parbox. It can be suppressed with \noindent. The vertical space can be corrected:

  • \nointerlineskip removes the line skip (default: 1pt) that is added because of the large \parbox (without t).

  • \prevdepth that shows the depth of the previous box is saved and restored at the beginning of the \parbox. Then environment itemize sees the same \prevdepth in both cases.

\documentclass[12pt,a4paper]{article}
\newdimen\savedprevdepth

\begin{document}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text:

\setlength{\savedprevdepth}{\prevdepth}
\nointerlineskip
\noindent
\parbox{\textwidth}{
  \setlength{\prevdepth}{\savedprevdepth}
  \begin{itemize}
    \item More Text More Text More Text More Text More Text More Text More Text More Text More Text 
    \item  More Text More Text More Text More Text More Text More Text More Text More Text More Text 
  \end{itemize}%
  \global\savedprevdepth\prevdepth
}

\prevdepth=\savedprevdepth

Some Text

\vspace{2cm}

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text:

\begin{itemize}
  \item More Text More Text More Text More Text More Text More Text More Text More Text More Text 
  \item  More Text More Text More Text More Text More Text More Text More Text More Text More Text 
\end{itemize}

Some Text
\end{document}

Result

Related Question