Skip to content

Simplification of the <semantics> element #33

@fred-wang

Description

@fred-wang

The typical usage of the semantics element is as followed:

<semantics>
  [ANNOTATED PRESENTATION MATHML CHILD]
  <annotation encoding="application/x-tex">...</annotation>
  <annotation-xml encoding="MathML-Content">...</annotation-xml>
  ... MORE ANNOTATIONS ...
</semantics>

WebKit and Gecko will render the first child.

Currently, Chromium (without MathML support) will always hide that child but display all the annotations (which is ok when there is only one text annotation):
https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/core/css/mathml.css#40

A non-common case is when the first child is actually content MathML:
https://mathml-refresh.github.io/mathml/chapter5.html#mixing.alternate.representations
WebKit and Gecko will then actually try to render either a text annotation or a MathML/SVG/HTML annoation-xml:
https://mathml-refresh.github.io/mathml-core/#sematicsandpresentation
(Chromium will wrongly display all the children)

Another (non-valid) use case is when the semantics only has one annotation-xml child:

  <semantics>
    <annotation-xml encloding="SVG1.1">...</annotation-xml>
  </semantics>

which @distler has used to embed SVG inside MathML.
WebKit, Gecko and Chromium will properly handle that case too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions