3

Depending on the combination of packages loaded, the width of \widetilde can be erroneous.

I guess this is a bug in koma, but it as also somehow affected by the package lmodern, albeit only when combined with koma.

I assume I need to find a replacement for lmodern or quit using koma. Is there another remedy?

0. Desired output

\documentclass{article} % \usepackage{amsmath} % does not make a difference % \usepackage{lmodern} % does not make a difference \begin{document} \begin{equation} \widetilde{c_x'} \widetilde{c_y'} \end{equation} \end{document} 

desired

1. KOMA without amsmath

\documentclass{scrartcl} \begin{document} \begin{equation} \widetilde{c_x'} \widetilde{c_y'} \end{equation} \end{document} 

erroneous

2. KOMA with amsmath

\documentclass{scrartcl} \usepackage{amsmath} \begin{document} \begin{equation} \widetilde{c_x'} \widetilde{c_y'} \end{equation} \end{document} 

desired

3. KOMA with lmodern (with or without amsmath)

\documentclass{scrartcl} % \usepackage{amsmath} % does not make a difference \usepackage{lmodern} \begin{document} \begin{equation} \widetilde{c_x'} \widetilde{c_y'} \end{equation} \end{document} 

erroneous

2
  • 2
    The default font size of article is 10pt. The default font size of scrartcl is 11pt. If you use \documentclass[10pt]{scrartcl} you get the same result as with \documentclass{article} (as wanted). And if you use \documentclass[11pt]{article} you get the same result as with \documentclass{scrartcl} (as not wanted). So this does not depend on using a KOMA-Script class or not, but on the font sizes. Commented Mar 13, 2024 at 8:44
  • Ah I see, font size was the one aspect I did not consider checking. Setting \documentclass[11pt]{article} indeed produces the same weird appearance. \usepackage{amsmath} fixes that, but \usepackage{lmodern} then destroys that fix again. So I guess it is a side effect of lmodern. Commented Mar 13, 2024 at 9:06

2 Answers 2

5

You forgot one option, namely fixcmex.

\documentclass{scrartcl} \usepackage{amsmath} \usepackage{lmodern} \usepackage{fixcmex} % does make a difference \begin{document} \begin{equation} \widetilde{c_x'} \widetilde{c_y'} \end{equation} \end{document} 

enter image description here

4

The difference you see with KOMA-Script only appears because KOMA-Script use 11pt fonts by default, while article uses 10pt. Load the article class with 11pt you'll see the same thing.

\widetilde is a math accent which extends according to its content. In your case, x is slightly larger than y, and the larger form is used with 11pt fonts (it's the same, if you use m as subscript). The simplest you can do is to move the subscripts outside \widehat:

\begin{equation} \widetilde{c'}_{\! x} \widetilde{c'}_{\! y} \end{equation} 

widetitle shorter

5
  • Some seconds earlier. ;-) Commented Mar 13, 2024 at 8:48
  • @cabohah I saw at validation. Sorry. Commented Mar 13, 2024 at 8:49
  • BTW: I can remember, that there was already a similar question some time ago. But I was not able to find it. So maybe it is good to once again have this question/answer. Commented Mar 13, 2024 at 8:52
  • Ok, makes sense, but the large space preceding the subscript versus the small space after it is really awkward. Commented Mar 13, 2024 at 9:11
  • @Bastian You right. I tweaked a bit the space with \! but it's not perfect. Otherwise see How can I manually choose the size of a wide accent? (math mode). Commented Mar 13, 2024 at 9:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.