1

I'm in the process of creating a customized beamer's frame "actually" plain with a sidebar theme (PaloAlto).

By:

  • setting the frametitle's width to \paperwidth instead of \paperwidth-\beamer@sidebarwidth,
  • making use of \newgeometry,

I almost managed (for "right" PaloAlto as well), except for the distance between the last footnotes' line and the bottom of the page: it is wider than for ordinary (plain) frames, as shown by the following MCE.

Of course, I can play with the foot option in the new geometry but I can't figure out what's the precise dimension involved.

Hence the question: how to make, in this customized beamer's plain frame, the distance between the last footnotes' line and the bottom of the page the same as for ordinary (plain) frames?

\documentclass[t]{beamer}
\usepackage{xifthen}
\usepackage{multido}

\geometry{verbose}

\makeatletter
\newenvironment{myplainframe}[1][]{%
  \ifthenelse{\isnamedefined{beamer@sidebarwidth}}{%
    % Customize frametitle (changes from \defbeamertemplate*{frametitle}{sidebar
    % theme} in `beamerouterthemesidebar.sty' flagged with `% <- !') 
    \setbeamertemplate{frametitle}
    {%
      \nointerlineskip%
      \ifbeamer@plainframe%
      \hbox{\usebeamercolor[bg]{frametitle}%
        \@tempdima\paperwidth%\advance\@tempdima-\beamer@sidebarwidth % <- !
        \hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}%
      \nointerlineskip%
      \fi%
      \vskip-\beamer@headheight%
      \vbox to \beamer@headheight{%
        \vfil
        \leftskip=-\beamer@leftmargin%
        \advance\leftskip by0.3cm%
        \rightskip=-\beamer@rightmargin%
        \advance\rightskip by0.3cm plus1fil%
        {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
        {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
        \vbox{}%
        \vskip-1em%
        \vfil
      }%
    }%
    % Customize the geometry (changes from options of geometry package in
    % `beamer.cls' flagged with `% <- !')
    \newgeometry{%
      % hmargin=1cm,% <- !
      vmargin=0cm,%
      head=0.5cm,%
      headsep=0pt,%
      foot=0.5cm,%
      textwidth=\textwidth+\beamer@sidebarwidth,% <- !
      includeheadfoot,% <- !
    }%
  }{%
  }%
  %
  \begin{frame}[plain,#1]%
  }{%
  \end{frame}%
  \restoregeometry
}
\makeatother

\usetheme{PaloAlto}
% \usetheme[right]{PaloAlto}

\usecolortheme{seahorse}

\newcommand{\foo}[1]{%
  \multido{\i=1+1}{#1}{%
    \i~Foo
  }%
}

\begin{document}
\begin{frame}[plain]
  \frametitle{Default plain frame \alert{before} customization}
  \foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{frame}
  \frametitle{Default frame \alert{before} customization}
  \foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{myplainframe}
  \frametitle{Customized plain frame}
  \foo{25}\footnote{\foo{25}}
\end{myplainframe}
%
\begin{frame}[plain]
  \frametitle{Default plain frame \alert{after} customization}
  \foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{frame}
  \frametitle{Default frame \alert{after} customization}
  \foo{25}\footnote{\foo{25}}
\end{frame}
\end{document}

enter image description here

2

Combining https://tex.stackexchange.com/a/198224/36296 and https://tex.stackexchange.com/a/113412/36296 you could simply do:

\documentclass[t]{beamer}
\usepackage{xifthen}
\usepackage{multido}

\usetheme{PaloAlto}
% \usetheme[right]{PaloAlto}
 \setbeamercolor{background canvas}{bg=yellow!50}

\usecolortheme{seahorse}

\newcommand{\foo}[1]{%
  \multido{\i=1+1}{#1}{%
    \i~Foo
  }%
}

\makeatletter
\newenvironment{myplainframe}[1][]{%
  \ifthenelse{\isnamedefined{beamer@sidebarwidth}}{%
    % Customize frametitle (changes from \defbeamertemplate*{frametitle}{sidebar
    % theme} in `beamerouterthemesidebar.sty' flagged with `% <- !') 
    \setbeamertemplate{frametitle}
    {%
      \nointerlineskip%
      \ifbeamer@plainframe%
      \hbox{\usebeamercolor[bg]{frametitle}%
        \@tempdima\paperwidth%\advance\@tempdima-\beamer@sidebarwidth % <- !
        \hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}%
      \nointerlineskip%
      \fi%
      \vskip-\beamer@headheight%
      \vbox to \beamer@headheight{%
        \vfil
        \leftskip=-\beamer@leftmargin%
        \advance\leftskip by0.3cm%
        \rightskip=-\beamer@rightmargin%
        \advance\rightskip by0.3cm plus1fil%
        {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
        {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
        \vbox{}%
        \vskip-1em%
        \vfil
      }%
    }%
    \setbeamertemplate{background canvas}
    {%
      \ifbeamercolorempty[bg]{background canvas}{}{\color{bg}\vrule width\dimexpr\paperwidth+\beamer@leftsidebar\relax height\paperheight}%
    }
    % Customize the geometry (changes from options of geometry package in
    % `beamer.cls' flagged with `% <- !')
    \hoffset=-\beamer@leftsidebar
    \advance\textwidth\beamer@sidebarwidth
    \hsize\textwidth
    \columnwidth\textwidth
  }{%
  }%
  %
  \begin{frame}[plain,#1]%
  }{%
  \end{frame}%

}
\makeatother

\begin{document}

\begin{myplainframe}
  \frametitle{Customized plain frame}
  \foo{25}\footnote{\foo{25}}
\end{myplainframe}

\end{document}
  • If I'm right, it is not necessary to go through \setlength\leftsidebar{\beamer@leftsidebar} and both \hoffset=-\beamer@leftsidebar and \advance\textwidth\beamer@leftsidebar are okay. Moreover, \rightsidebar seems to be useless, even for "right" PaloAlto, isn't it? – Denis Bitouzé Mar 26 '18 at 15:48
  • @DenisBitouzé \setlength\leftsidebar{\beamer@leftsidebar} is indeed not necessary. – user36296 Mar 26 '18 at 15:51
  • @DenisBitouzé for the right sidebar you need \advance\textwidth\rightsidebar – user36296 Mar 26 '18 at 15:52
  • 1
    @DenisBitouzé please see my updated code for the right side – user36296 Mar 26 '18 at 15:55
  • 1
    @DenisBitouzé I left a comment there - let's see what the beamer maintainers think about this. – user36296 Mar 26 '18 at 16:21

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.