# Problem in beamer class linebreak in footline

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{footline}{%
\leavevmode%
\hfill\rule{0.89\textwidth}{0.2pt}\hfill \\
\begin{beamercolorbox}[wd=4cm,leftskip=0.5cm,sep=10pt]{page number}
\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}
\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? – samcarter_is_at_topanswers.xyz Dec 26 '16 at 20:14

Converting @Benjamins comment into a CW answer:

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