3

Let's suppose I'd like to divert the navigation symbols template (e.g. in order replace them by the frame numbers, see this bug report ;) I would be facing troubles regarding the font size/position, depending on regular/plain frames, as shown by the following MCE.

How could I get rid of these troubles?

\documentclass{beamer}
\usetheme{PaloAlto}
\setbeamertemplate{navigation symbols}{\insertframenumber/\inserttotalframenumber}
\begin{document}
\begin{frame}
  \frametitle{A regular frame}
\end{frame}
\begin{frame}[plain]
  \frametitle{A plain frame}
\end{frame}
\end{document}

enter image description here

8
  • 1
    I guess the problem is that the navigation symbols are placed above the footline, which is not there on plain frames. Would you be interested in a brute force tikz solution? (the different font size can be avoided by explicitly setting it \tiny\insertframenumber/\inserttotalframenumber) Commented Dec 10, 2018 at 11:48
  • @samcarter I see for the reason. About the brute force solution, why not but I would have expected a not too verbose solution to expose to LaTeX newbies :) About the font size, I already tried this, but noticed \tiny is larger than the font size in regular frames (okay, I could make use of \fontsize{...}{...}\selectfont)). Commented Dec 10, 2018 at 11:55
  • 1
    I think the reason for the different font size boils down to that if it not explicit set, it uses the font size of whatever element was typeset before and normally that is the footline, but on a plain frame, there is no footline ... Commented Dec 10, 2018 at 11:56
  • I'm not sure I understand your sentence \tiny is larger than the font size in regular frames Could you make an example to show which problem you encounter? Commented Dec 10, 2018 at 12:06
  • 1
    Try with \setbeamertemplate{navigation symbols}{\Tiny\insertframenumber/\inserttotalframenumber} (sorry, I confused \tiny with \Tiny) Commented Dec 10, 2018 at 12:22

1 Answer 1

5

The problem is that there is no special font size set in your redefined navigation symbols template. So the fontsize of whatever element was typeset before is used. Normally the footline comes before, but on plain frames there is no footline.

As a workaround you can explicitly set the font size:

\documentclass{beamer}

\setbeamertemplate{navigation symbols}{\Tiny\insertframenumber/\inserttotalframenumber}

\begin{document}
\begin{frame}
  \frametitle{A regular frame}
\end{frame}

\begin{frame}
  \frametitle{A plain frame}
\end{frame}
\end{document}

enter image description here


Brute force solution and total overkill: use tikz and position the pagenumber relative to the page

\documentclass{beamer}
\usetheme{PaloAlto}
\usepackage{tikz}

\setbeamertemplate{navigation symbols}{%
    \begin{tikzpicture}[remember picture, overlay]
        \node[xshift=-0.4cm,yshift=0.2cm] at (current page.south east) {\tiny\insertframenumber/\inserttotalframenumber};
    \end{tikzpicture}}
\begin{document}
\begin{frame}
  \frametitle{A regular frame}
\end{frame}
\begin{frame}[plain]
  \frametitle{A plain frame}
\end{frame}
\end{document}

enter image description here

3
  • I guess you meant \tiny instead of \Tiny. Commented Dec 10, 2018 at 13:35
  • 1
    No, tiny is bigger than Tiny :) (that was the difference to the normal slides yous aw) Commented Dec 10, 2018 at 13:38
  • 1
    Another point I'm learning thanks to you: the two extra font sizes \Tiny and \TINY :) Commented Dec 10, 2018 at 14:04

You must log in to answer this question.

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