... | ... | @@ -33,3 +33,57 @@ Semantic Tree: |
|
|
</stree>
|
|
|
|
|
|
```
|
|
|
|
|
|
Straightforward translation of the semantic tree into the MathML element,
|
|
|
naturally ruins the msubsup element. Here's the semantically enriched MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<msubsup semantic-type="superscript" semantic-role="latinletter" semantic-id="4" semantic-children="3,2">
|
|
|
<mrow semantic-type="subscript" semantic-role="subsup" semantic-id="3" semantic-children="0,1" semantic-parent="4">
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" semantic-id="0" semantic-parent="3">a</mi>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" semantic-id="1" semantic-parent="3">b</mi>
|
|
|
</mrow>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" semantic-id="2" semantic-parent="4">c</mi>
|
|
|
</msubsup>
|
|
|
</math>
|
|
|
|
|
|
```
|
|
|
|
|
|
**Observe that this does not affect elements where msubsup has discernably been used as a layout element.** See, for example the following sum expression:
|
|
|
|
|
|
```html
|
|
|
<math>
|
|
|
<msubsup>
|
|
|
<mi>∑</mi>
|
|
|
<mi>b</mi>
|
|
|
<mi>c</mi>
|
|
|
</msubsup>
|
|
|
</math>
|
|
|
|
|
|
```
|
|
|
|
|
|
Semantic Tree:
|
|
|
```html
|
|
|
<stree>
|
|
|
<limboth role="sum" id="3">
|
|
|
<children>
|
|
|
<largeop role="sum" id="0">∑</largeop>
|
|
|
<identifier role="latinletter" font="italic" id="1">b</identifier>
|
|
|
<identifier role="latinletter" font="italic" id="2">c</identifier>
|
|
|
</children>
|
|
|
</limboth>
|
|
|
</stree>
|
|
|
|
|
|
```
|
|
|
|
|
|
Semantically enriched MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<msubsup semantic-type="limboth" semantic-role="sum" semantic-id="3" semantic-children="0,1,2">
|
|
|
<mi semantic-type="largeop" semantic-role="sum" semantic-id="0" semantic-parent="3">∑</mi>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" semantic-id="1" semantic-parent="3">b</mi>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" semantic-id="2" semantic-parent="3">c</mi>
|
|
|
</msubsup>
|
|
|
</math>
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |