This is a problem that took me long to figure out, posting it here in the help it is useful.

The problem is the following:







  Dummy figure
  \caption{Caption with units: \SI{10}{m} vs 10~m}


Without the \usepackage[scaled]{berasans} line, everything works perfectly fine, and the fonts in the legend are homogeneous. However, with the redefinition of the default sans serif font, there is a significant mismatch between the fonts of the \SI{10}{m} command in the legend and the following 10~m (and yes, I know the spacing is wrong but that's not the point).

1 Answer 1


It took me forever to realize that the problem was that the output of the \SI command is not typeset using \sfdefault, but using \mathsf, which is not redefined by the \usepackage[scaled]{berasans}.

My fix was to add the following in the preamble:


This redefines the default family for \mathsf ot be the same as what the berasans package defines as the \sfdefault family.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .