1

The following example gives the warning shown below:

\documentclass{book}
\usepackage{amsmath}
\usepackage[matha]{mathabx}
\usepackage{mathpazo}
\begin{document}
$\text{$a$}$
\end{document}

LaTeX Font Warning: Size substitutions with differences
(Font)              up to 0.43996pt have occurred.

Using:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)

Each of the following makes the warning go away:

  • omitting mathabx or mathpazo
  • changing document font size to 11pt or 12pt
  • writing $a$ or $\text{a}$ instead

Questions: should this warning be taken as serious? Could it be pointing to something that could impair the look of the document? If so, are there any solutions?

I cannot see any problems in the PDF output, but would like to be sure.

2
  • 1
    Isn't it just mathabx? I would probably not use that package anyway.
    – daleif
    Oct 8 '15 at 9:52
  • The warning disappears when I remove mathpazo or replace it by lmodern. Oct 8 '15 at 10:18
4

If you add

\usepackage{tracefnt}

you get more information from the font system, in particular it tells you which font got substituted:

LaTeX Font Warning: Font shape `U/matha/m/n' in size <7.6> not available
(Font)              size <8> substituted on input line 8.

So you could decide that you don't care that superscripts are using an 8pt font instead of a 7.6pt font (.4pt really isn't very big:-) But if you do care then...

Looking at the package the reason for the substitution is

\DeclareFontShape{U}{matha}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * matha
      <10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12
      }{}

which says that the font is only available in discrete sizes so LaTeX substitutes to the nearest one.

The need for these substitutions doesn't really apply if (as here) the font is now available in scalable form, so just as the fix-cm (or older type1cm) packages replace the standard declarations with ones allowing font scaling, you can do the same here

\DeclareFontShape{U}{matha}{m}{n}{
      <-6> matha5
      <6-7> matha6
      <7-8> matha7
      <8-9> matha8
      <9-10> matha9
      <10-12> matha10 
      <12-> matha12
      }{}

says that for any size request between 7pt <= s < 8pt use a scaled version of matha7.

So this runs without warning

\documentclass{book}
\usepackage{amsmath}
%\usepackage{tracefnt}
\usepackage[matha]{mathabx}
\DeclareFontShape{U}{matha}{m}{n}{
      <-6> matha5
      <6-7> matha6
      <7-8> matha7
      <8-9> matha8
      <9-10> matha9
      <10-12> matha10 
      <12-> matha12
      }{}
\usepackage{mathpazo}
\begin{document}
$\text{$a$}$
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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