3

I encountered a strange definition in the footline environment of beamer. Here is a minimal example, which shows the problem:

\documentclass[hyperref={pdfpagelabels=false},rgb]{beamer}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{%
   \leavevmode%
   \hfill\rule{0.89\textwidth}{0.2pt}\hfill \\
   \begin{beamercolorbox}[wd=4cm,leftskip=0.5cm,sep=10pt]{page number}
    \insertframenumber
   \end{beamercolorbox}
   \hspace*{4cm}}%
\begin{document}

  \begin{frame}
  \end{frame}

\end{document}

Behind the rule there will be printed a ",". This is due to the defintion of \ \ in the footline. I have got one solution for the problem:

\setbeamertemplate{footline}{%
   \leavevmode%
   \hfill\rule{0.89\textwidth}{0.2pt}\hfill\hfill\textcolor{white}{ }
   \begin{beamercolorbox}[wd=4cm,leftskip=0.5cm,sep=10pt]{page number}
      \insertframenumber
    \end{beamercolorbox}
   \hspace*{4cm}}

Is there a better solution for that problem and why is the \ \ redefined in the footline.

2
  • 2
    Maybe \hfill\rule{0.89\textwidth}{0.2pt}\hfill\ \newline or \hfill\rule{0.89\textwidth}{0.2pt}\hfill\hfill\newline
    – Benjamin
    Commented Dec 16, 2015 at 17:32
  • @Benjamin Would you like to convert your comment into an answer? Commented Dec 26, 2016 at 20:14

1 Answer 1

4

Converting @Benjamins comment into a CW answer:

\documentclass[hyperref={pdfpagelabels=false},rgb]{beamer}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{%
   \leavevmode%
   \hfill\rule{0.89\textwidth}{0.2pt}\hfill\ \newline
   \begin{beamercolorbox}[wd=4cm,leftskip=0.5cm,sep=10pt]{page number}
    \insertframenumber
   \end{beamercolorbox}
   \hspace*{4cm}}%
\begin{document}

  \begin{frame}
  \end{frame}

\end{document}

enter image description here

You must log in to answer this question.

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