[texhax] Problem with vertical alignment in beamer with itemize and columns

Susan Dittmar Susan.Dittmar at gmx.de
Wed Mar 31 16:07:01 CEST 2010


Dear Thomas,

Uwe Lück put together what you need for another version of the list
enviroment (see Mail concerning \blockquote on March 25th). Problem is 
\topsep which is not zero in itemize environments. I adjusted your example
to use his code (see below). If you use nesting lists, you will have to
check whether you need to redefine their internals aswell.

Hope that helps,

	Susan

\documentclass{beamer}
\makeatletter	% use @ as another normal letter (as in style files)
% Environment MYitemize behaves like itemize but with \topsep 0pt and
% \partopsep 0pt. From an e-mail to texhax at tug.org by Uwe Lück
% (uwe.lueck at web.de).
\newenvironment{MYitemize}{%
  \topsep=\z@
  \partopsep=\z@
  \def\@listi{\leftmargin\leftmargini \parsep\z@ \topsep\z@ \itemsep\z@}
  \let\@listI\@listi
  \itemize
}{%
  \enditemize
}
\makeatother	% back to normal usage of @
\begin{document}
   \begin{frame}[t]    % note the alignment on this slide is all top aligned
   \begin{columns}[t]
      \begin{column}{0.5\textwidth}
          item baasdfasf \\
          item baasdfasf \\
          item baasdfasf \\
          item baasdfasf
      \end{column}
      \begin{column}{0.5\textwidth}
          item baasdfasf \\
          item baasdfasf \\
          item baasdfasf \\
          item baasdfasf
      \end{column}
   \end{columns}
   \end{frame}

   \begin{frame}[t] % note on this slide the second column come out below the first
   \begin{columns}[t]
      \begin{column}{0.5\textwidth}
        \begin{MYitemize}
          \item baasdfasf
          \item baasdfasf
          \item baasdfasf
          \item baasdfasf
        \end{MYitemize}
      \end{column}
      \begin{column}{0.5\textwidth}
        \begin{MYitemize}
          \item baasdfasf
          \item baasdfasf
          \item baasdfasf
          \item baasdfasf
        \end{MYitemize}
      \end{column}
   \end{columns}
   \end{frame}
\end{document}




More information about the texhax mailing list