0

I am using Warsaw theme. There is no space in the short title and slide number in the footline of my beamer presentation.

This is my MWE:

\documentclass{beamer}
\mode<presentation>{\usetheme{Warsaw}}
%% preamble
\title[]{\sc}

\makeatletter
\setbeamertemplate{footline}{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.24 \paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.01cm plus1fill,rightskip=.05cm]{author in head/foot}%
            \usebeamerfont{title in head/foot}\insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.76\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.05cm,rightskip=.15cm plus1fil]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle
        \insertframenumber{} / \inserttotalframenumber \ \hspace*{2ex} 
    \end{beamercolorbox}}%
    \vskip0pt%
}
\makeatother

\begin{document}
\begin{frame}
Hello World!
\end{frame}
\end{document}
2

Commands that just print a text normally make the following space(s) disappear (see Space after LaTeX commands for example).

In order to prevent this you can use (1) \command{} (2) \command\ (space after \) or (3) use the xspace package (if you create your own commands). The list is not complete I guess.

Short Solution

\insertshorttitle{}

Complete Code

\documentclass{beamer}
\mode<presentation>{\usetheme{Warsaw}}
%% preamble
\title[Short Title]{Long Title}

\makeatletter
\setbeamertemplate{footline}{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.24 \paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.01cm plus1fill,rightskip=.05cm]{author in head/foot}%
            \usebeamerfont{title in head/foot}\insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.76\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.05cm,rightskip=.15cm plus1fil]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle{}
        \insertframenumber{} / \inserttotalframenumber \ \hspace*{2ex} 
    \end{beamercolorbox}}%
    \vskip0pt%
}
\makeatother

\begin{document}
\begin{frame}
Hello World!
\end{frame}
\end{document}

Output

enter image description here

  • Great! It helps – Qwerty Mar 19 '17 at 20:46

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.