6

When I write the following lines, the dots above the capital letters are all shifted to the left (see picture). Anyone know how to fix this so that the dots are more centred above the capitals? Thanks!

\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\usefonttheme[onlymath]{serif}

\begin{document}
\begin{frame}{Example}
\begin{align*}
    \dot{S} &= \mu N - \beta_W WS - \beta_I SI - \mu S \\
    \dot{I} &= \beta_W WS + \beta_I SI - \gamma I - \mu I \\
    \dot{W} &= \alpha I - \xi W \\
    \dot{R} &= \gamma I - \mu R
\end{align*}
\end{frame}
\end{document}

enter image description here

Update: The error only occurs when compiling with XeLaTeX and not pdfLaTeX, but the template requires XeLaTeX for proper fonts.

1
  • 1
    I can confirm your problem when compiling with xelatex. Mar 27 '19 at 2:12
10

We need XeLaTeX and fontspec package to use system fonts.

In general, using a system font will load a bitmap font by default. To fix this, you should load a vector font. This can be achieved by loading the package lmodern.

Add package lmodern in the preamble.

\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\usefonttheme[onlymath]{serif}
\usepackage{lmodern}

\begin{document}
\begin{frame}{Example}
\begin{align*}
    \dot{S} &= \mu N - \beta_W WS - \beta_I SI - \mu S \\
    \dot{I} &= \beta_W WS + \beta_I SI - \gamma I - \mu I \\
    \dot{W} &= \alpha I - \xi W \\
    \dot{R} &= \gamma I - \mu R
\end{align*}
\end{frame}
\end{document} 

enter image description here

2
  • Interesting, what's the reason? Mar 27 '19 at 2:13
  • 2
    @MajidAbdolshah - I have updated the answer Mar 27 '19 at 2:18

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.