Skip to content
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

\transn breaks vertical spacing inside of a square root #19

Closed
barillax opened this issue Apr 1, 2019 · 3 comments · Fixed by #20
Closed

\transn breaks vertical spacing inside of a square root #19

barillax opened this issue Apr 1, 2019 · 3 comments · Fixed by #20

Comments

@barillax
Copy link

barillax commented Apr 1, 2019

As shown below, when you put a decimal number into a square root, wrapped in \transn, it displays incorrectly. E.g.: \sqrt{\transn{0.04}}

https://codepen.io/barillax/pen/BvVQBX

Screen Shot 2019-04-01 at 3 22 18 PM

I wonder if the fix for this might be similar to #16 ?

EDIT: this also happens for \transt{}{} inside of a square root, i.e.: %% \sqrt{{\transt{speed}{السرعة}}} %%

Screen Shot 2019-04-01 at 4 02 10 PM

@barillax
Copy link
Author

barillax commented Apr 1, 2019

After looking at #16, I inspected the DOM and found that if I added the .mar class to the surrounding element, it fixed the display. See image below illustrating what I mean:

Screen Shot 2019-04-01 at 3 44 13 PM

The top square root in the above image renders incorrectly, while the bottom one displays properly thanks to the CSS giving the span border-width: 0.45 em 0;

I'm not super familiar with the code, but it kind of looks like the issue here is that when you use one of the \trans* functions, the resulting token(s) don't have arabicFontLang set to ar, which leads to the code in https://github.com/OmarIthawi/arabic-mathjax/blob/master/src/html.js#L51 not being run to add the mar class?

@shadinaif
Copy link
Contributor

@barillax this PR #20 should solve your issue. Please wait for it to be merged and pushed to npm

CC: @OmarIthawi

@barillax
Copy link
Author

barillax commented Apr 9, 2019

Thank you @shadinaif !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants