1

In a presentation made with beamer I'd like to have multiples of a small graphic (Easter egg, duck...) in the bottom right corner, where the number of graphics corresponds to the current frame number. If a frame is split into several slides using overlays, all slides have the same frame number and therefore should have the same number of graphics. The navigation symbols should not be visible. Also, if possible, I'd like to be able to stack the graphics in rows by giving a maximum row length (as an integer), after which a new row above the old one is filled. Is there any way to achieve this?

This is (kind of) a MWE that contains the packages I typically use for presentations in order to check for compatibility.

\documentclass[ngerman,10pt]{beamer}
\mode<presentation>
{ \usetheme{Boadilla}
  \setbeamercovered{transparent}
}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{chemformula}
\beamertemplatenavigationsymbolsempty
\title{Easter Ducks}
\author{Prof.\ van Duck}
\date{\today}
\institute{Duck University}

\begin{document}
\begin{frame}{Frame 1}
\only<1>{Text 1}
\only<2->{Text 2}
\end{frame}

\begin{frame}{Frame 2}
\ch{SO2} \pause \\
\SI{5.3}{\kJ\per\mol}
\end{frame}
\end{document}
  • Please rewrite the question such that it becomes clearer. For instance, does "The navigation toolbar shouldn't be there as I really dislike it." refer to \beamertemplatenavigationsymbolsempty or something else? Do you want to keep the current frame number or drop it. And so on. – marmot Apr 16 at 14:01
  • I hope this is clearer now? Feel free to ask for more details. – Eldrad Apr 16 at 15:08
2

Sure. Instead of an egg you may want to put an egg-producing creature.

\documentclass{beamer}
\usepackage{tikzducks}
\addtobeamertemplate{navigation symbols}{}{% https://tex.stackexchange.com/a/137028/121799
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \foreach \X in {1,...,\number\value{page}}
    {\tikz[scale=0.12]{\duck}}
}
\begin{document}
\begin{frame}[t]
\frametitle{First}

\end{frame}

\begin{frame}[t]
\frametitle{Second}

\end{frame}

\begin{frame}[t]
\frametitle{Third}

\end{frame}

\end{document}

enter image description here

Of course you can use \includegraphics{...} instead of \tikz{\duck}.

Here is a version for the updated question. It does not pile up the symbols, though, because there is not enough vertical space (and you are very generous when it comes to load unrelated packages so the compilation time is unnecessarily long which prevented me from playing with many slides where this piling up might make sense).

\documentclass[ngerman,10pt]{beamer}
\mode<presentation>
{ \usetheme{Boadilla}
  \setbeamercovered{transparent}
}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{chemformula}
\usepackage{tikzducks}
\beamertemplatenavigationsymbolsempty
\let\oldinsertframenumber\insertframenumber
\newcommand{\insertpagesymbols}[3][]{%
\foreach \XX in {1,...,\inserttotalframenumber}%
{\ifnum\XX<\numexpr\inserttotalframenumber-\number\value{framenumber}+1\relax%
#3%
\else%
#2%
\fi}}
\newsavebox\Duck
\sbox\Duck{\tikz[scale=0.1]{\duck}}
\newsavebox\InvDuck
\sbox\InvDuck{\tikz[scale=0.1,opacity=0.1]{\duck}}

\def\insertframenumber{\insertpagesymbols{\usebox\Duck}{\usebox\InvDuck}%
%\oldinsertframenumber
}
\title{Easter Ducks}
\author{Prof.\ van Duck}
\date{\today}
\institute{Duck University}

\begin{document}
\begin{frame}{Frame 1}
\only<1>{Text 1}
\only<2->{Text 2}
\end{frame}

\begin{frame}{Frame 2}
\ch{SO2} \pause \\
\SI{5.3}{\kJ\per\mol}
\end{frame}

\begin{frame}{Another test}
Happy \pause \\
Easter!
\end{frame}

\end{document}

enter image description here

  • Unfortunately, I get an Undefined control sequence: \beamer@@tmpl@navigation symbols ...{1em}\foreach \X in {1,...,\number \valu... The result is that the graphic is displayed once in the corner, and there is the text "in 1,...,1", in "1,...,3" and so on left to it. Additionally, is it possible to have this without the navigation symbols? Usage of \beamertemplatenavigationsymbolsempty breaks everything. – Eldrad Apr 15 at 16:25
  • @Eldrad Well, this happens when users do not provide an MWE. How would I know what other things you are doing in your preamble if you do not disclose it? If you provide me with an MWE, I am confident to be able to make it work there, too. – marmot Apr 15 at 18:01
  • Sorry for being so imprecise, now I did some additional tests. Your solution strongly depends on the marvelous tikzducks package even if no ducks but \includegraphics is used. It was commenting \usepackage{tikzducks} that caused the trouble. With it I can reproduce your answer. I discovered a different problem now: Your solution is not working well with overlays, as each pdf page created by an overlay shows an increased amount of figures/ducks. However, as with slide numbers, they should not increase on overlays. Additionally, is it possible to omit the navigation symbols? – Eldrad Apr 15 at 22:00
  • @Eldrad All these things are possible provided there is an MWE that shows what you are doing. – marmot Apr 15 at 22:04
  • I edited my question according as you requested. – Eldrad Apr 16 at 9:20

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.