1

I am using Beamer and I managed to put next to the page number the word "Pag:". To do so, I used \raisebox{1.39cm} (line 28 of the code below) until Pag. and the page number were aligned. However, even if it works, I do not like this solution because it is not precise. Can you come up with a better solution?

\documentclass[8pt,handout]{beamer}
\setbeamertemplate{frametitle}[default][center]
\usepackage[italian,english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{pifont} %per il simbolo dell'elenco puntato
\setbeamercolor{item}{fg=black} %simbolo elenco puntato di nero
\setbeamercolor{frametitle}{fg=black} %frametitle di colore nero
\renewcommand{\sfdefault}{phv} %cambia il font
\usepackage{textpos}

\title{Title}
\author{Author}
\date{}

                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %   Code for the number position of the page  %
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamercolor{page number in head}{fg=black}

\defbeamertemplate{footline}{myframe number}
{
  \hfill%
  \usebeamercolor[fg]{page number in head}%
  \usebeamerfont{page number in head}%
  \raisebox{1.39cm}[0pt][0pt]{ %<----------------  Vertical position of the number
  \shifttext{-619pt}{\insertframenumber}} %<------ Horizontal position of the number
}

\makeatletter 
\newcommand*{\shifttext}[2]{%
  \settowidth{\@tempdima}{#2}%
  \makebox[\@tempdima]{\hspace*{#1}#2}%
}
\makeatother
\setlength{\parindent}{0pt}

\setbeamertemplate{footline}[myframe number]

                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %  End of the code
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamersize{text margin left=40pt,text margin right=40pt}

\begin{document}

\begin{frame}
 \maketitle
\end{frame}

%                         Position of Pag.                  
\addtobeamertemplate{frametitle}{}{%
\begin{textblock*}{100mm}[0.88,-48.2](.85\textwidth,-1cm) %[0.88,-48.2] are coordinates
\parbox{1cm}{\centering
\tiny Pag.}
\end{textblock*}}


\begin{frame}
  \frametitle{\textbf{Title}}
 \begin{itemize}
  \item[\ding{226}] Text

\end{itemize}

\end{frame}
\end{document}

enter image description here

1 Answer 1

2

You can define the footline like this:

\setbeamertemplate{footline}{
  \usebeamercolor[fg]{page number in head}%
  \usebeamerfont{page number in head}%
  \hspace{40pt}
  Pag. \insertframenumber
  \vspace{40pt}
}
2
  • Did you keep the \setbeamertemplate{footline}[myframe number] command? I changed my code now, that it is not necessary any more.
    – Benjamin
    Commented Jan 10, 2016 at 19:12
  • Now it works. I had cancelled \setbeamertemplate{footline}[myframe number]
    – Marco
    Commented Jan 10, 2016 at 19:13

You must log in to answer this question.

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