# 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) – Calvin Khor Jul 20 '20 at 4:13

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