
Meu MWE é
\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}
A barra lateral I significa todas as coisas, incluindo a faixa azul e seu conteúdo.
Ema pergunta relacionada, usar plain
está OK. Porém, desta vez só quero cancelar uma coisa, a barra de navegação ou o título. Como faço para lidar com isso?
Responder1
Aqui a solução é um pouco mais complicada do que aquela que suprime os dois elementos simultaneamente com a plain
opção for frame
.
O código:
\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}
Observações e explicação
Suprimir apenas a barra lateral envolve uma série de ações:
Suprimindo as informações da barra lateral (barra de navegação).
Na verdade, suprimindo a barra lateral
Recuperando o espaço que era ocupado pela barra lateral.
Talvez a ação mais envolvente seja a número três, já que o espaçamento extra para a barra lateral é definido globalmente usando \setbeamersize
which só pode ser usado no preâmbulo. Usei algumas \parshape
configurações para definir um \RecoverSpace
comando para recuperar o espaço; como \parshape
afeta apenas o parágrafo atual, \RecoverSpace
deverá ser aplicado a cada parágrafo do quadro modificado.
Para as ações um e dois defini um \SuppressSidebar
comando.
Em geral, para frames nos quais você deseja suprimir a barra lateral, você precisará fazer o seguinte:
\begingroup
\SuppressSidebar
\begin{frame}
\RecoverSpace
contents
\end{frame}
\endgroup
Suprimir apenas o título também envolve uma série de ações: definir os modelos headline
e frametitle
como vazios e recuperar o espaço vertical atribuído ao headline
modelo. Essas ações são feitas usando os comandos \SuppressTitle
e \RecoverVspace
.
Em geral, para frames nos quais você deseja suprimir o título, você precisará fazer o seguinte:
\begingroup
\SuppressTitle
\begin{frame}
\RecoverVSpace
contents
\end{frame}
\endgroup