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

Comments (52)

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

  2. 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}
    letTiny=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. Hi B-ellanna,

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

    Stefan

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

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

  6. 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. 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. The trick with RequirePackage{pgfcore} works if you create your own pgfbaseimage.sty as described above.

    Stefan

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

  10. Great info! Thanks.

  11. Thank you so much for posting the above.

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

  13. 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. Hi, Thank you so much! These fixes helped me clean up all the warnings! Thanks again!

  15. Pingback: Beamer: obsolet-Warnhinweis | hilpers

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

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

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

    documentclass[hyperref={pdfpagelabels=false}]{beamer}
    letTiny=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. Thanks for this information. I found the solution here! Now making my pro. slideshows. So long

  20. 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 FilesMiKTeX 2.8

    C:Documents and Settings~Application DataMiKTeX2.8

    C:Documents and Settings~Local SettingsApplication DataMiKTeX2.8

    Thank you.

  21. Hi Bob,

    below C:Program FilesMiKTeX 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. Thanks for your reply. I have saved it several places below C:Program FilesMiKTeX 2.8. I wasn’t refreshing but I have now and still don’t get rid of the error. Thoughts? Thanks.

  23. 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. 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. Pingback: holle.ngopi.de » Latex beamer: Font shape noch available

  26. 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. 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. No longer necessary to manually set pdfpagelabels to off (generate weird output).

    [package of 2010:06:18]

  29. Thank you!! Works fine!

  30. 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. Great Job… Thanks a lot :)

  32. Good tips! Finally I can compile without warnings!

  33. Cheers, this fixed my LaTeX font warning instantly.

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

  34. Hello Stefan,

    Finally removed those annoying warnings.

    Many thanks for your post.

    BM

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

  36. THX!!! Great Help

  37. Thanks so much! The warnings were driving me nuts!

  38. thanks … it works

  39. Thanks a lot!!

  40. THX a lot!

  41. Very helpful! Thank you very much!

  42. Very well done! Thank you very much!

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

  44. Thanks! No more annoying warnings.

  45. Thanks a lot, great help!

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

  47. Thank you very much! :)

  48. Thank you! I am working with Texmaker on Windows for the first time. Those warnings ennoyed me – they never occured to me when using kile on a Linux os (Mint and Ubuntu). Thanks a lot.

  49. Hi, I have the same problem as B-ellanna. So I moved the \author{…} before the \begin{document}, but then this error message appears:
    Composite letter `\textasciigrave+y’(hyperref) not defined in PD1 encoding,(hyperref) removing `\textasciigrave’

    My name is written with these : \`{y} and \^{e} how can I include them?

  50. Me salvaste viejo.
    mil gracias!!!

  51. I found a good cure for me, which appears to solve any problem related with the “LaTeX Font Warning: Font shape `OMS/lmss/m/n’ undefined”

    Reference: http://tex.stackexchange.com/questions/195597/change-font-shape-to-oms-cmsy-m-n-to-prevent-warning

    Solution:
    % || LaTeX Font Warning: Font shape `OMS/lmss/m/n’ undefined
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}
    \usepackage{textcomp}

Leave a Reply to Jørgen Cancel reply

Required fields are marked *