Re: Displaystyle and mtable

Hi everyone,

A follow-up question after Fred commented
<https://github.com/dpvc/MathJax/commit/98e3f098bd519dabe9bf558736c5bf6438fbc217>
on
our changes to MathJax (following the results of this discussion); these
changes include resetting the scriptlevel to 0. To us, this seemed to make
the most sense after the discussion: if display style wasn't supposed to be
inherited, then scriptlevel seemed strange to inherit  (also, there were
some "matching TeX behavior" comments on this thread).

To put it differently, we couldn't imagine how an author setting
displaystyle to "true" would expect to stay at scriptlevel=1 (for example).
The only use-case we could think of would be an array in a superscript or
fraction, but this doesn't seem very likely.

However, as Fred pointed out, the spec seems to read differently. Since
displaystyle needed to be clarified, we thought it's best to ask for
clarification on this as well.

Thanks in advance,
Peter.



On Fri, Jun 13, 2014 at 10:28 AM, David Carlisle <davidc@nag.co.uk> wrote:

>  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 Wednesday, 17 September 2014 19:38:27 UTC