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}
1. KOMA without amsmath
\documentclass{scrartcl}
\begin{document}
\begin{equation}
\widetilde{c_x'} \widetilde{c_y'}
\end{equation}
\end{document}
2. KOMA with amsmath
\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\widetilde{c_x'} \widetilde{c_y'}
\end{equation}
\end{document}
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}




articleis 10pt. The default font size ofscrartclis 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. – cabohah Mar 13 '24 at 08:44\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 oflmodern. – Bastian Mar 13 '24 at 09:06