# Vertically Aligning or Locking Text in Beamer Presentation

I understand that by using overlays in a beamer presentation, one is able to lock text within a frame, and continue to display other items without affecting the position of the previous item(s) being displayed. What I want to do, however, is to replace one particular overlay with another, without affecting the position of the previous overlays that are being displayed. I am not quite sure how to do this. The best that I have been able to come up with is in the following sample of code, where I am trying to preserve the position of the definition and the matrix in separate slides.

\documentclass[11pt,xcolor=pdftex,dvipsnames,table]{beamer}

\usepackage{multirow}
\usepackage{beamerthemesplit}
\usetheme{Berkeley}
\usecolortheme{dolphin}
\usepackage{graphicx}
\usepackage{epsf}
\usepackage{pgfplots}

\title[Short Title]{Longer Presentation Title}
\author[John Doe]{John Doe}
\institute{University of Nowhere}
\date{July 7, 2011}

\begin{document}

\maketitle

\begin{frame}
\frametitle{Introduction}
\setbeamercovered{dynamic}
\framesubtitle{Definitions (Cont...)}
\textit{Definition 5:} If $A$ is an $m \times n$ matrix, $I$ is a subset of $\{1, ..., m\}$ with $k$ elements, and $J$ is a subset of $\{1, ..., n\}$ with $k$ elements, then the matrix for the $k \times k$ minor of $A$ that corresponds to the rows with index in $I$ and the columns with index in $J$, is written as $[A]_{I,J}$. \pause
\newline
\newline
If $I = J$, then $[A]_{I,J}$ is called a \textit{principal minor}.
\newline
\newline
$A = \left( \begin{array}{rrr} \multicolumn{1}{r}{1} & \multicolumn{1}{r}{4} & \multicolumn{1}{r}{7} \\ \cline{2-3} \multicolumn{1}{r}{3} & \multicolumn{1}{|r}{0} & \multicolumn{1}{r|}{5} \\ \multicolumn{1}{r}{-1} & \multicolumn{1}{|r}{9} & \multicolumn{1}{r|}{11} \\ \cline{2-3} \end{array} \right), \mbox{~where~} I = \{2, 3\} \mbox{~and~} J = \{2,3\}$
\end{frame}

\begin{frame}
\frametitle{Introduction}
\setbeamercovered{dynamic}
\framesubtitle{Definitions (Cont...)}
\textit{Definition 5:} If $A$ is an $m \times n$ matrix, $I$ is a subset of $\{1, ..., m\}$ with $k$ elements, and $J$ is a subset of $\{1, ..., n\}$ with $k$ elements, then the matrix for the $k \times k$ minor of $A$ that corresponds to the rows with index in $I$ and the columns with index in $J$, is written as $[A]_{I,J}$.
\newline
\newline
If the matrix consists of elements in rows and columns from $1$ to $k$, then the principal minor is called a \textit{leading principal minor}.
$A = \left( \begin{array}{rrr} \cline{1-2} \multicolumn{1}{|r}{1} & \multicolumn{1}{r|}{4} & \multicolumn{1}{r}{7} \\ \multicolumn{1}{|r}{3} & \multicolumn{1}{r|}{0} & \multicolumn{1}{r}{5} \\ \cline{1-2} \multicolumn{1}{r}{-1} & \multicolumn{1}{r}{9} & \multicolumn{1}{r}{11} \\ \end{array} \right), \mbox{~where~} I = \{1,2\} \mbox{~and~} J = \{1,2\}$
\end{frame}

\end{document}


Any help/suggestions on how I can do this would be appreciated.

-

You could use overlayarea (see Section 9.5 Dynamically Changing Text or Images of the manual), \onslide, and \only:

\documentclass[11pt,xcolor=pdftex,dvipsnames,table]{beamer}

\usepackage{multirow}
\usepackage{beamerthemesplit}
\usetheme{Berkeley}
\usecolortheme{dolphin}
\usepackage{graphicx}
\usepackage{epsf}
\usepackage{pgfplots}

\title[Short Title]{Longer Presentation Title}
\author[John Doe]{John Doe}
\institute{University of Nowhere}
\date{July 7, 2011}

\begin{document}

\maketitle

\begin{frame}
\frametitle{Introduction}
\framesubtitle{Definitions (Cont...)}
\textit{Definition 5:} If $A$ is an $m \times n$ matrix, $I$ is a subset of $\{1, ..., m\}$ with $k$ elements, and $J$ is a subset of $\{1, ..., n\}$ with $k$ elements, then the matrix for the $k \times k$ minor of $A$ that corresponds to the rows with index in $I$ and the columns with index in $J$, is written as $[A]_{I,J}$.\$1\baselineskip] \begin{overlayarea}{\textwidth}{1cm} \only<1>{If I = J, then [A]_{I,J} is called a \textit{principal minor}.} \only<2>{If the matrix consists of elements in rows and columns from 1 to k, then the principal minor is called a \textit{leading principal minor}.} \end{overlayarea} \begin{overlayarea}{\textwidth}{3cm} \only<1>{% \[A = \left( \begin{array}{rrr} \multicolumn{1}{r}{1} & \multicolumn{1}{r}{4} & \multicolumn{1}{r}{7} \\ \cline{2-3} \multicolumn{1}{r}{3} & \multicolumn{1}{|r}{0} & \multicolumn{1}{r|}{5} \\ \multicolumn{1}{r}{-1} & \multicolumn{1}{|r}{9} & \multicolumn{1}{r|}{11} \\ \cline{2-3} \end{array} \right), \mbox{~where~} I = \{2, 3\} \mbox{~and~} J = \{2,3\}$
}
\only<2>{%
$A = \left( \begin{array}{rrr} \cline{1-2} \multicolumn{1}{|r}{1} & \multicolumn{1}{r|}{4} & \multicolumn{1}{r}{7} \\ \multicolumn{1}{|r}{3} & \multicolumn{1}{r|}{0} & \multicolumn{1}{r}{5} \\ \cline{1-2} \multicolumn{1}{r}{-1} & \multicolumn{1}{r}{9} & \multicolumn{1}{r}{11} \\ \end{array} \right), \mbox{~where~} I = \{1,2\} \mbox{~and~} J = \{1,2\}$
}
\end{overlayarea}
\end{frame}

\end{document}

-
Excellent! Thank you for that! –  Bill Oct 7 '11 at 1:52
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9975523948669434, "perplexity": 590.7742325560383}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-40/segments/1443736672441.2/warc/CC-MAIN-20151001215752-00113-ip-10-137-6-227.ec2.internal.warc.gz"}