Neil:
Thanks for getting back to me on this, but I'm afraid I'm still confused. I wasn't asking about how indentshift relates to indentalign, but on how indentshiftfirst relates to indentshift. A simplified version of the test that I cited is
<math indentshift="3em" display="block">
<mrow>
<mi>a</mi>
<mspace linebreak="newline" />
<mo>+</mo>
<mi>b</mi>
</mrow>
</math>
Here, indentshift is 3em, so I understand that the plus sign will be 3em to the right of where it would have been if identshift were 0. My question is where should the "a" be placed? It should be controlled by the value of indentshiftfirst, but the default of indentshiftfirst is "inherited (indentshift)". If I understand this right, the value of indentshiftfirst should be the value of indentshift, since there is no setting for indentshiftfirst. So the first line should ALSO be 3em to the right of indentalign.
So what I expect to see if BOTH the "a" and the "+" indented the SAME amount (3em). But in the image for that test, the second line is 3em farther to the right of the position of the first line. (Unless you mean that MathPlayer is using the <mrow> around the whole equation to say that the line break is nested, so needs to be indented further. But that would mean that the first line would have to be considered as starting outside the <mrow>, which seems a bit of a stretch).
Here is the image from the test:
The indent shifts for the lines are set to be 3em for the second, 6em for the third, and 9em for the fourth. There is no extra nesting between the 6em and the 9em, so the difference between those lines has to be 3em (not an adjustment due to nesting), and that means the first line here really is 0em.
I do not see why the first two lines are not at the same indentation. Can you tell me what I am missing?
For the issue with negative indentshiftlast, I missed the indentalignlast="right" in the mstyle at the top of the equation. Sorry. Now it makes sense.
Davide
On Mar 28, 2014, at 3:06 AM, Neil Soiffer wrote:
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 ~