Re: Displaystyle and mtable

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 19:54:52 UTC