# Re: line breaks, embellished operators and space-like content

From: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 3 Aug 2015 17:05:58 -0400
Cc: <www-math@w3.org>
Message-Id: <82140074-EE76-446F-A304-2A7FBBF84380@union.edu>
To: David Carlisle <davidc@nag.co.uk>
> does the spec actually say that you can not break within an embellished
> operator?

No, the spec is silent on how line breaks interact with embellished operators.  But in terms of spacing around embellished operators, it is clear that the operator is to be treated as a unit.  So, for example

$<mi>A</mi> <mrow> <mtext>B</mtext> <mo>+</mo> <mtext>C</mtext> </mrow> <mi>D</mi>$

has an embellished operator "B+C" and the space for that operator goes outside the <mrow>, giving "A B+C D" (rather than "AB + CD").

$<mi>A</mi> <mrow> <mtext>B</mtext> <mo linebreak="true">+</mo> <mtext>C</mtext> </mrow> <mi>D</mi>$

I would expect to see the line break to be outside the embellished operator B+C, so it should occur between the A and the B giving

A
B+C D

by default.  (This is, in fact, what MathJax does.)  The spec is silent on this topic, but that is what seems most in line with the spirit of embellished operators.

It is less clear what

$<mi>A</mi> <mrow> <mtext>B</mtext> <mo>+</mo> <mtext>C</mtext> <mspace linebreak="newline"/> <mtext>D</mtext> </mrow> <mi>E</mi>$

should do.  Should it be

A B+C
D E

which breaks up the embellished operator?  Should it be

A
B+CD E

which doesn't?  Or something else?  The spec doesn't say one way or the other.

Going back to whether it makes sense for <mtext> to be space-like, it doesn't seem right for the spacing to change depending on whether there is just one operator followed by an <mtext> versus an operator followed by an <mtext> and an <mi>.  Should the + in

$<mrow> <mtext>A</mtext> <mo>+</mo> <mtext>B</mtext> </mrow>$

really have such different spacing from

$<mrow> <mi>X</mi> <mtext>A</mtext> <mo>+</mo> <mtext>B</mtext> <mi>X</mi> </mrow>$

so that the spacing of the + is determined by the X's that are several elements away?  That doesn't seem very intuitive.  And Peter's point about <mtext> being the entry point for HTML5 elements is a good one, I think, as that may make <mtext> more widely used.  I'm sure there are use-cases where it makes sense for <mtext> to be space-like, but I can't think of any off the top of my head (other than when the content of the <mtext> is actually just space characters).

Davide

Received on Monday, 3 August 2015 21:06:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 3 August 2015 21:06:28 UTC