In my presentation composed with the beamer class I have the following piece of code:
\documentclass[dvips, 9pt, unicode, t]{beamer}
\usepackage{ifthen}
\usetheme{CambridgeUS}
\setbeamertemplate{footline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
\usebeamerfont{author in head/foot}\hspace*{1em}good footline
\end{beamercolorbox}}%
\vskip0pt}
\begin{document}
\begin{frame}
Frame one (with footline)
\end{frame}
\begin{frame}
Frame two (with footline)
\end{frame}
\end{document}
which gives the right footlines. However, the following piece of code
\documentclass[dvips, 9pt, unicode, t]{beamer}
\usepackage{ifthen}
\usetheme{CambridgeUS}
\newcommand\Switttch{0}
\setbeamertemplate{footline}{%
\ifthenelse{\equal{\Switttch}{0}}{}{\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
\usebeamerfont{author in head/foot}\hspace*{1em}bad footline
\end{beamercolorbox}}%
\vskip0pt}}
\begin{document}
\begin{frame}
Frame one (without footline)
\end{frame}
\renewcommand\Switttch{1}
\begin{frame}
Frame two (with footline)
\end{frame}
\end{document}
gives a footline on second frame which overlaps with the bottom line of the page. What's wrong with the second piece of code? (I want to switch on and switch off the footline for different frames.)
\documentclassand ending with\end{document}– Oct 18 '12 at 22:51