interactive-examples icon indicating copy to clipboard operation
interactive-examples copied to clipboard

Add MathML examples

Open NiedziolkaMichal opened this issue 2 years ago • 2 comments

It is now possible to add MathML interactive examples. Anyone interested is welcome to contribute. Ideally, we would have examples for all of those elements:

MathML element examples should be placed in live-examples/mathml-examples/elements. Each example should be included in meta.json, where it should have the following structure:

    "ELEMENT_NAME": {
      "exampleCode": "./live-examples/mathml-examples/elements/ELEMENT_NAME.html",
      "fileName": "ELEMENT_NAME.html",
      "title": "MathML Demo: <ELEMENT_NAME>",
      "type": "mathml",
      "height": "EXAMPLE_HEIGHT",
      "tabs": "html"
    }

The value of EXAMPLE_HEIGHT might be tabbed-shorter, tabbed-standard, or tabbed-taller. The smallest possible height should be chosen, in which the vertical scrollbar is not shown.

@fred-wang

NiedziolkaMichal avatar Feb 27 '23 14:02 NiedziolkaMichal

Apart from the fact that a few elements listed here are deprecated / deferred to MathML 4 or have no visual effect, the crucial question is: In what form should these live examples be to make them useful?

Mathml markups are not like HTML ones in that one can make edits to the content enclosed by tags in HTML to see what differences they make, whereas even tiny edits to Mathml content can lead to semantically incorrect markups, e.g.

<mi>a</mi><mo>+</mo><mi>b</mi>

is correct, but

<mi>a</mi><mo>+</mo><mi>bc</mi>

is not. This is understandable as MathML contents are almost never manually authored.

Therefore, it seems better to provide some basic authoring tools to indirectly interact with these examples.

yarusome avatar Mar 31 '23 11:03 yarusome

May what date?

GELO1234567 avatar Oct 28 '23 09:10 GELO1234567

Thanks a lot, since we are maintaining these examples in the content repo, it makes more sense to have the discussion there. We'll open a tracking issue or another follow up about this and we can discuss what makes sense to demo in an interactive example for all technologies. Thank you!

See https://github.com/mdn/interactive-examples/issues/2374

bsmth avatar Mar 26 '25 14:03 bsmth