Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Forgive me I am new to LaTex. I have a presentation that I would like to do in Beamer, but it fails to compile when I include letters in my math statements.

For example, the following will compile,

\documentclass{beamer}

\usepackage{amsmath}

\begin{document}

\title{Midterm Presentation of Doom}

\frame{\frametitle{Example}

$ 1 + 1 $

$ \lambda $

}

\end{document}

However, the following will NOT complile,

\documentclass{beamer}

\usepackage{amsmath}

\begin{document}

\title{Midterm Presentation of Doom}

\frame{\frametitle{Example}

$ 1 + 1 = a $

$ \lambda * b $

}

\end{document}

The error that I get are

  Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted 

I am using TeXstudio 2.6.6 + MikTex 2.9, if this matters.

share|improve this question
4  
That is not an error, it's just an informational message –  David Carlisle Apr 11 at 21:47
    
Prefer the syntax \begin{frame}\frametitle{Title}<BODY>\end{frame} –  egreg Apr 11 at 22:15

1 Answer 1

up vote 10 down vote accepted

Both your example codes compile with no errors, and both of them produce the warning messages

LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available size <5>
substituted on input line 15.

LaTeX Font Warning: Size substitutions with differences up to 1.0pt have occurred.

As David has pointed out in his comment, those are not errors but just warning messages informing you that some font sizes (4pt, in this case) were not available in the current font used, so LaTeX used a different back-up size (5pt) instead.

The warnings come from the fact that beamer defines (the definitions are in beamerbasefont.sty) and uses some non-standard font sizes \Tiny and \TINY:

\newcommand\Tiny{\@setfontsize\Tiny{4}{5}}
\newcommand\TINY{\@setfontsize\Tiny{3}{4}}

which are not available in the default CM fonts. You can prevent the warning in a number of ways:

  1. By loading the fix-cm package if you want to stick to CM fonts.

  2. By loading another font with arbitrary scalable sizes, such as lmodern (and using the professionalfonts font theme for beamer):

    \usepackage{lmodern}
    \usefonttheme{professionalfonts}
    
  3. If none of the above is a valid option, as a last resource you can \let the problematic size to a familiar one, by adding to the preamble

    \let\Tiny\tiny
    

By the way, there's no need to explicitly load amsmath with beamer, since the class internally loads it.

share|improve this answer
    
Thank your for your help. Using either \usepackage{lmodern} or \usefonttheme{professionalfonts} allows my presentation to compile with out error or warnings. –  Jeremy Apr 12 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.