2

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.

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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