1

I have a beamer-project, where it's required to have a sidebar, but not for the \AtBeginSection-slides.

What i've tried is to look at the definition of the sidebar-theme (kpsewhich beamerouterthemesidebar.sty) and define a new, empty template that i can switch to locally in the \AtBeginSection-block. This does what i want, but it doesn't work locally. I get an error, if i include the \setbeamertemplate inside the \AtBeginSection-block.

MWE:

\documentclass{beamer}

\useoutertheme[%
width=3cm,
height=1cm,
hideothersubsections,
]{sidebar}

% This works but disables sidebar globally
\makeatletter
\defbeamertemplate{sidebar \beamer@sidebarside}{dummy}{}
\setbeamertemplate{sidebar \beamer@sidebarside}[dummy] % Comment out for local option
\makeatother

\AtBeginSection[]{
  % This throws an error:
  % \makeatletter
  % \setbeamertemplate{sidebar \beamer@sidebarside}[dummy]
  % \makeatother
  \begin{frame}
    {\thesection\\[.4ex]\insertsectionhead}
  \end{frame}
}

\begin{document}

\section{First section}

\begin{frame}{Title}
  Some content
\end{frame}

\begin{frame}{Title}
  Some content
\end{frame}

\section{Second section}

\begin{frame}{Title}
  Some content
\end{frame}

\begin{frame}{Title}
  Some content
\end{frame}

\end{document}

1 Answer 1

0

I have found a workaround by making the frame [plain] the sidebar gets hidden automatically.

So my \AtBeginSection looks like this:

\AtBeginSection{%
  {%
    \setbeamertemplate{footline}{}
    \setbeamertemplate{background}{%
      \begin{tikzpicture}[at=(current page.south east)]
        \shadedraw[shading=axis,
        left color=left,
        right color=right,
        shading angle=135,
        middle color=right,
        vertical custom shading=40
        ]
        (0,0) rectangle (\paperwidth,\paperheight);
        \fill[white] (\paperwidth,\paperheight) rectangle (\paperwidth-30.5mm,0);
        \node at (\paperwidth-1.8cm,4cm) {\includegraphics[width=2.5cm]{Titelfolie}};
        \node at (\paperwidth-1.6cm,\paperheight-.7cm) {\includegraphics[width=2.2cm]{Hochschule-esslingen}};
        \node[font=\Huge, text=white, scale=1.5, align=left, text width=7cm] at (\paperwidth-9.5cm,\paperheight-5cm) {\thesection\\\MakeUppercase\insertsectionhead};
      \end{tikzpicture}
    }

    \begin{frame}<article:0>[plain]

    \end{frame}
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.