Skip to content

Operator spacing adjacent to <mtext> #286

@ronkok

Description

@ronkok

This issue concerns operator spacing. Currently, MathML Core section 3.2.5.1 notes that operator spacing is affected by whether adjacent elements are space-like, which is good. It also declares that the <mtext> element is space-like, which is contrary to established practice.

Consider the LaTeX expression (1) \( \text{abc} = \text{def} \). For purposes of operator spacing, TeX treats those \text{…} expressions the same as an ord atom. The = operator gets a medium space on both sides. MathML Core should do likewise and treat <mtext> as being non-space-like. Currently, the MathML expression <mtext>abc</mtext><mo>=</mo><mtext>def</mtext> does not give operator spacing to the operator.

I have a hypothesis about how the misunderstanding may have occurred. Consider the LaTeX expression (2) abc\( = \)def. TeX does not give extra spacing to the operator in that expression.

I contend that the proper treatment in MathML Core should be as in expression (1) above, not expression (2). The \(…\) delimiters in the expression are the analogue of the <math>…</math> element. \text{…} is the analogue of <mtext>.

Here is a visual confirmation of these LaTeX expressions.

For a slightly off-topic note, I cannot find anywhere in the spec that actually sets out the operator spacing rules for <mo>, given various adjacent elements. It seems to me that something like the table in the TeXbook, page 170 would be useful. This historical note contains some relevant information.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions