-
Notifications
You must be signed in to change notification settings - Fork 7
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 text is flipped (ltr) when I use \ar #22
Comments
Hi @osman-mohamad , it is very hard to guess the reason like this. Can you please give more details and code, or create a codepen to show the issue Please check the following codepen which is showing your equation rendered correctly |
@shadinaif . I will post codepen soon contains my code. thank you |
first I use rtl page .like <html dir="rtl" lang="ar">
.....
</html> second I use vuejs to wait for user input and re-render the equation after each key down event.https://codepen.io/osman-mohamad/pen/RwwVaGv?editors=1010 this is my example and it is working fine (because the direction is ltr in the codepen)third if this codepen will not present my problem . I will post github repository to preview it to you.and I want to host my own version of the lib (not to use cdn)thank you in advance |
I found the bug . it seams it is only work with the unpacked version of mathjax 2.6.1 . when it is used with 2.7.6 (latest 2.* version) unpacked version from npm . it is not working. |
Thank you @osman-mohamad for your feedback, I tried my best to reproduce but I had no luck! This is a very simple and single HTML file that uses
|
I used local resources :
extract them and used this code (your example but from local libs) <!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<title>MathJax TeX Test Page</title>
<script type="text/javascript" id="MathJax-script" async
src="/mathjax/MathJax.js?config=TeX-AMS_CHTML-full&delayStartupUntil=configured">
</script>
<link href="/amiri/webfonts/Amiri.css" rel="stylesheet">
<link href="/arabic-mathjax/dist/arabic.css" rel="stylesheet">
<script>
function initMathjax() {
var MathJax = window.MathJax;
MathJax.Ajax.config.path["arabic"] = "/arabic-mathjax/dist";
MathJax.Hub.Config({
skipStartupTypeset: true,
jax: ['output/CommonHTML'],
tex2jax: {
inlineMath: ["$$","$$"]
},
TeX: {
extensions: ["[arabic]/arabic.js"]
},
CommonHTML: {
minScaleAdjust: 121,
scale: 121,
undefinedFamily: 'AmiriWeb'
},
});
MathJax.Hub.setRenderer('CommonHTML');
MathJax.Hub.Configured();
let el = document.getElementById('math-output');
MathJax.Hub.Queue(["Typeset",MathJax.Hub, el]);
}
window.onload = function() {
initMathjax();
}
</script>
</head>
<body>
$$ \alwaysar{x = {-b \pm \sqrt{b^2-4ac} \over 2a}} $$
</body>
</html> the output in: I was always using chrome in my past tests . some times it worked good . some times not at all . some times show flipped equations like in this image. and I think the processing of the equation is slow in chrome than in firefox. maybe the slow rendering it is related to mathjax more than it is related to this plugin. |
NOTEI tested the example in chrome incognito mode . and it is work fine . I disabled all the extensions (in normal window) . but it is the same (not working). |
@osman-mohamad looks like CSS cache. Without incognito mode; please try Ctrl+F5 to refresh page with (enforce assets reload) |
@shadinaif it does not work |
I have a problem with the extension . it is flipping the text from left to right.
like in the photo
how to fix it ?
thank you very much
The text was updated successfully, but these errors were encountered: