When I use \fontsize{foo}{bar}{baz} to increase the font size, not all the maths symbols increase accordingly. For example, the \int, \sqrt (display style) and lines when drawing fractions don't increase accordingly.


{\fontsize{50}{62.500000}{\rmfamily $\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{1}{\sqrt{2\pi\sigma}} \exp(-\dfrac{x^2}{2\sigma^2})} \dd{x} = 1 $}}


enter image description here

whereas without the fontsize command everything looks as it should:

enter image description here

Is there a package I can add or a small fix to sort this out?

What I've tried so far

I thought adding \DeclareMathSizes{50}{45}{35}{25} to the preamble would sort this out but it appears not.

Why the massive font?

This is actually output from using Python's matplotlib package, ultimately stemming from this issue Matplotlib some LaTeX symbols not scaling with increased figure sizes which based on this answer, is a result of what LaTeX is producing. Hence if I can figure out how to get LaTeX to produce the right out put then I can look at modifying matplotlib's behaviour. Hence a very minimal modification would be preferred.


1 Answer 1


This is the same problem as in Ugly alignment (size of square root symbol) with Latin Modern at 12pt

A minimal cure is to load fixcmex. Also, lmodern should be loaded earlier.

I wouldn't use neither physics nor nicefrac. Also it doesn't make much sense to load fontenc with no option.

$\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{1}{\sqrt{2\pi\sigma}} 
\exp(-\dfrac{x^2}{2\sigma^2})} \dd{x} = 1 $}}

enter image description here

  • I believe loading fontenc without option is rather useless, isn't it?
    – campa
    Aug 23, 2018 at 10:29
  • @campa Yes, I forgot to mention it.
    – egreg
    Aug 23, 2018 at 10:33
  • Just what I needed, Thanks. Also, I forgot about fontenc. Also, is there a justification for erring away from physics and nicefrac? Nicefrac I occasionally use, but physics I use heavily.
    – oliversm
    Aug 23, 2018 at 10:39
  • 2
    @oliversm physics is, in my opinion, a collection of badly written macros. Also, the fractions of nicefrac are good for recipe books, not for mathematics.
    – egreg
    Aug 23, 2018 at 10:42
  • 1
    @oliversm Enlarge at the maximum view and you'll see what bitmap means.
    – egreg
    Mar 21, 2019 at 18:29

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.