Mahjax/LaTex in Bangla language

103 views
Skip to first unread message

Enayetur Rahman

unread,
Feb 23, 2016, 12:10:38 AM2/23/16
to MathJax Users
Hello

I'm working in a website, where need to show math equation in Bangla language. When I put Bangla sentence in LaTex it break like below 


It should look like below


x= পঞ্চান্ন হাজার চারশ / সাত লক্ষ দুই হাজার পঁচাত্তর

I am working in wordpress.

My html code:




<head>

<script type="text/javascript"
</script>
        </head>
<body>

$$x=\frac{পঞ্চান্ন হাজার চারশ}{সাত লক্ষ দুই হাজার পঁচাত্তর}$$
</body>



Thanks

Davide P. Cervone

unread,
Feb 23, 2016, 2:05:11 AM2/23/16
to mathja...@googlegroups.com
Try using

x=\frac{\text{পঞ্চান্ন হাজার চারশ}}{\text{সাত লক্ষ দুই হাজার পঁচাত্তর}}

instead.  You should enclose the words in \text{...}, otherwise each letter is treated as a separate variable name by MathJax, and so the characters that would normally combine are prevented from doing so.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Enayetur Rahman

unread,
Feb 23, 2016, 2:26:57 AM2/23/16
to MathJax Users, dp...@union.edu
Same output

Christian Lawson-Perfect

unread,
Feb 23, 2016, 3:56:10 AM2/23/16
to MathJax Users, dp...@union.edu
Yes, I get the same output with separated combining characters in the HTML-CSS, Common HTML and SVG renderers. It looks OK in Preview HTML though - is that because the system font knows how to combine these characters properly?

Christian Lawson-Perfect

unread,
Feb 23, 2016, 3:58:55 AM2/23/16
to MathJax Users, dp...@union.edu
Setting `mtextFontInherit: true` in the MathJax config (see https://docs.mathjax.org/en/v2.5-latest/options/HTML-CSS.html) makes it render properly - that makes MathJax use the normal text font for \text{}. I think the problem is that the combining characters aren't marked as combining characters in the MathJax fonts.

Peter Krautzberger

unread,
Feb 23, 2016, 4:36:44 AM2/23/16
to mathja...@googlegroups.com, Davide P. Cervone
Hi,

> Yes, I get the same output with separated combining characters in the HTML-CSS, Common HTML and SVG renderers. 

Thanks for checking, Christian. Same here.

> It looks OK in Preview HTML though - is that because the system font knows how to combine these characters properly?

No, the PreviewHTML doesn't split the characters into separate spans (or text elements in SVG).

@Davide, it seems MathJax is splitting the string despite \text / mtext. Seems like a bug.

Setting `mtextFontInherit: true` [...] makes it render properly. 

Thanks for checking. That should workaround the problem if \text{} etc is used.

I think the problem is that the combining characters aren't marked as combining characters in the MathJax fonts.

No. The fonts don't have any characters for them and fall back to system fonts. But the problem stems from splitting them into spans.

Best,
Peter.

Enayetur Rahman

unread,
Feb 23, 2016, 5:08:58 AM2/23/16
to MathJax Users, dp...@union.edu
I just started MathJax, can you please show me complete configuration/settings for that?


Advance thanks
Reply all
Reply to author
Forward
0 new messages