3

I'm having some issues with the sansmathfonts large operators. The code

\documentclass{article} 

% \usepackage{amsmath}
% \usepackage{sansmathfonts}

\begin{document}

abc $\displaystyle\int$ \footnotesize abc $\displaystyle\int abc$

\end{document}

with both packages commented out yields

enter image description here

The letters are indeed smaller, but the integral remains the same. This can be "fixed" by loading amsmath

enter image description here

However, when loading also sansmathfonts the problem comes back

enter image description here

I gave a look at omxcmssex.fd but things like \DeclareFontShape are sadly still quite a mystery to me...

4

The problem is very similar to Ugly alignment (size of square root symbol) with Latin Modern at 12pt

Declare the OMX font to be scalable instead of “fixed”.

\documentclass{article}

\usepackage{amsmath}
\usepackage{sansmathfonts}

\DeclareFontFamily{OMX}{cmssex}{}
\DeclareFontShape{OMX}{cmssex}{m}{n}{
  <-7.5> cmssex7
  <7.5-8.5> cmssex8
  <8.5-9.5> cmssex9
  <9.5-> cmssex10
}{}

\begin{document}

abc $\displaystyle\int abc$ \footnotesize abc $\displaystyle\int abc$

\end{document}

enter image description here

UPDATE 2019-06-12

The 2019-06-10 release of sansmathfonts fixes the issue. Now, with

\documentclass{article}

\usepackage{amsmath}
\usepackage{sansmathfonts}

\begin{document}

abc $\displaystyle\int abc$ \footnotesize abc $\displaystyle\int abc$

\end{document}

you get the same output as above.

  • I actually suspected that and I'm pretty sure I had tried that out... – campa Jun 6 at 11:13
  • @campa The difference is “been there, done that”. ;-) – egreg Jun 6 at 11:19
  • @campa Actually something better can be done. Added the available sizes. – egreg Jun 6 at 11:24
  • @egreg is that an issue in one of the sansmathfonts? because I did get the maintainer to update all the associated fd files. I can write the maintainer to get this updated. – daleif Jun 6 at 12:04
  • 1
    @campa I had the maintainer update the fd files a few months ago, but apparently missed that one. I think this font works a lot better with beamer than the normal beamer math setup – daleif Jun 6 at 16:47

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.