2

After looking at this post I'm sure something similar--having a different template style applied to particular frames--could be done with sidebars rather than with headers. As such I adapted the code, but unfortunately without success.

Here is what I came up with:

\documentclass[14pt]{beamer}
\usetheme{Frankfurt}
\usepackage{etoolbox}

\defbeamertemplate{sidebar left}{MyDefault}{%
    \setbeamersize{sidebar width left=0}
}

\defbeamertemplate{sidebar left}{Alternative}{%
    \setbeamersize{sidebar width left=1.75cm}
    \setbeamercolor{sidebar left}{bg=black, fg=green}
    \setbeamertemplate{sidebar left}{%
        \vspace*{\headheight}
        \vfill
        This
        \vfill
        Text
        \vfill
        Should
        \vfill
        Show
        \vfill
        In The
        \vfill
        Sidebar
        \vfill
    }
}



\BeforeBeginEnvironment{frame}{%
    \setbeamertemplate{sidebar left}[MyDefault]%
}

\makeatletter
\define@key{beamerframe}{Alternative}[true]{%
    \setbeamertemplate{sidebar left}[Alternative]%
}
\makeatother

\begin{document}
\begin{frame}
  Normal
\end{frame}
\begin{frame}[Alternative]
  Alternative
\end{frame}
\begin{frame}
  Normal
\end{frame}
\end{document}

The desire here being that the sidebar would only show up for frames marked with [Alternative] following the command to start the frame, and otherwise would not exist.

Thanks in advance.

Jeremie
  • 509

1 Answers1

1

Remaining Problem: Even if the side bar is empty on the normal slides, it still takes the space. Removing sidebar from a single beamer frame or Remove sidebar in Beamer might help.

\documentclass[14pt]{beamer}
\usetheme{Frankfurt}
\usepackage{etoolbox}

\setbeamersize{sidebar width left=1.75cm}

\defbeamertemplate{sidebar left}{Alternative}{%
        \vspace*{\headheight}
        This
        \vfill
        Text
        \vfill
        Should
        \vfill
        Show
        \vfill
        In The
        \vfill
        Sidebar
        \vfill
}

\BeforeBeginEnvironment{frame}{%
    \setbeamercolor{sidebar left}{bg=white, fg=green}
    \setbeamertemplate{sidebar left}{}%
}

\makeatletter
\define@key{beamerframe}{Alternative}[true]{%
    \setbeamercolor{sidebar left}{bg=black, fg=green}
    \setbeamertemplate{sidebar left}[Alternative]%
}
\makeatother

\begin{document}
    \begin{frame}
        Normal
    \end{frame}

    \begin{frame}[Alternative]
        Alternative
    \end{frame}

    \begin{frame}
        Normal
    \end{frame}

\end{document}

enter image description here

  • Thanks again for the help. Also, as another observed potential problem, is that the title band that comes up is cut off by the 'invisible side bar' with this approach, but works well for the frames where the sidebar is desired. – Jeremie Feb 27 '16 at 00:03
  • @Jeremie Idea: what if you do not use the sidebar and put your steps in for example the logo layer? That will solve the problem with changing it mid-document and it ultimately solves your clipping issues from the previous question, since it will be in front of the shadows. To make room for the self-made sidebar, you can use the geometry package to change the margins during the document. – samcarter_is_at_topanswers.xyz Feb 27 '16 at 11:14
  • @Samcater -- I will look into that, thanks for the tip. – Jeremie Feb 27 '16 at 16:46