7

How can we change the position of slide numbers? For example shift it upward by 1 cm in the y-axis?

\documentclass{beamer}

      \usepackage{datetime}
      \ddmmyyyydate

      \renewcommand{\rmdefault}{phv}
      \renewcommand{\sfdefault}{phv}

      \definecolor{prussian}{RGB}{0,44,98}
      \definecolor{prussiangrey}{RGB}{98,99,104}

      \title{\textbf{Some Presentation}}

      % Decrease 0.5 to make closer to the author name.
      \author{Dr~Emel~Aktas \\ \vspace{0.5\baselineskip} \small \today}

      \date{}

      \subject{Some Presentation}

      \beamertemplatenavigationsymbolsempty 

      \setbeamertemplate{footline}[frame number]

      \setbeamercolor{page number in head/foot}{fg=red}
      \setbeamercolor{title}{fg=black}
      \setbeamercolor{subtitle}{fg=prussian}
      \setbeamercolor{frametitle}{fg=prussiangrey}
      \setbeamercolor{itemize item}{fg=prussian}
      \setbeamercolor{itemize subitem}{fg=prussian}
      \setbeamercolor{enumerate item}{fg=prussian}
      \setbeamercolor{enumerate subitem}{fg=prussian}
      \setbeamercolor{section in toc}{fg=prussian}

      \setbeamerfont{frametitle}{series=\bfseries}

      \begin{document}
      \setbeamertemplate{itemize items}[square]

      % Increase 3.5 to move away from the line on southwest corner
      \addtobeamertemplate{title page}{\vspace{3.5\baselineskip}}{}


      \begin{frame}
          \titlepage
      \end{frame}

      \begin{frame}{Outline}
          \tableofcontents
      \end{frame}

      \section{First Section}
      \subsection{First Subsection}

      \begin{frame}{First Slide Title}{Optional Subtitle}
        \begin{enumerate}
             \item {
                 My first point.
                     }
             \item {
                 My second point.
                     }
        \end{enumerate}
      \end{frame}

\end{document}

Slide with frame

1
  • 1
    I think you can also try \addtobeamertemplate{footline}{\vspace{-0.5cm}}{\vspace{0.5cm}}. Apr 11, 2014 at 12:59

2 Answers 2

7

One option, redefining the footline template in a similar fashion to the one used by the frame number option defined in beamerbaseauxtemplates.sty. You can adjust the desired location by changing the length I used in the part marked with <--- change here:

\documentclass{beamer}

      \usepackage{datetime}
      \ddmmyyyydate

      \renewcommand{\rmdefault}{phv}
      \renewcommand{\sfdefault}{phv}

      \definecolor{prussian}{RGB}{0,44,98}
      \definecolor{prussiangrey}{RGB}{98,99,104}

      \title{\textbf{Some Presentation}}

      % Decrease 0.5 to make closer to the author name.
      \author{Dr~Emel~Aktas \\ \vspace{0.5\baselineskip} \small \today}

      \date{}

      \subject{Some Presentation}

      \beamertemplatenavigationsymbolsempty 


      \setbeamercolor{page number in head/foot}{fg=red}
      \setbeamercolor{title}{fg=black}
      \setbeamercolor{subtitle}{fg=prussian}
      \setbeamercolor{frametitle}{fg=prussiangrey}
      \setbeamercolor{itemize item}{fg=prussian}
      \setbeamercolor{itemize subitem}{fg=prussian}
      \setbeamercolor{enumerate item}{fg=prussian}
      \setbeamercolor{enumerate subitem}{fg=prussian}
      \setbeamercolor{section in toc}{fg=prussian}

      \setbeamerfont{frametitle}{series=\bfseries}

\defbeamertemplate{footline}{myframe number}
{
  \hfill%
  \usebeamercolor[fg]{page number in head/foot}%
  \usebeamerfont{page number in head/foot}%
  \raisebox{1cm}[0pt][0pt]{% <--- change here
    \insertframenumber\,/\,\inserttotalframenumber\kern1em}%
}

\setbeamertemplate{footline}[myframe number]


      \begin{document}
      \setbeamertemplate{itemize items}[square]

      % Increase 3.5 to move away from the line on southwest corner
      \addtobeamertemplate{title page}{\vspace{3.5\baselineskip}}{}


      \begin{frame}
          \titlepage
      \end{frame}

      \begin{frame}{Outline}
          \tableofcontents
      \end{frame}

      \section{First Section}
      \subsection{First Subsection}

      \begin{frame}{First Slide Title}{Optional Subtitle}
        \begin{enumerate}
             \item {
                 My first point.
                     }
             \item {
                 My second point.
                     }
        \end{enumerate}
      \end{frame}

\end{document}

enter image description here

2
  • Thank you very much for the swift response and working solution!
    – emelaktas
    Apr 11, 2014 at 12:56
  • 1
    @emelaktas You're welcome! Notice that with the approach from the accepted answer, the complete footline height is increased, thus the text area height is reduced; with my answer, the text area remains constant and only the frame numbers are shifted. Apr 11, 2014 at 20:47
6

Basically the same like Gonzalo Medina's answer (who was 1 minute faster), but instead of the \raisebox you can simply play a bit with the value of the \vskip20pt.

\documentclass{beamer}

\defbeamertemplate{footline}{higher page number}
{%
  \hfill%
  \usebeamercolor[fg]{page number in head/foot}%
  \usebeamerfont{page number in head/foot}%
  \insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip20pt%
}
\setbeamertemplate{footline}[higher page number]

\begin{document}

    \begin{frame}
        test
    \end{frame}

\end{document}

Warning:

Be aware, that this solution has the disadvantage that the size of the whole footline is increased, thus resulting in reduced space for the text body. But in some cases, like a projector which is cutting away the lower part of the slide, this may be helpful.

[Code for the \defbeamertemplate{footline}{page number} taken from beamerbaseauxtemplates.sty]

2
  • Many thanks for the swift response and working solution.
    – emelaktas
    Apr 11, 2014 at 12:55
  • 2
    You can replace the combination of \defbeamertemplate and \setbeamertemplate with \defbeamertemplate*.
    – David Z
    Apr 11, 2014 at 20:30

You must log in to answer this question.

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