3

Preparing a beamer presentation with my own template, I wanted to change for a single slide that the foot line gets a white background (because I have a graphic that exceeds the margins). So I changed the text in foot beamer template (which is called by the footline template) to wrap everything within a colorbox. After compiling I saw that the the foot line on this slide has a different inter-letter spacing than all the other slides.

Reducing the document to a minimum code that still reproduces this feature, I found that the helvet package, a beamercolorbox and the colorbox seem to be necessary. So here is a MWE:

\documentclass{beamer}
\usepackage{helvet}

\setbeamertemplate{footline}{
    \begin{beamercolorbox}[dp=1ex]{text in head/foot}
        \usebeamertemplate{text in foot}
    \end{beamercolorbox}
}
\setbeamertemplate{text in foot}{
    \insertshortauthor~~--~~Page~\insertframenumber
}

\author{My Name}

\begin{document}

\begin{frame}
\end{frame}

\bgroup
\setbeamertemplate{text in foot}{\hspace*{-0.5\fboxsep}\colorbox{white}{%
    \insertshortauthor~~--~~Page~\insertframenumber
}}
\begin{frame}
\end{frame}
\egroup

\end{document}

enter image description here

What you see is that the distance between M and y, or N and a is different on the two slides. So here is my question:

  • What causes this difference?
  • Which of the two versions is "right", i.e. properly typeset?
  • 1
    I see no difference (when I compile it myself). Are you sure it's not just a screen artifact? BTW, it's the kerning, not letterspacing, that is different - letterspacing would apply to all inter-letter spaces. – Robert Jun 12 '17 at 13:46
  • I tested it with different zooms and more than just two slides. It is always only the slides with the additional colorbox that have the different kerning. – Tiuri Jun 12 '17 at 13:49
  • I agree with @Robert - compiling with pdflatex from texlive2017 I don't see any difference. – user36296 Jun 12 '17 at 19:34
1

Why not simply change the colour?

\documentclass{beamer}
\usepackage{helvet}

\setbeamercolor{text in head/foot}{fg=black, bg=blue}

\setbeamertemplate{footline}{%
    \begin{beamercolorbox}[dp=1ex, ht=2ex]{text in head/foot}%
        \usebeamertemplate{text in foot}%
    \end{beamercolorbox}%
}
\setbeamertemplate{text in foot}{%
    ~\insertshortauthor~~--~~Page~\insertframenumber%
}

\author{My Name}

\begin{document}

\begin{frame}
\end{frame}

\bgroup
\setbeamercolor{text in head/foot}{fg=black, bg=red}
\begin{frame}
\end{frame}
\egroup

\end{document}
  • Sure, that is the better way of doing this (and I will in the end, but that will require some more work in my actual template). However, this doesn't answer why _ the letterspacing is different and _which of the two versions has the proper typesetting. – Tiuri Jun 12 '17 at 12:52

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.