There are two things going on in this situation. For those who know about LaTeX's list parameters, there is a \topsep
being added before the itemize list. The other is
that this item is starting in vertical mode, so a \partopsep
is also being added.
We thus need to do two things in this situation: (1) set \topsep
to zero for the list, via a redefinition \@listi
, and (2) clear \partopsep
.
The best way to do this is to add this to block begin
template. Here is an example, based on the essentials of your code.
\documentclass[10pt]{beamer}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usetheme{default}
\usecolortheme{crane}
\setbeamertemplate{itemize items}[square]
\setbeamercolor{item}{fg=black}
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{block title}{fg=black}
\setbeamercolor{title}{fg=black}
\setbeamercolor{block body}{bg=white}
\makeatletter
\addtobeamertemplate{block begin}{
\def\@listi{\leftmargin\leftmargini
\topsep 0pt
\parsep 0pt
\itemsep 3pt plus 2pt minus 3pt}
\partopsep 0pt
}
\makeatother
\begin{document}
\begin{frame}
\frametitle{text vs. item blocks}
\begin{columns}[t]
\begin{column}{0.42\textwidth}
\begin{block}{text block}
block block block block block\vadjust{\hrule}
block block block block block
block block block block block
block block block block block
\end{block}
\end{column}
\begin{column}{0.48\textwidth}
\begin{block}{item block}
\begin{itemize}
\item item\vadjust{\hrule}
\item item
\item item
\end{itemize}
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}
I have placed the blocks side-by-side and added the \vadjust{\hrule}
for illustration purposes. The values for \@listi
are based on beamers defaults which are
\def\@listi{\leftmargin\leftmargini
\topsep 3\p@ \@plus2\p@ \@minus2.5\p@
\parsep 0\p@
\itemsep3\p@ \@plus2\p@ \@minus3\p@}
\partopsep
has default value
2.0pt plus 1.0pt minus 1.0pt
If you want the individual lines to match up, then you should also put \itemsep
equal to 0pt
in the above code.
Beaware that if the titles of the two blocks have different heights/depths then theh body will move accordingly and you will loose your alignment again. You can cover yourself a little by adding an appropriate strut to your block titles.
Note that the above code also kills \topsep
for subsquent uses of itemize
within the same block. If this is a problem, you might try to just adjust \partopsep
to cancel out \topsep
and ensure that your subsequent lists in the block do not start in vertical mode.
You do need to tell beamer
what you want to appear in each frame of the handout
version. You can use \onslide
specifications to do this so that you do not need to modify the existing overlay specifications at all. (I'm not sure this is what you want - probably not.)
The following code modifies your MWE so that, in presentation
mode, there would actually be 10 slides within the frame. These are then placed on slides 1 or 2 of the handout
. This is a waste of code: if you only want to show slide 5 and slide 10, you do not need two \againframe
but only one. But, anyway, with the two:
\documentclass[handout]{beamer}
\begin{document}
\begin{frame}<1-| handout:0>[label=foo]{My only frame}
\begin{enumerate}[<+->]% or whatever you like for presentation mode
\onslide<1-| handout:1-2>
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\onslide<1-| handout:2>
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\end{enumerate}
\end{frame}
\againframe<0| handout:1>{foo}
\againframe<0| handout:2>{foo}
\end{document}
More efficiently with only one repeat:
\documentclass[handout]{beamer}
\begin{document}
\begin{frame}<1-| handout:1>[label=foo]{My only frame}
\begin{enumerate}[<+->]% or whatever you like for presentation mode
\onslide<1-| handout:1-2>
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\onslide<1-| handout:2>
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\item Item \arabic{enumi}
\end{enumerate}
\end{frame}
\againframe<0| handout:2>{foo}
\end{document}
I'm not sure how this could apply to article
mode since then there are no frames or slides.
Best Answer
In your example, the depth of the first title is null (no letter as
g
ory
). To work around this feature (or "bug") of beamer, you may add\vphantom{Ag}
in each title of your blocks (\vphantom
adds a vertical phantom of its content).Note: if you use
onlytextwidth
, the sum of the width of your columns should be lesser than\textwidth
(to get a space between your columns).