4

My MWE is

\documentclass[14pt]{beamer}% http://ctan.org/pkg/beamer
\let\Tiny\tiny% https://tex.stackexchange.com/q/58087/5764
\usetheme{Berkeley}
\makeatletter
\beamer@headheight=1.5\baselineskip
\makeatother
\setbeamercolor{normal text}{bg=black!10}
\title[Title]{My title}
\subtitle{Subtitle}
\author{Author}
\institute[Institute]{My institute}
\date[Date]{My date}
\logo{\color{blue!50}\scalebox{2}{\TeX}} % you can % it
\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\section{A section}
\subsection{A subsection}
\begin{frame}
  \frametitle{Frame title}
  \framesubtitle{frame subtitle}
  Some text
\end{frame}

\begin{frame}
  Some more text
\end{frame}

\section{Another section}
\subsection{Another subsection}
\begin{frame}
  picture
\end{frame}
\end{document} 

The sidebar I means all the things including the blue stripe and its contents.

In the related question, using plain is OK. However, this time I only want to cancel one thing, the navigation bar or title. How do I deal with it?

1 Answers1

3

Here the solution is a little more involved than the one suppressing both elements simultaneously with the plain option for frame.

The code:

\documentclass[14pt]{beamer}
\usetheme{Berkeley}

\let\Tiny\tiny

\makeatletter \beamer@headheight=1.5\baselineskip \makeatother \setbeamercolor{normal text}{bg=black!10}

\makeatletter \let\Oldbeamerleftsidebar\beamer@leftsidebar \newcommand\RecoverSpace{% \parshape 1 \dimexpr\beamer@leftmargin-\Gm@lmargin\relax \dimexpr\linewidth-\beamer@leftmargin+\Gm@lmargin\relax } \newcommand\SuppressSidebar{% \setbeamertemplate{sidebar left}{} \setlength\beamer@leftsidebar{0pt}% } \newcommand\SuppressTitle{% \setbeamertemplate{headline}{% \usebeamercolor[bg]{logo}% \vrule width\beamer@sidebarwidth height \beamer@headheight% \hskip-\beamer@sidebarwidth% \hbox to \beamer@sidebarwidth{\hss\vbox to \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}% }% } \newcommand\RecoverVSpace{% \vskip-\dimexpr\beamer@headheight+2.5ex\relax% } \makeatother

\title[Title]{My title} \subtitle{Subtitle} \author{Author} \institute[Institute]{My institute} \date[Date]{My date} \logo{\color{blue!50}\scalebox{2}{\TeX}} % you can % it

\begin{document}

\begin{frame} \titlepage \end{frame}

\section{A section} \subsection{A subsection} \begin{frame} \frametitle{Frame title} \framesubtitle{frame subtitle} A regular frame \end{frame}

\begingroup \SuppressSidebar \begin{frame} \frametitle{Frame title} \framesubtitle{frame subtitle} \RecoverSpace Some text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text

\RecoverSpace Some more text \end{frame} \endgroup

\begin{frame} \frametitle{Frame title} \framesubtitle{frame subtitle} Another regular frame \end{frame}

\section{Another section} \subsection{Another subsection} \begingroup \SuppressTitle \begin{frame} \RecoverVSpace Some text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text and some more text \end{frame} \endgroup

\begin{frame} \frametitle{Frame title} \framesubtitle{frame subtitle} Another regular frame \end{frame}

\end{document}

enter image description here

Remarks and explanation

Suppressing only the sidebar involves a number of actions:

  1. Suppressing the information on the sidebar (the navigation bar).

  2. Actually suppressing the sidebar

  3. Regaining the space that was occupied by the sidebar.

Perhaps the more involved action is number three, since the extra spacing for the sidebar is globally set using \setbeamersize which can only be used in the preamble. I used some \parshape settings to define a \RecoverSpace command to regain the space; since \parshape only affects the current paragraph, \RecoverSpace will have to be applied to each paragraph in the modified frame.

For actions one and two I defined a \SuppressSidebar command.

In general, for frames in which you want to suppress the sidebar you will need to do this:

\begingroup
\SuppressSidebar
\begin{frame}
\RecoverSpace
contents
\end{frame}
\endgroup

Suppressing only the title also involves a number of actions: setting the headline and frametitle templates to be empty, and recovering the vertical space assigned to the headline template. Those actions are done using the \SuppressTitle and \RecoverVspace commands.

In general, for frames in which you want to suppress the headline you will need to do this:

\begingroup
\SuppressTitle
\begin{frame}
\RecoverVSpace
contents
\end{frame}
\endgroup
Gonzalo Medina
  • 505,128