Auto line break in Mathml render

561 views
Skip to first unread message

Simbu R

unread,
May 30, 2013, 6:03:42 AM5/30/13
to mathja...@googlegroups.com
Hi,
 
In group, already discuss in auto linebreak of latex command and its working fine. I need linebreak for mathml code.
 
by
simbu
 
 

Frédéric WANG

unread,
May 30, 2013, 6:03:50 AM5/30/13
to mathja...@googlegroups.com
Do you mean for MathML input or NativeMML output? With MathML input, you
can use the line breaking features defined in the MathML REC and MathJax
will be able to understand them. For NativeMML output, it depends on the
which renderer you are using. MathPlayer has line breaking support but
native browser implementations do not. The Gecko bug is
https://bugzilla.mozilla.org/show_bug.cgi?id=534962

--
Fr�d�ric Wang
maths-informatique-jeux.com/blog/frederic

Simbu R

unread,
May 30, 2013, 6:29:31 AM5/30/13
to mathja...@googlegroups.com
Hi fred,
 
My input is mathml and i have use mathjax for browser view.
 
by simbu
Fr�d�ric Wang
maths-informatique-jeux.com/blog/frederic

Frédéric WANG

unread,
May 30, 2013, 7:39:24 AM5/30/13
to mathja...@googlegroups.com
By default, automatic line breaking is disabled so you must specify line
breaks explicitly:

<math>
<mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi><mo
linebreak="newline">+</mo><mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi>
</math>

To enable automatic line breaking modify your configuration file (see
http://docs.mathjax.org/en/latest/options/HTML-CSS.html,
http://docs.mathjax.org/en/latest/options/SVG.html), for example:

<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS": {
linebreaks: {automatic: true}
},
"SVG": {
linebreaks: {automatic: true}
}
});
</script>
</head>

<body>

<div style="width: 5em">
<math>
<mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi><mo>+</mo><mi>x</mi>
</math>
</div>
...


On 30/05/2013 12:29, Simbu R wrote:
> Hi fred,
> My input is mathml and i have use mathjax for browser view.
> by simbu
>

Simbu R

unread,
May 31, 2013, 8:15:35 AM5/31/13
to mathja...@googlegroups.com
Hi fred,
 
Its working very well. Thank you very much for your help.
 
by
simbu
Reply all
Reply to author
Forward
0 new messages