TeXblog

 Typography with TeX and LaTeX

How to get rid of those beamer warnings

September 27th, 2008 by Stefan Kottwitz

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}

This entry was posted on Samstag, September 27th, 2008 at 22:23 and is filed under Presentations. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

46 responses about “How to get rid of those beamer warnings”

  1. Soptor said:

    Finally got rid of the two fontsize related warnings thanks to this post. Thanks a lot!

  2. B-ellanna said:

    Hi,
    Thank you for this workaround. It got on my nerves pretty soon.

    Unfortunately I’ve still got another warning in this Mimimal-Example:

    \documentclass[hyperref={pdfpagelabels=false}]{beamer}
    %\usepackage{default}
    \let\Tiny=\tiny
    \begin{document}
    \author{Max Muster}
    \begin{frame}
    Test
    \end{frame}
    \end{document}

    This will give the following warning: Package hyperref Warning: Option `pdfauthor’ has already been used,
    (hyperref) setting the option has no effect on input line 5.

    I use pdfTeX, Version 3.1415926-1.40.9 (MiKTeX 2.7)
    Document Class: beamer 2007/03/11 cvs version 3.07 (rcs-revision 1.70)

    Do you know why? Or how I can get rid of it?
    Thank you a lot!

    B-ellanna

  3. Stefan Kottwitz said:

    Hi B-ellanna,

    just call \author{Max Muster} before \begin{document} and this warning will disappear too.

    Stefan

  4. B-ellanna said:

    So easy?
    Thank you very much!!
    B-ellanna

  5. Kazik said:

    wow,
    thanks a lot, that was really annoying :-)

  6. Fitse said:

    I wonder how could i debug pdfLatex in using beamer. I am preparing slides but when I run it with pdfLatex, it says that”pdfLatex failed to creat a pdf file”. How can I resolve the problem. Thanks

  7. Beaver said:

    \RequirePackage{pgfcore} could NOT get rid of the warning: Package pgf Warning: This package is obsolete and no longer needed on input line 13.

  8. Stefan Kottwitz said:

    The trick with \RequirePackage{pgfcore} works if you create your own pgfbaseimage.sty as described above.

    Stefan

  9. Ashutosh said:

    Thanks, Stefan. It did fix errors from my presentation. Great!

  10. Jørgen said:

    Great info! Thanks.

  11. Ashish Jain said:

    Thank you so much for posting the above.

  12. Dimitris Leventeas said:

    Great! Thanks a lot for posting these instructions! These warnings were really annoying.

  13. Kedar said:

    Hey!

    Thanks a lot. It worked perfectly! Got rid of all the pesky warnings.

    I did not make/change the pdfbaseimage.sty file. I just made the changes you mentioned, and the warnings disappeared by themselves.

  14. Srinivasa said:

    Hi, Thank you so much! These fixes helped me clean up all the warnings! Thanks again!

  15. Beamer: obsolet-Warnhinweis | hilpers said:

    […] Re: Beamer: obsolet-Warnhinweis Ja, siehe auch: http://texblog.net/latex-archive/pre…amer-warnings/ […]

  16. James said:

    Thanks for this workaround, which finally kept those warnings from bugging me while I prepare my PhD defense presentation !

  17. HowTo: Librate de las molestas advertencias en la clase Beamer « LaTeX y algo más… said:

    […] Tomado de texblog.net […]

  18. alfC said:

    sorry, I still can’t get rid of everything. In this example:

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

    I get this warning:

    $ pdflatex example.tex
    This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)

    (/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty)
    Implicit mode OFF; no redefinition of LaTeX internals
    (/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)
    Hyperref stopped early
    )
    *hyperref using default driver hpdftex*
    (/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def)

  19. jhonoo said:

    Thanks for this information. I found the solution here! Now making my pro. slideshows. So long

  20. Bob said:

    Where do I put the pgfbaseimage.sty file (if I don’t want to put it in the the directory of the tex document)? I can’t figure out how to put it “somewhere into your texmf directory”. I have tried several places in:

    C:\Program Files\MiKTeX 2.8

    C:\Documents and Settings\~\Application Data\MiKTeX\2.8

    C:\Documents and Settings\~\Local Settings\Application Data\MiKTeX\2.8

    Thank you.

  21. Stefan Kottwitz said:

    Hi Bob,

    below C:\Program Files\MiKTeX 2.8 (perhaps deeper in texmf or tex subdirectory, I dont use MiKTeX) should work.
    But refresh the package database afterwards: open MiKTeX settings and click the button Refresh FNDB.

    Stefan

  22. Bob said:

    Thanks for your reply. I have saved it several places below C:\Program Files\MiKTeX 2.8. I wasn’t refreshing but I have now and still don’t get rid of the error. Thoughts? Thanks.

  23. Justin said:

    Stefan,

    Thanks much! I just started using Beamer today, and I appreciate the advice.

    A note on warning #2: when I opened pdfbaseimage.sty, I found the following line:

    \PackageWarning{pgf}{This package is obsolete and no longer needed}

    Just commenting out this line and saving the file also eliminates the error for me.

  24. Stefan Kottwitz said:

    Hi Justin,

    yes, that’s an easy way. I just would not recommend to modify package files of the TeX distribution directly, that’s why I’ve described that workaround.
    Btw. I expect that the beamer warnings will go away soon, because there’s a new maintainer for the beamer package and the development will continue.

    Stefan

  25. holle.ngopi.de » Latex beamer: Font shape noch available said:

    […] etwas längerer Recherche fand ich hier heraus, dass diese Fehlermeldung  aus den beamer classes stammt, und mit der simplen Zeile: […]

  26. Anna said:

    I got rid of the pfg warning as indicated, however my code is still not running, I got the message:
    finished with exit code 70
    and no output is produced… I am new at latex and I am using kile, any suggestion?

    Thanks!

  27. Stefan Kottwitz said:

    Hi Anna,

    have a closer look at the lower part of the Kile window: at the “Log and Messages” tab and also at the “Output” tab. They should show more information. Or open the .log file generated by Kile/LaTeX. You could also post this file here, or a relevant part of it, if you want to discuss it further.

    Best regards,

    Stefan

  28. Someguy said:

    No longer necessary to manually set pdfpagelabels to off (generate weird output).

    [package of 2010:06:18]

  29. sebastian said:

    Thank you!! Works fine!

  30. Philippe Dreuw said:

    Hi all,
    this should (must?) be disabled with beamer 3.10.

    Those of you who use beamerposter in combination with beamer should (must?) change their poster TeX files:

    \documentclass[final]{beamer} % beamer 3.10: do NOT use option hyperref={pdfpagelabels=false} !
    %\documentclass[final,hyperref={pdfpagelabels=false}]{beamer} % beamer 3.07: get rid of beamer warnings
    \mode { %% check http://www-i6.informatik.rwth-aachen.de/~dreuw/latexbeamerposter.php for examples
    \usetheme{Berlin} %% you should define your own theme e.g. for big headlines using your own logos
    }
    \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter} % e.g. for DIN-A0 poster

  31. Majid said:

    Great Job… Thanks a lot :)

  32. Paolo Monteverde said:

    Good tips! Finally I can compile without warnings!

  33. James said:

    Cheers, this fixed my LaTeX font warning instantly.

    “LaTeX Font Warning: Font shape `OT1/cmss/m/n’ in size not available” — gone :)

  34. BM said:

    Hello Stefan,

    Finally removed those annoying warnings.

    Many thanks for your post.

    BM

  35. Robert said:

    Great!
    This fixes all warnings in a minute.
    Thank You,
    Robert

  36. dan said:

    THX!!! Great Help

  37. Will said:

    Thanks so much! The warnings were driving me nuts!

  38. max said:

    thanks … it works

  39. Titi said:

    Thanks a lot!!

  40. cristobal said:

    THX a lot!

  41. joerg said:

    Very helpful! Thank you very much!

  42. Ermanno said:

    Very well done! Thank you very much!

  43. Markus said:

    over is the time of those annoying warnings—thanks a lot!

  44. Brian said:

    Thanks! No more annoying warnings.

  45. Jenny said:

    Thanks a lot, great help!

  46. Michael Koepf said:

    Perfect! Your entry is almost four years old, but still dead-on. Thanks a lot!

Leave a Reply