1

Recently I built my first LaTeX beamer theme.

The theme is open-source and available at https://code.europa.eu/pol/european-commission-latex-beamer-theme/ (It has an integration with Nix so anyone willing to create document with LaTeX or Pandoc can quickly setup its environment with one single command)

The theme is also available on Overleaf: https://www.overleaf.com/latex/templates/european-commission/qtzkhyvfxbrw

An example of document produced with it can be found here: https://github.com/ecphp/session--complexity-and-monads/releases/download/v11-c200d1f/11--complexity-and-monads--c200d1f.pdf

I'm opening this question because I noticed something while working with \notes{}. When I enable them as such:

\setbeameroption{show notes on second screen=right}
\setbeamerfont{note page}{size=\tiny}

the custom beamer theme template endpage is no more rendered.

The endpage template is defined here: https://code.europa.eu/pol/european-commission-latex-beamer-theme/-/blob/master/src/latex/ec/style/beamerthemeec.sty#L19 This is basically the last page of the document with some legal information and the license.

I made a MWE here:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% If you comment the two following lines, you will see the last page of the PDF
\setbeameroption{show notes on second screen=right}
\setbeamerfont{note page}{size=\tiny}

\makeatletter
\setbeamertemplate{endpage}{
    \begin{frame}
        The last slide
    \end{frame}
}
\makeatother

\AtEndDocument{\usebeamertemplate{endpage}}

\begin{document}

\begin{frame}[plain]
  \titlepage
\end{frame}

\section{Introduction}
\subsection{Proof of the Main Theorem}

\begin{frame}
  \frametitle{There Is No Largest Prime Number}
  \framesubtitle{The proof uses \textit{reductio ad absurdum}.}

  \begin{theorem}
    There is no largest prime number.
  \end{theorem}
\end{frame}

\end{document}

Try to render this document, you will see that the last frame is not rendered.

Then remove the two lines:

\setbeameroption{show notes on second screen=right}
\setbeamerfont{note page}{size=\tiny}

And render again the document, the last frame is there.

So, I'm reaching out here to get some help on this particular issue.

Feel also free to review the theme globally and let me know if I'm doing things correctly, you can find the sources of the theme in this directory: https://code.europa.eu/pol/european-commission-latex-beamer-theme/-/tree/master/src/latex/ec/style

Thanks in advance!

4
  • Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Commented Nov 13, 2022 at 16:05
  • Is there some kind on online platform where I can share some LaTeX src and compile it online ? Some kind of overleaf, but merely like a pastebin ? Commented Nov 13, 2022 at 16:52
  • I just added a MWE Commented Nov 13, 2022 at 17:50
  • Thanks for adding the MWE to your question, this is by far the best way to share code! Unlike external services, having the MWE directly embedded in your question makes sure that your question keeps being useful for future users with the same problem even if the external resources won't work anymore. Commented Nov 13, 2022 at 18:38

1 Answer 1

1

You can work around the problem by using \AddToHook{env/document/end}{\usebeamertemplate{endpage}}:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% If you comment the two following lines, you will see the last page of the PDF
\setbeameroption{show notes on second screen=right}
\setbeamerfont{note page}{size=\tiny}

\makeatletter
\setbeamertemplate{endpage}{
    \begin{frame}
        The last slide
    \end{frame}
}
\makeatother

\AddToHook{env/document/end}{\usebeamertemplate{endpage}}

\begin{document}

\begin{frame}[plain]
  \titlepage
\end{frame}

\section{Introduction}
\subsection{Proof of the Main Theorem}

\begin{frame}
  \frametitle{There Is No Largest Prime Number}
  \framesubtitle{The proof uses \textit{reductio ad absurdum}.}

  \begin{theorem}
    There is no largest prime number.
  \end{theorem}
\end{frame}

\end{document}
10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .