Как можно отменить только панель навигации или заголовок в указанном фрейме?

Как можно отменить только панель навигации или заголовок в указанном фрейме?

Мой 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} 

Под боковой панелью I подразумевается все, включая синюю полосу и ее содержимое.

Всвязанный вопрос, использование plain— это нормально. Однако на этот раз я хочу отменить только одну вещь: навигационную панель или заголовок. Как мне с этим справиться?

решение1

Здесь решение немного сложнее, чем подавление обоих элементов одновременно с plainопцией frame.

Код:

\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}

введите описание изображения здесь

Замечания и пояснения

Подавление только боковой панели включает в себя ряд действий:

  1. Подавление информации на боковой панели (панели навигации).

  2. Фактически подавление боковой панели

  3. Возвращаем место, которое занимала боковая панель.

Возможно, более сложным действием является номер три, поскольку дополнительный интервал для боковой панели задается глобально с помощью , \setbeamersizeкоторый может использоваться только в преамбуле. Я использовал некоторые \parshapeнастройки, чтобы определить \RecoverSpaceкоманду для восстановления пространства; поскольку \parshapeвлияет только на текущий абзац, \RecoverSpaceего нужно будет применить к каждому абзацу в измененном фрейме.

Для действий один и два я определил \SuppressSidebarкоманду.

В общем случае для фреймов, в которых вы хотите отключить боковую панель, вам нужно будет сделать следующее:

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

Подавление только заголовка также включает ряд действий: установка шаблонов headlineи frametitleпустыми и восстановление вертикального пространства, назначенного шаблону headline. Эти действия выполняются с помощью команд \SuppressTitleи \RecoverVspace.

В общем случае для кадров, в которых вы хотите скрыть заголовок, вам нужно будет сделать следующее:

\begingroup
\SuppressTitle
\begin{frame}
\RecoverVSpace
contents
\end{frame}
\endgroup

Связанный контент