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}
1
  • The \title[]{\sc} doesn't look complete... Mar 19, 2017 at 20:41

1 Answer 1

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

1
  • Great! It helps
    – Qwerty
    Mar 19, 2017 at 20:46

You must log in to answer this question.

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