[Tex/LaTex] How to put the thank you slide style into a beamertheme

beamerthemes

I have designed/hacked together a university LaTeX Beamer theme for my presentation purposes.

I have pretty much everything working as it should (could be better), but now I'd like to be able to specialize a "thank you" slide in the theme itself. I need to solve two problems:

  1. Indicate the "thank you" frame somehow (e.g. if there are "backup slides" or a list of references following and the "thank you" slide isn't the last one.
  2. Detect this in the beameroutertheme*.sty file.

I detected the title slide by using \ifthenelse{\c@framenumber=1} but that won't work here due to point 1 above.

Any input is welcome!

PS: for reference, the beamer theme is available on my github and can be used by dropping the sty files and the Images directory alongside the main tex file (see example presentation).

Best Answer

As has been suggested in comments, the best thing to do is to define a \makethanks command, and this can be done fairly easily. For example, using the texts and formatting you already have in your example.tex file, you could do something like

% the ``Thank you'' page
\def\makethanks{%
  \begin{frame}
  \frametitle{\@thankstitle}
  \@thanksmessage
  \end{frame}
}
% in ``article'' mode there's no ``Thank you'' page
\mode<article>
  {\providecommand\makethanks{}}

% commands for the title and message of the "Thank you" page
\def\thankstitle#1{\def\@thankstitle{#1}}
\def\thanksmessage#1{\def\@thanksmessage{#1}}
\thankstitle{Thanks for your attention! Any questions?}
\thanksmessage{Hope you slept comfortably!}

Adding this in one of your .sty files and using

\documentclass{beamer}
\usetheme{UniversiteitAntwerpen}

\begin{document}

\makethanks

\end{document}

you will get:

enter image description here

And with

\documentclass{beamer}
\usetheme{UniversiteitAntwerpen}

\thankstitle{Thank you!}
\thanksmessage{}

\begin{document}

\makethanks

\end{document}

you'll get:

enter image description here

Of course, feel free to make any customization to the page.