With latex beamer I would like to top align the content in minipages or a similar environment to the same height as if there was no minipage present.
Minimal Example:
\documentclass[t]{beamer}
\usepackage{tikz}
\begin{document}
\setlength\pdfpageheight{1.60cm}%
\setlength\pdfpagewidth{6cm}%
\begin{frame}{A\strut}
\begin{itemize}
\item X
\end{itemize}
\end{frame}
\begin{frame}{B\strut}
\begin{minipage}[t]{2cm}
\vskip 0pt%
\begin{itemize}
\item X
\end{itemize}
\end{minipage}%
\nolinebreak%
\begin{minipage}[t]{2cm}
\vskip 0pt%
\begin{tikzpicture}
\node[fill=gray,minimum width=2cm,minimum height=1cm] {};
\end{tikzpicture}
\end{minipage}%
\end{frame}
\begin{frame}{C\strut}
\begin{tikzpicture}
\node[fill=gray,minimum width=4cm,minimum height=1cm] {};
\end{tikzpicture}
\end{frame}
\end{document}
As can bee seen, the \item X
is differently top aligned in frame A and B, the tikzpicture
is different top aligend in frame B and C, and most confusingly the difference in alignment also differs between the \item X
and the tikzpicture
.
- What is causing this different alignments?
- How can the alignment in frame B be changed to be the same as in frame A and C?