Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
I think you can also try \addtobeamertemplate{footline}{\vspace{-0.5cm}}{\vspace{0.5cm}}. –  Claudio Fiandrino Apr 11 at 12:59

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer
    
Thank you very much for the swift response and working solution! –  emelaktas Apr 11 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. –  Gonzalo Medina Apr 11 at 20:47

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 beamer 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]

share|improve this answer
    
Many thanks for the swift response and working solution. –  emelaktas Apr 11 at 12:55
1  
You can replace the combination of \defbeamertemplate and \setbeamertemplate with \defbeamertemplate*. –  David Z Apr 11 at 20:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.