5

The following MCE points out that, even "protected" with comments, \setbeamerfont{footnote}{...} causes a spurious horizontal space.

Do you know why and how to circumvent this space?

\documentclass{beamer}
\newcommand{\mytinyfootnote}[1]{%
  \setbeamerfont{footnote}{size=\tiny}%
  \footnote{#1}%
}
\begin{document}
\begin{frame}
  \begin{itemize}
  \item Foo\mytinyfootnote{Bar}
  \item Foo\footnote{Bar}
  \end{itemize}
\end{frame}
\end{document}

enter image description here

1 Answer 1

7

There are spurious spaces in the definitions (imho it is not really a good idea to use \setbeamerfont in this place. Fonts should be setup in the preamble).

\documentclass{beamer}
\newcommand{\mytinyfootnote}[1]{%
   \setbeamerfont{footnote}{size=\tiny}%
  \footnote{#1}%
}
\makeatletter
\renewcommand\beamer@clearbeamerfont[2]{%
  \def\beamer@temp{#1}%
  \setkeys{beamerthm}{size={},shape={},series={},family={},parent={}}%
  \setkeys{beamerthm}{#2}%
}

\renewcommand\beamer@setbeamerfont[2]{%
  \def\beamer@temp{#1}%
  \setkeys{beamerthm}{#2}%
}

\begin{document}
\begin{frame}
  \begin{itemize}
  \item  Foo\mytinyfootnote{Bar}
  \item Foo\footnote{Bar}
  \end{itemize}
\end{frame}
\end{document}
1
  • I know changing the size of the footnotes in the middle of the document isn't a good practice :) Here, it is for very a special case. BTW, the spaces in the definition are removed in the beamer's development version. May 21, 2017 at 20:19

You must log in to answer this question.

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