How to get rid of those beamer warnings

Many users of the beamer class are irritated by several beamer warnings at every compiler run that are not caused by themselves, I’m referring to the beamer version 3.07. Those warnings are not really important, but it’s a good habit to debug all warnings instead of just ignoring them, otherwise an important warning could easily be overlooked.

When I compile this really small example:

\documentclass{beamer}
\begin{document}
\begin{frame}
Test
\end{frame}
\end{document}

I’m getting 6 warnings, after the second compilation of course less, but these 4 warnings remain:

  1. Package pgf Warning: This package is obsolete and no longer needed on input line 13.
  2. Package hyperref Warning: Option `pdfpagelabels’ is turned off
    (hyperref) because \thepage is undefined.
    Hyperref stopped early
  3. LaTeX Font Warning: Font shape `OT1/cmss/m/n’ in size <4> not available
    (Font) size <5> substituted on input line 6.
  4. LaTeX Font Warning: Size substitutions with differences
    (Font) up to 1.0pt have occurred.

Let’s eliminate those warnings:

  1. beamer.cls is loading the obsolete package pgfbaseimage.sty that does nothing but loads pgfcore and prints out this warning. If you put a file with the same name pgfbaseimage.sty somewhere into your texmf directory (TEXMFHOME for example) or into the directory of your tex document containing just the line \RequirePackage{pgfcore} the warning will disappear.
  2. Set pdfpagelabels to false by yourself, by providing a beamer class option: hyperref={pdfpagelabels=false}
  3. beamerbasefont.sty defines the commands \Tiny and \TINY to choose very small font sizes. Redefine at least \Tiny or load a font providing that size, for instance Latin Modern.
  4. fixed by 3.

The new file:

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\let\Tiny=\tiny
\begin{document}
\begin{frame}
Test
\end{frame}
\end{document}

will not cause warnings any more. Using those workarounds you won’t be annoyed by unnecessary warnings during development of presentations. Though the redefinition of \Tiny will fix it for Computer Modern fonts I recommend to consider to use Latin Modern instead:

\usepackage{lmodern}

27. September 2008 by stefan
Categories: LaTeX General | 52 comments