Text Formattingbeamer | Hiding Items in itemized Lists

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
hugin
Posts: 2
Joined: Thu Sep 20, 2012 6:20 pm

beamer | Hiding Items in itemized Lists

Post by hugin »

I'm using the beamer class to create slides for a lecture.
Several frames have almost identical content, two itemize environments to be exact.
The upper one is the same on those frames, I just highlight different entries. The lower one varies, depending on the highlighted entry in the upper one.

In order to make all items stay in the same place I added empty items to the lower itemize environment so that there is always the same number of items.

The problem I'm having is that if such an empty item is the last one in the itemize environment it causes the next center environment to introduce an arrow like the ones items in the itemize environment have.

a minimal example to reproduce this behavior is as follows:

Code: Select all

\documentclass[pdftex,10pt]{beamer}

\begin{document}

\begin{frame}{cause the isse with an empty item}

\begin{itemize}
	\item<1> blah
	\item<1>
\end{itemize}

\vfill

\end{frame}



\begin{frame}{and see the result in an empty center env}

% if you add text to the center environment the first line
% will have that arrow as well
\begin{center}
\end{center}

\end{frame}

\end{document}

what I'm trying to avoid is "jumping" text like in the following minimal example:

Code: Select all

\begin{frame}

\begin{itemize}
	\item<1-| alert@3> blah
	\item<2-> blubb
\end{itemize}

\vspace{5mm}

\begin{itemize}
	\item<3-> blah item1
	\item<3-> blah item2
	\item<3-> blah item3
\end{itemize}

\vfill

\end{frame}



\begin{frame}

\begin{itemize}
	\item<1-> blah
	\item<1-| alert@1> blubb
\end{itemize}

\vspace{5mm}

\begin{itemize}
	\item<1> blubb item1
\end{itemize}

% I was hoping this \vfill would just take up all the remaining
% space and the items would stay at the same height as the ones
% in the previous frame
\vfill

\end{frame}
I'm relatively sure that my approach is not optimal so I'd be grateful for hints as to what the correct way is.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | Hiding Items in itemized Lists

Post by localghost »

The beamer manual suggests to add an optional parameter to the frame environment for text alignment at the top.

Code: Select all

\documentclass[smaller]{beamer}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}

\begin{document}
  \begin{frame}[t]
    \begin{itemize}
      \item<1-| alert@3> blah
      \item<2-> blubb
    \end{itemize}

    \vspace{2ex}

    \begin{itemize}
      \item<3-> blah item1
      \item<3-> blah item2
      \item<3-> blah item3
    \end{itemize}
  \end{frame}

  \begin{frame}[t]
    \begin{itemize}
      \item<1-> blah
      \item<1-| alert@1> blubb
    \end{itemize}

    \vspace{2ex}

    \begin{itemize}
      \item<1> blubb item1
    \end{itemize}
  \end{frame}
\end{document}

Best regards and welcome to the board
Thorsten
hugin
Posts: 2
Joined: Thu Sep 20, 2012 6:20 pm

Re: beamer | Hiding Items in itemized Lists

Post by hugin »

awesome, works like a charm!
thanks a lot!
Post Reply