Re: Displaystyle and mtable

On 13/06/2014 07:13, Frédéric WANG wrote:
> Le 13/06/2014 01:29, David Carlisle a écrit :
>> Unlike array, aligned sets its cells in displaystyle so should map to 
>> <mtable displaystyle="true"> which is no harder to generate than <mtable>
>> You don't need to generate many (or any) mstyle elements.
>>
>> It's unfortunate if some convertors get that wrong but it shouldn't 
>> be hard for the maintainers to fix them (Davide's already entered a bug
>> for MathJax.)
> Thank you David. Are there any table-like environments that inherit 
> the displaystyle (and could be nested)? If they all automatically 
> force either displaystyle="true" or displaystyle="false", then I'm no 
> longer concerned (except that we're likely to get report like 
> https://bugzilla.mozilla.org/show_bug.cgi?id=1011237 until everybody 
> align on the MathML spec).
> -


In TeX?

No not really: the underlying \halign alignment structure always takes 
you out of math mode
and there is no sane way of "inheriting" the current math style through 
to the cells.
So macros tend to use textstyle (like array) or displaystyle (like aligned).


The only way in TeX to fake inheriting the current style is to set the 
entire alignment in all four styles
(display, text, script and scriptscript) and have the primitive 
\mathchoice pick one as it lays out the
final math list after the macro layer hands over control.  That's slow 
and painful and so typically
only used for things that have "hidden alignments" eg the use of 
\ooalign to make up constructed symbols
such as plain TeX's \rightleftharpoons. I don't know of any common macro 
definitions in the usual TeX
packages that make alignments with author supplied content in cells that 
inherit the display style.

David

Received on Friday, 13 June 2014 08:29:09 UTC