-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem Statement
We currently have no instructions on nesting HTML hyperlinks in MathML markup.
Proposed Solution
Embedded HTML hyperlinks inside a MathML expression.
Alternative Solutions
Presenting links as plain text in an <mtext> element.
Use Cases
Source citations for equations or links to further reading.
Impact on Suppliers
Unsure.
Implementation Considerations
It is unclear whether this is possible within MathML 3, which would cause problems in the current Webarch validator. It should be possible according to MathML Core 2.2.1 HTML and SVG, but reading system support might be poor and would have to be tested thoroughly.
Examples
From Sami's test book:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mo>|</mo>
<mi>x</mi>
<mo>+</mo>
<mi>y</mi>
<mo>|</mo>
<mo><</mo>
<mo>|</mo>
<mi>x</mi>
<mo>|</mo>
<mo>+</mo>
<mo>|</mo>
<mi>y</mi>
<mo>|</mo>
<sup>
<mtext>
<a href="https://en.wikipedia.org/wiki/Triangle_inequality">Triangle inequality (Wikipedia)</a>
</mtext>
</sup>
</math>
Although this yields "Math input error" in Calibre, so another method might be needed. Also <msup> should probably be used instead of <sup>.
Additional Context
This is what the MathML 3 spec says:
3.2.2.2 Embedding HTML in MathML
MathML can be combined with other formats as described in Section 6.4 Combining MathML and Other Formats. The recommendation is to embed other formats in MathML by extending the MathML schema to allow additional elements to be children of the mtext element or other leaf elements as appropriate to the role they serve in the expression (see Section 3.2.6.4 Mixing text and mathematics).