4

I saw a lot of question related to the "widetilde" commands and the different ways to extend its definition to apply it to large strings of characters, but nothing precisely matching my problem. Please forgive me if this question was already asked.

If I to use the command \widetilde on the symbol \gamma, I obtain \widetilde{\gamma} with correct vertical spacing. However, if now I want to use it in an integral, I obtain if I want to integrate (say) some 1-form \alpha

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage{amsmath,amsfonts}

\begin{document}

$\widetilde{\gamma}$
\begin{align*}
\int_{\widetilde{\gamma}}^{}\alpha
\end{align*}

\end{document}

and the spacing between \gamma and the tilde is way too large.

enter image description here

Questions: Can I fix it, or should I avoid using this command?

  • 2
    I see nothing strange: click here for a picture. Can you show a minimal example? – egreg Nov 28 '16 at 11:56
  • Thanks you egreg, the problem was coming from lmodern : deleting it in the following example fixes the spacing. However, can I fix it within lmodern? '\documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{lmodern} \usepackage{amsmath,amsfonts} \begin{document} $\widetilde{\gamma}$, and \begin{align*} \int_{\widetilde{\gamma}}^{}\alpha \end{align*} \end{document}' – Paul-Benjamin Nov 28 '16 at 13:04
6

It's an outstanding bug in lmodern which, in my opinion makes the fonts out of the question when “hard” mathematics is used in a document.

\documentclass[10pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,amsfonts}

\usepackage{lmodern}

% declare `cmex` to be arbitrary scalable,
% see http://tex.stackexchange.com/a/282919/4427
\DeclareFontShape{OMX}{cmex}{m}{n}{
  <-7.5> cmex7
  <7.5-8.5> cmex8
  <8.5-9.5> cmex9
  <9.5-> cmex10
}{}
\SetSymbolFont{largesymbols}{normal}{OMX}{cmex}{m}{n}
\SetSymbolFont{largesymbols}{bold}  {OMX}{cmex}{m}{n}
% end of fix

\begin{document}

\begin{equation}
\widetilde{\gamma}-\int_{\widetilde{\gamma}}\alpha
\end{equation}

\end{document}

enter image description here

The output without the fix (clearly unacceptable):

enter image description here

| improve this answer | |
  • Thank you very much egreg! (both for you answer and the editing) This is very helpful. I will try to type clearly the question in TeX next time, as I am more used to the standards of mathoverflow. – Paul-Benjamin Nov 28 '16 at 13: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.