- From: Davide P. Cervone <dpvc@union.edu>
- Date: Thu, 12 Jun 2014 17:40:29 -0400
- To: Frédéric WANG <fred.wang@free.fr>
- Cc: www-math@w3.org
- Message-Id: <486C67AB-E477-436F-8925-4FC2D2080954@union.edu>

[Sorry forgot to reply to all, so here it is again] Why wouldn't you just use displaystyle="true" on the <mtable> itself rather than wrapping it in an <mstyle>, or (worse yet) adding <mstyle displaystyle="true"> in each <mtd>? Mathjax actually already does it this way, but the toMathML() output removes attributes that it thinks are the defaults, and because of the misunderstanding of how displaystyle applies to <mtable> that I described before, it thinks the displaystyle is redundant in this case, so it removes it. I do not think it would be hard to fix that (but haven't looked to see if there are any gotcha details). I don't think it should be necessary to change the spec for this, as a simple solution exists (<mtable displaystyle="true"> rather than <mstyle displaystyle="true"><mtable>). It does seem that I'm not the only one who misunderstood the situation, however. David, I'll respond to your message as soon as I can take some time to write something out carefully. I was writing too quickly in my earlier replies to Fred, and that didn't help. Davide On Jun 12, 2014, at 3:54 PM, Frédéric WANG wrote: > Le 11/06/2014 18:37, Neil Soiffer a écrit : >> I concur with David Carlisle: the spec specifically says it is false (matches TeX behavior). It is similar to mfrac in that the rules for mfrac say "The mfrac element sets displaystyle to "false". The only difference with mtable is that there is an attribute that allows you to override the default. > So if we agree about that, my concern is that for things like > > {\displaystyle {\begin{aligned}\Gamma (z)&=\int _{0}^{x}e^{{-t}}t^{{z-1}}\,{\frac {{\mathrm {d}}t}{t}}+\int _{x}^{\infty }e^{{-t}}t^{{z+1}}\,{\frac {{\mathrm {d}}t}{t}}\\&=x^{z}e^{{-x}}\sum _{{n=0}}^{\infty }{\frac {x^{n}}{z(z+1)\cdots (z+n)}}+\int _{x}^{\infty }e^{{-t}}t^{{z}}\,{\frac {{\mathrm {d}}t}{t}}.\end{aligned}} > > the aligned environment is transformed into a <mtable> by LaTeX-to-MathML converters (such as MathJax or itex2MML) and so the content of the cells are not in displaystyle, contrary to how LaTeX behaves. That's a bit a pain that aligning with the spec in Gecko 29 broke compatibility with these converters... > > It seems that LaTeXML knows about the displaystyle context and is able to propagate <mstyle displaystyle="true"> element inside the <mtable> cells. However, for parsers like itex2MML, where the content of the cells is parsed first and directly converted into a string, it might be a bit tedious to insert such elements. Instead, itex2MML just inserts the a <mstyle displaystyle="true"> around the <mtable> and expects that the property will be propagated to cells. So in my opinion, it would be best if the displaystyle was "inherited" on <mtable>. It's easier to attach a displaystyle="false" to reset the property for normal TeX table than to append many new <mstyle> for <mtable> generated from LaTeX environments similar to \begin{aligned}. > > -- > Frédéric Wang > maths-informatique-jeux.com/blog/frederic >

Received on Thursday, 12 June 2014 21:40:58 UTC