# How to insert page number in Beamer navigation symbols?

I created a presentation with Beamer, and I used Darmstadt theme.

But, this theme doesn't have the page number.

I know that I can insert the page number in Footline with:

\setbeamertemplate{footline}[frame number]


But, how can I insert the page number in "Navigation symbols", like this picture?

You can use something like

\addtobeamertemplate{navigation symbols}{}{%
\usebeamerfont{footline}%
\usebeamercolor[fg]{footline}%
\hspace{1em}%
}


and use spaces, font and boxes to adjust the alignment of the numbers with the navigation symbols.

You can change the font/color just by altering the font/color for footline as in

\setbeamercolor{footline}{fg=blue}
\setbeamerfont{footline}{series=\bfseries}

• Ok. But, this disable all icons in navigation bar. I modified your code to: \setbeamertemplate{navigation symbols}{% \insertslidenavigationsymbol \insertframenavigationsymbol \insertsubsectionnavigationsymbol \insertsectionnavigationsymbol \insertdocnavigationsymbol \insertbackfindforwardnavigationsymbol \hspace{1em}% \usebeamerfont{footline} \insertframenumber/\inserttotalframenumber% } – Anderson Oct 8 '13 at 20:43
• I will see how to modify text color to black. – Anderson Oct 8 '13 at 21:03
• @Anderson see the updated code: if you use \addtobeamertemplate instead of \setbeamertemplate you keep the symbols – Bordaigorl Oct 8 '13 at 21:49
• I also just edited to suggest how to customise color and font (in a beamer idiomatic way) – Bordaigorl Oct 8 '13 at 21:54
• To fix the vertical alignment of the page number, I used: \raisebox{1.2pt}[0pt][0pt]{\insertframenumber/\inserttotalframenumber}. – Steve Oct 11 '17 at 18:46

You can add the following code before \begin{document}:

\expandafter\def\expandafter\insertshorttitle\expandafter{%
\insertshorttitle\hfill%

• So happy I found this comment. This does exactly what I needed, independent of the theme I use. My macro vocab however is small, and I'm stuck trying to merge it with another answer. My goal is to remove hyperref's linkcolor on \insertshorttitle in the footline in general, using something like \let\hyperlink\@secondoftwo. Is this an easy fix? – ddelange Apr 24 '18 at 19:13
• Consider my comment above solved! – ddelange Apr 24 '18 at 19:47
• Thanks for the answer, it worked! May I also ask you how can I flush it all the way right of the line? Thanks! – zyy Mar 4 '19 at 23:45

Before \begin{document} you need to include:

\setbeamertemplate{sidebar right}{}
\setbeamertemplate{footline}{%


This should work to put the frame number beside the navigation bar, not sure how to put it inside of the navigation bar.

• Ok. This works fine. But, I use "\logo" and "\setbeamertemplate{sidebar right}{}" disable the logo. – Anderson Oct 8 '13 at 20:42
• so if you add something like \logo{\includegraphics[scale=0.2]{imageName.jpg} } after the above code then you get no logo? – codeAndStuff Oct 8 '13 at 20:51
• Yes. My tex file has a \logo{\includegraphics[scale=.4]{logo-ic}} after your code, but don't show the logo. – Anderson Oct 8 '13 at 21:01

Actually, I want to supplenment MaxGraves's answer! (but I don't have enough reputation, sorry about that!)

My result will put the "page/total page" rightside and inside the navigation bar, instead of outside.

Note: \addtobeamertemplate{⟨element name⟩}{⟨pre-text⟩}{⟨post-text⟩}, hence you have to notice which bracket you put "page/total page" in. In my case, using Frankfurt theme, which have default navigation bar, put the followings before \begin{document} will show my results as the bottom.

\addtobeamertemplate{navigation symbols}{}{ \hspace{1em}    \usebeamerfont{footline}%


The reason I use \hspace{1em} \usebeamerfont{footline} is for good-looking, the front makes "page/total page" not too close to navigation bar, and the latter is just make it as big as I hope, more clearly, I think....

• This looks like a subset of the accept one. Would like to explain more? For example why you keep \usebeamerfont but not \usebeamercolor. And why are there so many useless spaces? – Symbol 1 Jan 10 '15 at 7:08
 \setbeamertemplate{navigation symbols}
\hspace{1em}
\usebeamerfont{footline}
\setcounter{page}{1}
\pagenumbering{arabic}
%add this code before begin doc
\begin{document}

• Welcome to TeX - LaTeX! This seems to be a duplicate (with a missing \ typo) of code in Anderson's comment to Bordaigorl's answer. That comment resulted in an a cleaner updated answer. In any case, code only answers are best combined with some text explanation. – Andrew Swann Sep 29 '15 at 6:46
\setbeamertemplate{page number in head/foot}[totalframenumber]


• Welcome to TeX.SE! Could you please extend your code snippet to a compilable and complete code? – user156344 Mar 11 '19 at 11:47
• Because the Darmstadt theme does not show any footline by default, you'll also have to set the footline template to make this work. – samcarter_is_at_topanswers.xyz Mar 11 '19 at 11:56

Este respuesta fue de mucha utilidad para mi. Gracias

\setbeamertemplate{navigation symbols}