# The command \tilde messes up with subscripts.

Have you encountered a spacing problem with the command \tilde? To show what I mean, let's take a look at $$\tilde{f}_{k}$$ and $$f_k$$. Do you notice that the subscript $$k$$ is awkwardly spaced from $$\tilde{f}$$ in $$\tilde{f}_k$$? The same problem occurs if I use \widetilde: $$\widetilde{f}_k$$. Even with \dot, \hat, and \bar commands, the same problem occurs: $$\dot{f}_k$$, $$\hat{f}_k$$, and $$\bar{f}_k$$.

I know there is a way to re-adjust the spacing by using \!, so $\tilde{f}_{\!k}$ and $\tilde{f}_{\!\!k}$ would become $$\tilde{f}_{\!k}$$ and $$\tilde{f}_{\!\!k}$$, respectively. They look a lot better than $\tilde{f}_k$, although the spacing isn't the same as in $$f_k$$ (which annoys me a little bit).

For some other characters, the spacing is ok. For example, $\tilde{a}_k$ produces $$\tilde{a}_k$$, which has the same spacing as $$a_k$$. It seems the problem occurs with tall characters like $$d$$ and $$t$$: $$\tilde{d}_k$$ and $$\tilde{t}_k$$ (comparing with $$d_k$$ and $$t_k$$). The problem is lessened with deep characters like $$g$$ and $$y$$: $$\tilde{g}_k$$ and $$\tilde{y}_k$$ (comparing with $$g_k$$ and $$y_k$$).

Is this a bug? If it is, by whom? By MathJax, by StackExchange, or by my browser? I don't recall seeing this problem in LaTeX.

Edit. I got a response from a MathJax developer. If you are interested, see here.

• by the way, spacing can be specified quite precisely $f_k\hat f_{\hspace{0pt}k}\hat f_{\hspace{-0.5pt}k}\hat f_{\hspace{-1pt}k}\hat f_{\hspace{-1.5pt}k}$ $f_k\hat f_{\hspace{0pt}k}\hat f_{\hspace{-0.5pt}k}\hat f_{\hspace{-1pt}k}\hat f_{\hspace{-1.5pt}k}$ (this does not excuse the problem) Jul 20 '20 at 4:13

I can confirm that it is a MathJax (as opposed to SE) issue, as I can reproduce it outside of this site. It doesn't happen in LaTeX.

As a workaround, you can use $\tilde {f_k}$: $$\tilde {f_k}$$

• Thank you. I thought there was something wrong with my browser for a bit. And nice solution. I didn't think of that. Jul 17 '20 at 21:43
• Glad I could help. I don't know much about MathJax, so I don't know what could be happening down below the surface. If I'm not wrong, the MathJax developers pop up here from time to time, so maybe we'll get an authoritative answer. Jul 18 '20 at 1:02
• Alternatively one can fill in bug report at github.com/mathjax/MathJax/issues, that is something they should read. However any fix would probably go to Mathjax v3, but this site still uses v2, so...
– Sil
Jul 18 '20 at 13:15
• @Sil Thanks. I reported. Jul 18 '20 at 16:45
• @Sil The MathJax team seems to continue publishing bug-releases for MathJax v2 and the latest one is v2.7.8, so there's some hope to have v2.7.9 in the future that fixes this bug..