I use TeXnicCenter 2.0 Alpha 4 and beamer for my presentations. Inside the
\only
environment, I want to activate the label of a certain equation. So I use \label<1>
, for instance, if the equation was in the first overlay "\only<1>{}
". The problem is: the equations in the slide become flushed to the left, and the location of the equation numbers become centered in the slide, which is very inconvenient (see the figure).On the other hand, when I remove "
<1>
" after "\label
", things become normal. That is, the equations are centered in the slide, and the equation numbers are flushed to the right as they should be.Is there anything I can do? Here is an example code of what I'm using:
Code: Select all
\documentclass[t,xcolor=dvipsnames]{beamer}
\usetheme{Madrid}
\setbeamercovered{invisible}
\setbeamertemplate{navigation symbols}{}
\usepackage{graphicx}
\usepackage[scaled]{helvet}
\usepackage[round]{natbib}
\usepackage{fancybox}
\usepackage{algorithmic,algorithm}
\usepackage{epstopdf,subfigure,booktabs}
\usepackage{fixltx2e}
\usepackage{multicol}
\usepackage{bigstrut}
\usepackage{tikz}
\usepackage{ragged2e}
\usepackage{bm}
\usepackage{hyperref}
\usepackage{cleveref}
%
\setbeamertemplate{theorems}[numbered]
\setbeamertemplate{caption}[numbered]
%
\newcommand{\newblock}{}
%
\newtheorem{cor}{Corollary}
\newtheorem{lem}{Lemma}
\newtheorem{ex}{Example}
\newtheorem{pr}{Problem}
%
\title[...]{\textbf{...}}
\author[...]{\textbf{\Large{...}}}
\institute[...]
{
\large{...} \\
\medskip
{\emph{\large{...}}}
}
\date{...}
%
\bibliographystyle{abbrvnat}
%
\justifying
%
\begin{document}
%
\begin{frame}
\titlepage
\end{frame}
%
\AtBeginSection[]
{
\begin{frame}{Inhalt}
\frametitle{Outline}
\begin{multicols}{2}
\footnotesize{
\tableofcontents[currentsection,subsubsectionstyle=show/shaded]
}
\end{multicols}
\end{frame}
}
%
\AtBeginSubsection[]
{
\begin{frame}{Inhalt}
\frametitle{Outline}
\begin{multicols}{2}
\footnotesize{
\tableofcontents[currentsection,currentsubsection,subsubsectionstyle=show/shaded]
}
\end{multicols}
\end{frame}
}
%
\AtBeginSubsubsection[]
{
\begin{frame}{Inhalt}
\frametitle{Outline}
\begin{multicols}{2}
\footnotesize{
\tableofcontents[currentsection,currentsubsection,currentsubsubsection]
}
\end{multicols}
\end{frame}
}
%
\section{Abstract}
%
\begin{frame}
\frametitle{Abstract}
\transboxin
...
\end{frame}
%
\section{Introduction}
%
\begin{frame}
\frametitle{...}
\transboxin<1>
\only<1>{
\begin{subequations}
\begin{align}
{\text{minimize}}\;J(u(t)) &= \Phi(x(1)) + \int_0^1 {L(x(\tau), u(\tau),\tau) d{\tau}} \label<1>{subsec2:tops:eq:perindex1}\\
{\text{subject to }}\dot x(t) &= f(x(t),u(t),t), \label{subsec2:tops:eq:dynsys1}\\
x(0) &= {x^0}, \label{subsec2:tops:eq:dynsys1incond1}
\end{align}
\end{subequations}
}
\only<2>{
\begin{subequations}
\begin{align}
{\text{minimize}}\;J(u(t)) &= \Phi(x(1)) + \int_0^1 {L(x(\tau), u(\tau),\tau) d{\tau}} \label{subsec2:tops:eq:perindex1}\\
{\text{subject to }}\dot x(t) &= f(x(t),u(t),t), \label{subsec2:tops:eq:dynsys1}\\
x(0) &= {x^0}, \label{subsec2:tops:eq:dynsys1incond1}
\end{align}
\end{subequations}
}
\end{frame}
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
\begin{frame}[allowframebreaks]
\frametitle{References}
\bibliography{Bib}
\end{frame}
%
\setbeamercolor{background canvas}{bg=Gray}
%
\begin{frame}[c]
\transdissolve
\makebox[\textwidth][c]{\begin{tikzpicture}
\node[at=(current page.center), minimum width=\paperwidth, minimum height=\paperheight] {
%%%\includegraphics[width=\paperwidth]{bla.jpg}
};
\end{tikzpicture}
}
\end{frame}
% End of slides
\end{document}