Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Wiki
  • Embedding the semantic tree in MathML

Embedding the semantic tree in MathML · Changes

Page history
re-write with notes from 2015-02-24 dev meeting authored Mar 30, 2015 by Peter Krautzberger's avatar Peter Krautzberger
Hide whitespace changes
Inline Side-by-side
Embedding-the-semantic-tree-in-MathML.md
View page @ da7b9730
[OP on mathjax-dev](https://groups.google.com/forum/#!topic/mathjax-dev/BpP3bF-NvaY) Simple starting example: `a+b+c` which might be realized as
Starting example: `a+b+c` which might be realized as
```html ```html
<math> <math>
...@@ -24,13 +22,13 @@ which would yield [a semantic tree](https://github.com/zorkow/speech-rule-engine ...@@ -24,13 +22,13 @@ which would yield [a semantic tree](https://github.com/zorkow/speech-rule-engine
which could be embedded as follows which could be embedded as follows
```html ```html
<math> <math id=0>
<mrow data-math-semantic-parent="sum" data-math-semantic-children="3"> <mrow id=1 data-math-semantic-parent="3,5" data-math-semantic-children="2,4,6">
<mi data-math-semantic-child>a</mi> <mi id=2 data-math-semantic-child>a</mi>
<mo data-math-semantic-operator>+</mo> <mo id=3 data-math-semantic-operator="sum(meaning),+(type)">+</mo>
<mi data-math-semantic-child>b</mi> <mi id=4 data-math-semantic-child>b</mi>
<mo data-math-semantic-operator>+</mo> <mo id=5 data-math-semantic-operator="sum,+">+</mo>
<mi data-math-semantic-child>c</mi> <mi id=6 data-math-semantic-child>c</mi>
</mrow> </mrow>
</math> </math>
``` ```
...@@ -38,8 +36,8 @@ which could be embedded as follows ...@@ -38,8 +36,8 @@ which could be embedded as follows
In other words, In other words,
* add mrows when necessary for semantic-tree-nodes with children * add mrows when necessary for semantic-tree-nodes with children
* identify children * identify parent and children
* do some countin. * use "standard" MathML tree numbering (IDs) (Texthelp/DSI/MathJax conversation but simplified).
The hope is that this simple parent/child structure works well recursively, e.g., The hope is that this simple parent/child structure works well recursively, e.g.,
...@@ -75,22 +73,22 @@ would lead to a semantic tree of ...@@ -75,22 +73,22 @@ would lead to a semantic tree of
and we simply start from the leafs adding an mrow for * etc. to get and we simply start from the leafs adding an mrow for * etc. to get
```html ```html
<math> <math id=0>
<mrow data-math-semantic-parent="sum" data-math-semantic-children="3"> <mrow id=1 data-math-semantic-parent="3,8" data-math-semantic-children="2,4,9">
<mi data-math-semantic-child> a</mi> <mi id=2 data-math-semantic-child>a</mi>
<mo data-math-semantic-operator>+</mo> <mo id=3 data-math-semantic-operator="sum,+">+</mo>
<mrow data-math-semantic-parent="product" data-math-semantic-children="2"> <mrow id=4 data-math-semantic-child data-math-semantic-parent="6" data-math-semantic-children="5,7">
<mi data-math-semantic-child>b</mi> <mi id=5 data-math-semantic-child>b</mi>
<mo data-math-semantic-operator>&#x22C5;</mo> <mo id=6 data-math-semantic-operator="product,⋅">&#x22C5;</mo>
<mi data-math-semantic-child>d</mi> <mi id=7 data-math-semantic-child>d</mi>
</mrow> </mrow>
<mo data-math-semantic-operator>+</mo> <mo id=8 data-math-semantic-operator="sum,+">+</mo>
<mi data-math-semantic-child>c</mi> <mi id=9 data-math-semantic-child>c</mi>
</mrow> </mrow>
</math> </math>
``` ```
This is assuming the MathML tree numbering (IDs) that Neil, Davide and the folks at Texthelp designed.
Questions: Questions:
......
Clone repository

MathJax Wiki

  • Contributing
    • Contributor License Agreement etc
    • Quick guide to translating mathjax
  • Development
    • Development Process
      • Release Process Checklist
      • Documentation Update Process
      • Source Control Policies
    • Design Documents
      • MathJax Roadmap
      • CDN Hosting
        • CDN requirements
        • CDN Hosting at Google Cloud Storage
      • Performance Discussion
      • Profiling and Diagnostics Tools
      • Documentation generation guide
      • Testing
        • Platforms supported
        • Test Machines
  • MathJax web presence