MML.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*************************************************************
  2. *
  3. * Copyright (c) 2017-2022 The MathJax Consortium
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /**
  18. * @fileoverview An object listing all the MathML node types
  19. *
  20. * @author dpvc@mathjax.org (Davide Cervone)
  21. */
  22. import {MmlNodeClass, TextNode, XMLNode} from './MmlNode.js';
  23. import {MmlMath} from './MmlNodes/math.js';
  24. import {MmlMi} from './MmlNodes/mi.js';
  25. import {MmlMn} from './MmlNodes/mn.js';
  26. import {MmlMo} from './MmlNodes/mo.js';
  27. import {MmlMtext} from './MmlNodes/mtext.js';
  28. import {MmlMspace} from './MmlNodes/mspace.js';
  29. import {MmlMs} from './MmlNodes/ms.js';
  30. import {MmlMrow, MmlInferredMrow} from './MmlNodes/mrow.js';
  31. import {MmlMfrac} from './MmlNodes/mfrac.js';
  32. import {MmlMsqrt} from './MmlNodes/msqrt.js';
  33. import {MmlMroot} from './MmlNodes/mroot.js';
  34. import {MmlMstyle} from './MmlNodes/mstyle.js';
  35. import {MmlMerror} from './MmlNodes/merror.js';
  36. import {MmlMpadded} from './MmlNodes/mpadded.js';
  37. import {MmlMphantom} from './MmlNodes/mphantom.js';
  38. import {MmlMfenced} from './MmlNodes/mfenced.js';
  39. import {MmlMenclose} from './MmlNodes/menclose.js';
  40. import {MmlMaction} from './MmlNodes/maction.js';
  41. import {MmlMsubsup, MmlMsub, MmlMsup} from './MmlNodes/msubsup.js';
  42. import {MmlMunderover, MmlMunder, MmlMover} from './MmlNodes/munderover.js';
  43. import {MmlMmultiscripts, MmlMprescripts, MmlNone} from './MmlNodes/mmultiscripts.js';
  44. import {MmlMtable} from './MmlNodes/mtable.js';
  45. import {MmlMtr, MmlMlabeledtr} from './MmlNodes/mtr.js';
  46. import {MmlMtd} from './MmlNodes/mtd.js';
  47. import {MmlMaligngroup} from './MmlNodes/maligngroup.js';
  48. import {MmlMalignmark} from './MmlNodes/malignmark.js';
  49. import {MmlMglyph} from './MmlNodes/mglyph.js';
  50. import {MmlSemantics, MmlAnnotation, MmlAnnotationXML} from './MmlNodes/semantics.js';
  51. import {TeXAtom} from './MmlNodes/TeXAtom.js';
  52. import {MathChoice} from './MmlNodes/mathchoice.js';
  53. /************************************************************************/
  54. /**
  55. * This object collects all the MathML node types together so that
  56. * they can be used to seed an MmlNodeFactory. One could copy this
  57. * object to override existing classes with subclasses, or to add new
  58. * classes as necessary.
  59. */
  60. export let MML: {[kind: string]: MmlNodeClass} = {
  61. [MmlMath.prototype.kind]: MmlMath,
  62. [MmlMi.prototype.kind]: MmlMi,
  63. [MmlMn.prototype.kind]: MmlMn,
  64. [MmlMo.prototype.kind]: MmlMo,
  65. [MmlMtext.prototype.kind]: MmlMtext,
  66. [MmlMspace.prototype.kind]: MmlMspace,
  67. [MmlMs.prototype.kind]: MmlMs,
  68. [MmlMrow.prototype.kind]: MmlMrow,
  69. [MmlInferredMrow.prototype.kind]: MmlInferredMrow,
  70. [MmlMfrac.prototype.kind]: MmlMfrac,
  71. [MmlMsqrt.prototype.kind]: MmlMsqrt,
  72. [MmlMroot.prototype.kind]: MmlMroot,
  73. [MmlMstyle.prototype.kind]: MmlMstyle,
  74. [MmlMerror.prototype.kind]: MmlMerror,
  75. [MmlMpadded.prototype.kind]: MmlMpadded,
  76. [MmlMphantom.prototype.kind]: MmlMphantom,
  77. [MmlMfenced.prototype.kind]: MmlMfenced,
  78. [MmlMenclose.prototype.kind]: MmlMenclose,
  79. [MmlMaction.prototype.kind]: MmlMaction,
  80. [MmlMsub.prototype.kind]: MmlMsub,
  81. [MmlMsup.prototype.kind]: MmlMsup,
  82. [MmlMsubsup.prototype.kind]: MmlMsubsup,
  83. [MmlMunder.prototype.kind]: MmlMunder,
  84. [MmlMover.prototype.kind]: MmlMover,
  85. [MmlMunderover.prototype.kind]: MmlMunderover,
  86. [MmlMmultiscripts.prototype.kind]: MmlMmultiscripts,
  87. [MmlMprescripts.prototype.kind]: MmlMprescripts,
  88. [MmlNone.prototype.kind]: MmlNone,
  89. [MmlMtable.prototype.kind]: MmlMtable,
  90. [MmlMlabeledtr.prototype.kind]: MmlMlabeledtr,
  91. [MmlMtr.prototype.kind]: MmlMtr,
  92. [MmlMtd.prototype.kind]: MmlMtd,
  93. [MmlMaligngroup.prototype.kind]: MmlMaligngroup,
  94. [MmlMalignmark.prototype.kind]: MmlMalignmark,
  95. [MmlMglyph.prototype.kind]: MmlMglyph,
  96. [MmlSemantics.prototype.kind]: MmlSemantics,
  97. [MmlAnnotation.prototype.kind]: MmlAnnotation,
  98. [MmlAnnotationXML.prototype.kind]: MmlAnnotationXML,
  99. [TeXAtom.prototype.kind]: TeXAtom,
  100. [MathChoice.prototype.kind]: MathChoice,
  101. [TextNode.prototype.kind]: TextNode,
  102. [XMLNode.prototype.kind]: XMLNode
  103. };