6

Consider the following MWE

\documentclass{beamer}

\usepackage[english,spanish]{babel}
\uselanguage{spanish}
\languagepath{spanish}

\usepackage{lmodern}
\usefonttheme[onlymath]{serif}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{frame}
  $\max \lim$
\end{frame}
\end{document}

With this MWE the math operators accents overlap:

enter image description here

How can I fix this in order to obtain máx and lím?

10

If you are planning to use a non-default font (lmodern, in your case), it is advisable to use the professionalfonts font theme

\usefonttheme{professionalfonts}

to prevent beamer from doing some undesired replacements:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel}
\uselanguage{spanish}
\languagepath{spanish}

\usepackage{lmodern}
\usefonttheme[onlymath]{serif}
\usefonttheme{professionalfonts}

\begin{document}
\begin{frame}
  $\max \lim$
\end{frame}
\end{document}

enter image description here

According to the beamer manual, the following font packages don't need the explicit use of professionalfonts, since beamer's substitution is automatically turned off for them: arevmath, hvmath, kpfonts, lucidabr, lucimatx, mathpmnt, mathpple, mathtime, mtpro, and mtpro2. I've contacted one of the maintainers to request that lmodern is included in this list as well.

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.