W3C home > Mailing lists > Public > www-math@w3.org > March 2014

Re: Questions about indentshift

From: Neil Soiffer <NeilS@dessci.com>
Date: Fri, 28 Mar 2014 00:06:26 -0700
Message-ID: <CAESRWkAGqb1it_MMJmOm4JMBQ9Sjb3PxLRGqNf5XGej6QYQZbw@mail.gmail.com>
To: "Davide P. Cervone" <dpvc@union.edu>
Cc: "www-math@w3.org" <www-math@w3.org>
First off, I apologize for the very late response. I try to be responsive
to requests for information, but between a machine crash, a conference, and
spring break, it didn't happen this time.

The key to understanding the example is that indentshift is an *additional*
shift to that specified by the indentalign attribute. That attribute
defaults to auto, which for MathPlayer (which generated the images) indents
based on how deeply nested the breakpoint is in the expression tree. This
gives a visual indication of the grouping of expressions. Looking closely
at the indentation, I see a bug in the algorithm that determines the
nesting level, so that doesn't help understand the output. This example
would have been a better example if it had indentalign="left" since it
would have made the effect of indentoffset clearer.

The image is also confusing because no indentation is shown for the first
line. That's likely my fault as I probably made a screenshot and just
selected the rectangular area around what was drawn. Using a debugger, I
can see MathPlayer really does indent the first line 3em.

A negative value for indentshift shifts the line to the left an
*additional* amount to that specified by the indentalign attribute; in that
second example, that means 20pts to the left of the right margin.

Note that MathPlayer (and MathJax?) center block equations, but that is not
the same as indentalign="center". That attribute would center each line.
That's not the same as centering the bounding box of the entire equation.

I hope that clarifies the examples,

Neil Soiffer
Senior Scientist
Design Science, Inc.
www.dessci.com
~ Makers of MathType, MathFlow, MathPlayer, MathDaisy, Equation Editor ~





On Fri, Mar 14, 2014 at 10:29 PM, Davide P. Cervone <dpvc@union.edu> wrote:

> I was looking at some of the linebreak tests in the MathML3 test suite,
> and some of them confuse me.  For example,
>
>
> http://www.w3.org/Math/testsuite/build/main/Topics/LineBreak/linebreaking011-indentamount-full.xhtml
>
> starts with
>
> <math xmlns="http://www.w3.org/1998/Math/MathML" indentshift="3em"
> display="block">
>
> and has some <mi> and <mo> elements then
>
> <mspace linebreak="newline"/>
>
> According to
>
> http://www.w3.org/TR/MathML3/chapter3.html#presm.lbindent.attrs
>
> the default for indentshiftfirst is indentshift, and since indentshift is
> set to 3em, it seems to me that the first and second lines both should be
> indented to 3em.  But the image of the correct rendering shows the first
> line not indented, while the second line is indented 3em.  What am I
> missing, here?
>
> A second confusion for me is in
>
>
> http://www.w3.org/Math/testsuite/build/main/Topics/LineBreak/linebreaking010-indentshift-full.xhtml
>
> where indenshiftlast is set to -20pt.  The image shows the last line
> right-aligned (with what appears to be about 20pt of space at the right, so
> it seems that a negative indentshift is supposed to mean indenting from the
> opposite side from what indentalign specifies?  There is no mention of this
> in the spec that I can find.  Can someone clarify the intended meaning of
> negative indents?
>
> Finally, the tests seem to assume a default indentalign of left, but the
> spec indicates that the default is up to the renderer.  MathJax uses
> centering by default, so the tests "fail".  it might be good if the tests
> set indent align explicitly.
>
> Davide
>
Received on Friday, 28 March 2014 07:06:53 UTC

This archive was generated by hypermail 2.3.1 : Friday, 28 March 2014 07:06:54 UTC