-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The commands \tilde, \dot, \ddot, \hat, and \bar mess up with subscripts. #2474
Comments
Since MathJax converts TeX to MathML internally, the processing of expressions is somewhat different in MathJax than in TeX itself. The natural translation of
while that for
When both TeX and MathJax add super- or subscripts to a base expression, special rules apply if the base is a single letter. If it is, the italic correction of the letter is taken into account when the scripts are placed. That is the case for That is the technical reason for the issue. Issue #712 is a feature request to use similar heuristics to those of TeX to better handle the vertical position of the scripts, but it would also allow the use of the italic correction values to better position the subscript horizontally as well. Until that is done, you do have the various suggestions from the StackExchange site that can be used to improve the results for now. |
I'm marking this a duplicate of #712 because resolving that issue will resolve this one. |
This will be resolved in v3 by PR mathjax/MathJax-src#618. |
Handle accents more like TeX does (better sizes and placement) (mathjax/MathJax#712, mathjax/MathJax#2474)
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{f}_k$ . Even with $\dot{f}_k$ , $\hat{f}_k$ , and $\bar{f}_k$ . The command
\widetilde
:\dot
,\hat
, and\bar
commands, the same problem occurs:\ddot
also causes a similar problem.I know there is a way to re-adjust the spacing by using$f_k$ (which annoys me a little bit).
\!
, 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 inFor some other characters, the spacing is ok. For example,$\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$ ).
$\tilde{a}_k$
producesPlease also see: https://math.meta.stackexchange.com/questions/32180/the-command-tilde-messes-up-with-subscripts. I basically copied most of what I had written there to the bug report.
The text was updated successfully, but these errors were encountered: