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.
LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available
LaTeX Font Warning: Size substitutions with differences

I am using the files from http://www.poirrier.be/~jean-etienne/info/latexbeamer/latex-beamer.tar.gz.

How to remove the above 2 warnings?

share|improve this question
1  
Please always include some code right in your question so that other users, including those who want to and are going to help you, can see the problem directly on here without having to go to some external web site. It'd be good if you could do that for this question as well, even though it has been answered. –  doncherry Jun 1 '12 at 7:37

2 Answers 2

up vote 42 down vote accepted

Add

\usepackage{lmodern}% http://ctan.org/pkg/lm

to your document preamble.

Fonts are typically available only in certain sizes/increments. As an example, the basic article document class loads only the following sizes (from size10.clo):

  • \tiny @ 5pt;
  • \scriptsize @ 7pt;
  • \footnotesize @ 8pt;
  • \small @ 9pt;
  • \normalsize @ 10pt;
  • \large @ 12pt;
  • \Large @ 14.4pt;
  • \LARGE @ 17.28pt;
  • \huge @ 20.74pt; and
  • \Huge @ 24.88pt

So, requesting a 15pt font size using something like

\documentclass{article}
\begin{document}
\fontsize{15}{18}\selectfont Hello world.
\end{document}

leads to LaTeX complaining in the .log file:

LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <15> not available
(Font)              size <14.4> substituted on input line 3.
...
LaTeX Font Warning: Size substitutions with differences
(Font)              up to 0.6pt have occurred.

Using lmodern removes this restriction by allowing font sizes at arbitrary sizes. For more on font size requirements, see Fonts at arbitrary sizes.

share|improve this answer
2  
I know this workaround, but I also know that if you do that, math accents will be typesetted very badly. You can try i.e. $\ddot u$ or $\tilde J$ –  Wauzl Oct 17 '12 at 7:44
    
I used package lmodernand it worked fine until I used \scshape and no matter the size I still get the same error. Any ideas? –  Vagelis Bebelis Jun 4 at 14:22
    
@VagelisBebelis: Where are you using \scshape? Perhaps with a bold or italics font? They don't have small-caps included. –  Werner Jun 4 at 16:23
    
@Werner I use it with beamer. The small-caps show nicely but I get the warning. So, I guess I just need to change font to one that supports small-caps? –  Vagelis Bebelis Jun 4 at 16:55

You can add this \let\Tiny=\tiny just after the documentclass declaration. So, it should look something like this:

\documentclass{beamer}
\let\Tiny=\tiny

Hope this helps! :)

Links: [1] http://texblog.net/latex-archive/presentations/beamer-warnings/

share|improve this answer

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.