mml 2.2.1 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +9 -0
  3. data/.rubocop.yml +4 -0
  4. data/.rubocop_todo.yml +36 -17
  5. data/CLAUDE.md +79 -0
  6. data/Gemfile +0 -2
  7. data/README.adoc +334 -82
  8. data/Rakefile +16 -1
  9. data/lib/mml/base/content/annotation.rb +30 -0
  10. data/lib/mml/base/content/annotation_xml.rb +31 -0
  11. data/lib/mml/base/content/apply.rb +27 -0
  12. data/lib/mml/base/content/arith.rb +243 -0
  13. data/lib/mml/base/content/bind.rb +27 -0
  14. data/lib/mml/base/content/bvar.rb +20 -0
  15. data/lib/mml/base/content/calculus.rb +103 -0
  16. data/lib/mml/base/content/cbytes.rb +24 -0
  17. data/lib/mml/base/content/cerror.rb +24 -0
  18. data/lib/mml/base/content/ci.rb +77 -0
  19. data/lib/mml/base/content/cn.rb +33 -0
  20. data/lib/mml/base/content/condition.rb +20 -0
  21. data/lib/mml/base/content/constants.rb +173 -0
  22. data/lib/mml/base/content/cs.rb +22 -0
  23. data/lib/mml/base/content/csymbol.rb +79 -0
  24. data/lib/mml/base/content/declare.rb +34 -0
  25. data/lib/mml/base/content/degree.rb +20 -0
  26. data/lib/mml/base/content/elementary_functions.rb +309 -0
  27. data/lib/mml/base/content/fn.rb +25 -0
  28. data/lib/mml/base/content/functions.rb +85 -0
  29. data/lib/mml/base/content/interval.rb +24 -0
  30. data/lib/mml/base/content/inverse.rb +25 -0
  31. data/lib/mml/base/content/lambda.rb +20 -0
  32. data/lib/mml/base/content/linear_algebra.rb +122 -0
  33. data/lib/mml/base/content/logic.rb +93 -0
  34. data/lib/mml/base/content/otherwise.rb +20 -0
  35. data/lib/mml/base/content/piece.rb +20 -0
  36. data/lib/mml/base/content/piecewise.rb +20 -0
  37. data/lib/mml/base/content/relations.rb +113 -0
  38. data/lib/mml/base/content/reln.rb +19 -0
  39. data/lib/mml/base/content/semantics.rb +27 -0
  40. data/lib/mml/base/content/sep.rb +19 -0
  41. data/lib/mml/base/content/sets.rb +163 -0
  42. data/lib/mml/base/content/share.rb +24 -0
  43. data/lib/mml/base/content/statistics.rb +95 -0
  44. data/lib/mml/base/content/vector_calculus.rb +63 -0
  45. data/lib/mml/base/content_loader.rb +195 -0
  46. data/lib/mml/base/deprecated_font_attributes.rb +31 -0
  47. data/lib/mml/base/maction.rb +29 -0
  48. data/lib/mml/base/maligngroup.rb +26 -0
  49. data/lib/mml/base/malignmark.rb +26 -0
  50. data/lib/mml/base/math.rb +64 -0
  51. data/lib/mml/base/menclose.rb +27 -0
  52. data/lib/mml/base/merror.rb +25 -0
  53. data/lib/mml/base/mfenced.rb +34 -0
  54. data/lib/mml/base/mfrac.rb +35 -0
  55. data/lib/mml/base/mfraction.rb +33 -0
  56. data/lib/mml/base/mglyph.rb +44 -0
  57. data/lib/mml/base/mi.rb +37 -0
  58. data/lib/mml/base/mlabeledtr.rb +33 -0
  59. data/lib/mml/base/mlongdiv.rb +31 -0
  60. data/lib/mml/base/mmultiscripts.rb +31 -0
  61. data/lib/mml/base/mn.rb +35 -0
  62. data/lib/mml/base/mo.rb +74 -0
  63. data/lib/mml/base/mover.rb +29 -0
  64. data/lib/mml/base/mpadded.rb +35 -0
  65. data/lib/mml/base/mphantom.rb +25 -0
  66. data/lib/mml/base/mprescripts.rb +24 -0
  67. data/lib/mml/base/mroot.rb +25 -0
  68. data/lib/mml/base/mrow.rb +27 -0
  69. data/lib/mml/base/ms.rb +35 -0
  70. data/lib/mml/base/mscarries.rb +33 -0
  71. data/lib/mml/base/mscarry.rb +29 -0
  72. data/lib/mml/base/msgroup.rb +31 -0
  73. data/lib/mml/base/msline.rb +34 -0
  74. data/lib/mml/base/mspace.rb +52 -0
  75. data/lib/mml/base/msqrt.rb +25 -0
  76. data/lib/mml/base/msrow.rb +27 -0
  77. data/lib/mml/base/mstack.rb +33 -0
  78. data/lib/mml/base/mstyle.rb +185 -0
  79. data/lib/mml/base/msub.rb +27 -0
  80. data/lib/mml/base/msubsup.rb +29 -0
  81. data/lib/mml/base/msup.rb +27 -0
  82. data/lib/mml/base/mtable.rb +65 -0
  83. data/lib/mml/base/mtd.rb +35 -0
  84. data/lib/mml/base/mtext.rb +30 -0
  85. data/lib/mml/base/mtr.rb +35 -0
  86. data/lib/mml/base/munder.rb +31 -0
  87. data/lib/mml/base/munderover.rb +31 -0
  88. data/lib/mml/base/none.rb +24 -0
  89. data/lib/mml/base/semantics.rb +25 -0
  90. data/lib/mml/base/universal_presentation_attributes.rb +42 -0
  91. data/lib/mml/base/v3_common.rb +16 -0
  92. data/lib/mml/base/v3_only/operator_attrs.rb +24 -0
  93. data/lib/mml/base/v3_only/style_attrs.rb +31 -0
  94. data/lib/mml/base/v3_only/table_attrs.rb +28 -0
  95. data/lib/mml/base/v3_only.rb +11 -0
  96. data/lib/mml/base/v3_presentation_attributes.rb +15 -0
  97. data/lib/mml/base/v4_attributes.rb +16 -0
  98. data/lib/mml/base.rb +61 -0
  99. data/lib/mml/common_elements.rb +419 -0
  100. data/lib/mml/context_configuration.rb +147 -0
  101. data/lib/mml/context_options.rb +64 -0
  102. data/lib/mml/namespace.rb +10 -0
  103. data/lib/mml/v2/annotation.rb +9 -0
  104. data/lib/mml/v2/annotation_xml.rb +9 -0
  105. data/lib/mml/v2/apply.rb +9 -0
  106. data/lib/mml/v2/arith.rb +93 -0
  107. data/lib/mml/v2/bind.rb +9 -0
  108. data/lib/mml/v2/bvar.rb +9 -0
  109. data/lib/mml/v2/calculus.rb +33 -0
  110. data/lib/mml/v2/ci.rb +9 -0
  111. data/lib/mml/v2/cn.rb +9 -0
  112. data/lib/mml/v2/common_elements.rb +34 -0
  113. data/lib/mml/v2/condition.rb +9 -0
  114. data/lib/mml/v2/configuration.rb +13 -0
  115. data/lib/mml/v2/constants.rb +65 -0
  116. data/lib/mml/v2/csymbol.rb +9 -0
  117. data/lib/mml/v2/degree.rb +9 -0
  118. data/lib/mml/v2/elementary_functions.rb +121 -0
  119. data/lib/mml/v2/fn.rb +9 -0
  120. data/lib/mml/v2/functions.rb +29 -0
  121. data/lib/mml/v2/interval.rb +9 -0
  122. data/lib/mml/v2/inverse.rb +9 -0
  123. data/lib/mml/v2/lambda.rb +9 -0
  124. data/lib/mml/v2/linear_algebra.rb +41 -0
  125. data/lib/mml/v2/logic.rb +33 -0
  126. data/lib/mml/v2/maction.rb +9 -0
  127. data/lib/mml/v2/maligngroup.rb +9 -0
  128. data/lib/mml/v2/malignmark.rb +9 -0
  129. data/lib/mml/v2/math.rb +11 -0
  130. data/lib/mml/v2/menclose.rb +9 -0
  131. data/lib/mml/v2/merror.rb +9 -0
  132. data/lib/mml/v2/mfenced.rb +9 -0
  133. data/lib/mml/v2/mfrac.rb +9 -0
  134. data/lib/mml/v2/mfraction.rb +9 -0
  135. data/lib/mml/v2/mglyph.rb +9 -0
  136. data/lib/mml/v2/mi.rb +9 -0
  137. data/lib/mml/v2/mlabeledtr.rb +9 -0
  138. data/lib/mml/v2/mlongdiv.rb +9 -0
  139. data/lib/mml/v2/mmultiscripts.rb +9 -0
  140. data/lib/mml/v2/mn.rb +9 -0
  141. data/lib/mml/v2/mo.rb +10 -0
  142. data/lib/mml/v2/mover.rb +9 -0
  143. data/lib/mml/v2/mpadded.rb +9 -0
  144. data/lib/mml/v2/mphantom.rb +9 -0
  145. data/lib/mml/v2/mprescripts.rb +9 -0
  146. data/lib/mml/v2/mroot.rb +9 -0
  147. data/lib/mml/v2/mrow.rb +9 -0
  148. data/lib/mml/v2/ms.rb +9 -0
  149. data/lib/mml/v2/mscarries.rb +9 -0
  150. data/lib/mml/v2/mscarry.rb +9 -0
  151. data/lib/mml/v2/msgroup.rb +9 -0
  152. data/lib/mml/v2/msline.rb +9 -0
  153. data/lib/mml/v2/mspace.rb +9 -0
  154. data/lib/mml/v2/msqrt.rb +9 -0
  155. data/lib/mml/v2/msrow.rb +9 -0
  156. data/lib/mml/v2/mstack.rb +9 -0
  157. data/lib/mml/v2/mstyle.rb +10 -0
  158. data/lib/mml/v2/msub.rb +9 -0
  159. data/lib/mml/v2/msubsup.rb +9 -0
  160. data/lib/mml/v2/msup.rb +9 -0
  161. data/lib/mml/v2/mtable.rb +9 -0
  162. data/lib/mml/v2/mtd.rb +9 -0
  163. data/lib/mml/v2/mtext.rb +9 -0
  164. data/lib/mml/v2/mtr.rb +9 -0
  165. data/lib/mml/v2/munder.rb +9 -0
  166. data/lib/mml/v2/munderover.rb +9 -0
  167. data/lib/mml/v2/namespace.rb +7 -0
  168. data/lib/mml/v2/none.rb +9 -0
  169. data/lib/mml/v2/otherwise.rb +9 -0
  170. data/lib/mml/v2/piece.rb +9 -0
  171. data/lib/mml/v2/piecewise.rb +9 -0
  172. data/lib/mml/v2/relations.rb +41 -0
  173. data/lib/mml/v2/reln.rb +13 -0
  174. data/lib/mml/v2/semantics.rb +9 -0
  175. data/lib/mml/v2/sep.rb +9 -0
  176. data/lib/mml/v2/sets.rb +57 -0
  177. data/lib/mml/v2/statistics.rb +33 -0
  178. data/lib/mml/v2/vector_calculus.rb +21 -0
  179. data/lib/mml/v2.rb +311 -0
  180. data/lib/mml/v3/annotation.rb +10 -0
  181. data/lib/mml/v3/annotation_xml.rb +10 -0
  182. data/lib/mml/v3/apply.rb +10 -0
  183. data/lib/mml/v3/arith.rb +115 -0
  184. data/lib/mml/v3/bind.rb +10 -0
  185. data/lib/mml/v3/calculus.rb +40 -0
  186. data/lib/mml/v3/cbytes.rb +10 -0
  187. data/lib/mml/v3/cerror.rb +10 -0
  188. data/lib/mml/v3/ci.rb +10 -0
  189. data/lib/mml/v3/cn.rb +10 -0
  190. data/lib/mml/v3/common_elements.rb +42 -0
  191. data/lib/mml/v3/configuration.rb +4 -96
  192. data/lib/mml/v3/constants.rb +80 -0
  193. data/lib/mml/v3/constructs.rb +55 -0
  194. data/lib/mml/v3/cs.rb +10 -0
  195. data/lib/mml/v3/csymbol.rb +10 -0
  196. data/lib/mml/v3/deprecated_content.rb +29 -0
  197. data/lib/mml/v3/elementary_functions.rb +145 -0
  198. data/lib/mml/v3/functions.rb +35 -0
  199. data/lib/mml/v3/linear_algebra.rb +50 -0
  200. data/lib/mml/v3/logic.rb +40 -0
  201. data/lib/mml/v3/maction.rb +3 -15
  202. data/lib/mml/v3/maligngroup.rb +2 -12
  203. data/lib/mml/v3/malignmark.rb +2 -12
  204. data/lib/mml/v3/math.rb +7 -8
  205. data/lib/mml/v3/menclose.rb +3 -14
  206. data/lib/mml/v3/merror.rb +3 -12
  207. data/lib/mml/v3/mfenced.rb +3 -21
  208. data/lib/mml/v3/mfrac.rb +3 -20
  209. data/lib/mml/v3/mfraction.rb +3 -20
  210. data/lib/mml/v3/mglyph.rb +3 -38
  211. data/lib/mml/v3/mi.rb +4 -30
  212. data/lib/mml/v3/mlabeledtr.rb +2 -23
  213. data/lib/mml/v3/mlongdiv.rb +3 -18
  214. data/lib/mml/v3/mmultiscripts.rb +3 -20
  215. data/lib/mml/v3/mn.rb +4 -30
  216. data/lib/mml/v3/mo.rb +5 -78
  217. data/lib/mml/v3/mover.rb +3 -16
  218. data/lib/mml/v3/mpadded.rb +3 -22
  219. data/lib/mml/v3/mphantom.rb +3 -12
  220. data/lib/mml/v3/mprescripts.rb +2 -10
  221. data/lib/mml/v3/mroot.rb +3 -12
  222. data/lib/mml/v3/mrow.rb +4 -18
  223. data/lib/mml/v3/ms.rb +5 -36
  224. data/lib/mml/v3/mscarries.rb +3 -20
  225. data/lib/mml/v3/mscarry.rb +3 -16
  226. data/lib/mml/v3/msgroup.rb +3 -18
  227. data/lib/mml/v3/msline.rb +2 -20
  228. data/lib/mml/v3/mspace.rb +3 -50
  229. data/lib/mml/v3/msqrt.rb +3 -12
  230. data/lib/mml/v3/msrow.rb +3 -14
  231. data/lib/mml/v3/mstack.rb +3 -20
  232. data/lib/mml/v3/mstyle.rb +6 -204
  233. data/lib/mml/v3/msub.rb +3 -14
  234. data/lib/mml/v3/msubsup.rb +3 -16
  235. data/lib/mml/v3/msup.rb +3 -14
  236. data/lib/mml/v3/mtable.rb +3 -53
  237. data/lib/mml/v3/mtd.rb +3 -16
  238. data/lib/mml/v3/mtext.rb +4 -30
  239. data/lib/mml/v3/mtr.rb +2 -21
  240. data/lib/mml/v3/munder.rb +3 -18
  241. data/lib/mml/v3/munderover.rb +3 -18
  242. data/lib/mml/v3/namespace.rb +1 -4
  243. data/lib/mml/v3/none.rb +2 -10
  244. data/lib/mml/v3/relations.rb +50 -0
  245. data/lib/mml/v3/semantics.rb +3 -12
  246. data/lib/mml/v3/sets.rb +70 -0
  247. data/lib/mml/v3/statistics.rb +40 -0
  248. data/lib/mml/v3/vector_calculus.rb +25 -0
  249. data/lib/mml/v3.rb +74 -75
  250. data/lib/mml/v4/a.rb +3 -13
  251. data/lib/mml/v4/annotation.rb +10 -0
  252. data/lib/mml/v4/annotation_xml.rb +14 -0
  253. data/lib/mml/v4/apply.rb +9 -0
  254. data/lib/mml/v4/arith.rb +93 -0
  255. data/lib/mml/v4/calculus.rb +25 -0
  256. data/lib/mml/v4/cbytes.rb +9 -0
  257. data/lib/mml/v4/cerror.rb +9 -0
  258. data/lib/mml/v4/ci.rb +9 -0
  259. data/lib/mml/v4/cn.rb +9 -0
  260. data/lib/mml/v4/common_elements.rb +46 -0
  261. data/lib/mml/v4/configuration.rb +4 -97
  262. data/lib/mml/v4/constants.rb +65 -0
  263. data/lib/mml/v4/constructs.rb +49 -0
  264. data/lib/mml/v4/cs.rb +9 -0
  265. data/lib/mml/v4/csymbol.rb +9 -0
  266. data/lib/mml/v4/deprecated_content.rb +25 -0
  267. data/lib/mml/v4/elementary_functions.rb +118 -0
  268. data/lib/mml/v4/factorof.rb +9 -0
  269. data/lib/mml/v4/functions.rb +30 -0
  270. data/lib/mml/v4/limit.rb +9 -0
  271. data/lib/mml/v4/linear_algebra.rb +41 -0
  272. data/lib/mml/v4/logic.rb +33 -0
  273. data/lib/mml/v4/maction.rb +3 -19
  274. data/lib/mml/v4/maligngroup.rb +3 -17
  275. data/lib/mml/v4/malignmark.rb +3 -17
  276. data/lib/mml/v4/math.rb +4 -14
  277. data/lib/mml/v4/menclose.rb +3 -18
  278. data/lib/mml/v4/merror.rb +3 -16
  279. data/lib/mml/v4/mfenced.rb +3 -25
  280. data/lib/mml/v4/mfrac.rb +3 -24
  281. data/lib/mml/v4/mfraction.rb +3 -20
  282. data/lib/mml/v4/mglyph.rb +3 -35
  283. data/lib/mml/v4/mi.rb +4 -30
  284. data/lib/mml/v4/mlabeledtr.rb +5 -23
  285. data/lib/mml/v4/mlongdiv.rb +3 -18
  286. data/lib/mml/v4/mmultiscripts.rb +3 -24
  287. data/lib/mml/v4/mn.rb +4 -29
  288. data/lib/mml/v4/mo.rb +4 -75
  289. data/lib/mml/v4/mover.rb +3 -20
  290. data/lib/mml/v4/mpadded.rb +3 -26
  291. data/lib/mml/v4/mphantom.rb +3 -16
  292. data/lib/mml/v4/mprescripts.rb +3 -11
  293. data/lib/mml/v4/mroot.rb +3 -16
  294. data/lib/mml/v4/mrow.rb +4 -20
  295. data/lib/mml/v4/ms.rb +4 -34
  296. data/lib/mml/v4/mscarries.rb +3 -20
  297. data/lib/mml/v4/mscarry.rb +3 -16
  298. data/lib/mml/v4/msgroup.rb +3 -18
  299. data/lib/mml/v4/msline.rb +3 -21
  300. data/lib/mml/v4/mspace.rb +3 -49
  301. data/lib/mml/v4/msqrt.rb +3 -16
  302. data/lib/mml/v4/msrow.rb +3 -18
  303. data/lib/mml/v4/mstack.rb +3 -24
  304. data/lib/mml/v4/mstyle.rb +4 -186
  305. data/lib/mml/v4/msub.rb +3 -18
  306. data/lib/mml/v4/msubsup.rb +3 -20
  307. data/lib/mml/v4/msup.rb +3 -18
  308. data/lib/mml/v4/mtable.rb +3 -55
  309. data/lib/mml/v4/mtd.rb +3 -20
  310. data/lib/mml/v4/mtext.rb +4 -29
  311. data/lib/mml/v4/mtr.rb +3 -25
  312. data/lib/mml/v4/munder.rb +3 -22
  313. data/lib/mml/v4/munderover.rb +3 -22
  314. data/lib/mml/v4/namespace.rb +1 -4
  315. data/lib/mml/v4/none.rb +5 -11
  316. data/lib/mml/v4/relations.rb +37 -0
  317. data/lib/mml/v4/semantics.rb +3 -12
  318. data/lib/mml/v4/sets.rb +57 -0
  319. data/lib/mml/v4/statistics.rb +33 -0
  320. data/lib/mml/v4/tendsto.rb +9 -0
  321. data/lib/mml/v4/vector_calculus.rb +21 -0
  322. data/lib/mml/v4.rb +426 -71
  323. data/lib/mml/version.rb +1 -1
  324. data/lib/mml/versioned_parser.rb +46 -0
  325. data/lib/mml.rb +36 -6
  326. data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
  327. data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
  328. data/reference-docs/mathml-source/readme.txt +40 -0
  329. data/reference-docs/mathml-source/run +296 -0
  330. data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
  331. data/reference-docs/mathml-source/style/html/images.xsl +98 -0
  332. data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
  333. data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
  334. data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
  335. data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
  336. data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
  337. data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
  338. data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
  339. data/reference-docs/mathml-source/xml/changes.xml +773 -0
  340. data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
  341. data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
  342. data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
  343. data/reference-docs/mathml-source/xml/contributors.xml +425 -0
  344. data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
  345. data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
  346. data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
  347. data/reference-docs/mathml-source/xml/glossary.xml +519 -0
  348. data/reference-docs/mathml-source/xml/interface.xml +1096 -0
  349. data/reference-docs/mathml-source/xml/introduction.xml +724 -0
  350. data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
  351. data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
  352. data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
  353. data/reference-docs/mathml-source/xml/mixing.xml +982 -0
  354. data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
  355. data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
  356. data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
  357. data/reference-docs/mathml-source/xml/references.xml +323 -0
  358. data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
  359. data/schemas/README.adoc +15 -0
  360. data/schemas/mathml2/CVS/Entries +4 -0
  361. data/schemas/mathml2/CVS/Repository +1 -0
  362. data/schemas/mathml2/CVS/Root +1 -0
  363. data/schemas/mathml2/common/CVS/Entries +4 -0
  364. data/schemas/mathml2/common/CVS/Repository +1 -0
  365. data/schemas/mathml2/common/CVS/Root +1 -0
  366. data/schemas/mathml2/common/common-attribs.xsd +41 -0
  367. data/schemas/mathml2/common/math.xsd +126 -0
  368. data/schemas/mathml2/common/xlink-href.xsd +20 -0
  369. data/schemas/mathml2/content/CVS/Entries +16 -0
  370. data/schemas/mathml2/content/CVS/Repository +1 -0
  371. data/schemas/mathml2/content/CVS/Root +1 -0
  372. data/schemas/mathml2/content/arith.xsd +90 -0
  373. data/schemas/mathml2/content/calculus.xsd +146 -0
  374. data/schemas/mathml2/content/common-attrib.xsd +30 -0
  375. data/schemas/mathml2/content/constants.xsd +83 -0
  376. data/schemas/mathml2/content/constructs.xsd +260 -0
  377. data/schemas/mathml2/content/elementary-functions.xsd +117 -0
  378. data/schemas/mathml2/content/functions.xsd +73 -0
  379. data/schemas/mathml2/content/linear-algebra.xsd +173 -0
  380. data/schemas/mathml2/content/logic.xsd +53 -0
  381. data/schemas/mathml2/content/relations.xsd +55 -0
  382. data/schemas/mathml2/content/semantics.xsd +85 -0
  383. data/schemas/mathml2/content/sets.xsd +236 -0
  384. data/schemas/mathml2/content/statistics.xsd +136 -0
  385. data/schemas/mathml2/content/tokens.xsd +120 -0
  386. data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
  387. data/schemas/mathml2/content/vector-calculus.xsd +88 -0
  388. data/schemas/mathml2/mathml2.xsd +59 -0
  389. data/schemas/mathml2/presentation/CVS/Entries +12 -0
  390. data/schemas/mathml2/presentation/CVS/Repository +1 -0
  391. data/schemas/mathml2/presentation/CVS/Root +1 -0
  392. data/schemas/mathml2/presentation/action.xsd +44 -0
  393. data/schemas/mathml2/presentation/characters.xsd +37 -0
  394. data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
  395. data/schemas/mathml2/presentation/common-types.xsd +103 -0
  396. data/schemas/mathml2/presentation/error.xsd +40 -0
  397. data/schemas/mathml2/presentation/layout.xsd +195 -0
  398. data/schemas/mathml2/presentation/scripts.xsd +186 -0
  399. data/schemas/mathml2/presentation/space.xsd +52 -0
  400. data/schemas/mathml2/presentation/style.xsd +69 -0
  401. data/schemas/mathml2/presentation/table.xsd +216 -0
  402. data/schemas/mathml2/presentation/tokens.xsd +124 -0
  403. data/schemas/mathml3/mathml3-common.xsd +99 -0
  404. data/schemas/mathml3/mathml3-content.xsd +684 -0
  405. data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
  406. data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
  407. data/schemas/mathml3/mathml3.xsd +9 -0
  408. metadata +308 -4
  409. data/lib/mml/v3/common_attributes.rb +0 -22
  410. data/lib/mml/v4/common_attributes.rb +0 -26
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Math
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :display, :string
11
+ attribute :macros, :string
12
+ attribute :href, :string
13
+ attribute :lang, :string
14
+ attribute :bevelled, :string
15
+ attribute :mathsize, :string
16
+ attribute :mathcolor, :string
17
+ attribute :rowalign, :string
18
+ attribute :columnalign, :string
19
+ attribute :rowspacing, :string
20
+ attribute :columnspacing, :string
21
+ attribute :rowlines, :string
22
+ attribute :columnlines, :string
23
+ attribute :frame, :string
24
+ # Linebreak attributes
25
+ attribute :indentalign, :string
26
+ attribute :indentshift, :string
27
+ attribute :indentalignfirst, :string
28
+ attribute :indentshiftfirst, :string
29
+ attribute :indentalignlast, :string
30
+ attribute :indentshiftlast, :string
31
+ attribute :linebreakmultchar, :string
32
+
33
+ xml do
34
+ namespace Mml::Namespace
35
+ element "math"
36
+ mixed_content
37
+
38
+ map_attribute :display, to: :display
39
+ map_attribute :macros, to: :macros
40
+ map_attribute "href", to: :href
41
+ map_attribute "xml:lang", to: :lang
42
+ map_attribute "bevelled", to: :bevelled
43
+ map_attribute "mathsize", to: :mathsize
44
+ map_attribute "mathcolor", to: :mathcolor
45
+ map_attribute "rowalign", to: :rowalign
46
+ map_attribute "columnalign", to: :columnalign
47
+ map_attribute "rowspacing", to: :rowspacing
48
+ map_attribute "columnspacing", to: :columnspacing
49
+ map_attribute "rowlines", to: :rowlines
50
+ map_attribute "columnlines", to: :columnlines
51
+ map_attribute "frame", to: :frame
52
+ map_attribute "indentalign", to: :indentalign
53
+ map_attribute "indentshift", to: :indentshift
54
+ map_attribute "indentalignfirst", to: :indentalignfirst
55
+ map_attribute "indentshiftfirst", to: :indentshiftfirst
56
+ map_attribute "indentalignlast", to: :indentalignlast
57
+ map_attribute "indentshiftlast", to: :indentshiftlast
58
+ map_attribute "linebreakmultchar", to: :linebreakmultchar
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Menclose
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+ attribute :notation, :string
13
+
14
+ xml do
15
+ namespace Mml::Namespace
16
+ element "menclose"
17
+ mixed_content
18
+
19
+ map_attribute "mathcolor", to: :mathcolor
20
+ map_attribute "mathbackground", to: :mathbackground
21
+ map_attribute "notation", to: :notation, render_empty: true
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Merror
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :mathcolor, :string
12
+
13
+ xml do
14
+ namespace Mml::Namespace
15
+ element "merror"
16
+ mixed_content
17
+
18
+ map_attribute "mathcolor", to: :mathcolor
19
+ map_attribute "mathbackground", to: :mathbackground
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mfenced
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :separators, :string
12
+ attribute :mathcolor, :string
13
+ attribute :content, :string
14
+ attribute :close, :string
15
+ attribute :open, :string
16
+
17
+ xml do
18
+ namespace Mml::Namespace
19
+ element "mfenced"
20
+ mixed_content
21
+
22
+ map_content to: :content
23
+
24
+ map_attribute "mathbackground", to: :mathbackground
25
+ map_attribute "separators", to: :separators, render_empty: true
26
+ map_attribute "mathcolor", to: :mathcolor
27
+ map_attribute "close", to: :close
28
+ map_attribute "open", to: :open, render_empty: true
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mfrac
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+ attribute :linethickness, :string
13
+ attribute :numalign, :string
14
+ attribute :denomalign, :string
15
+ attribute :bevelled, :string
16
+ attribute :href, :string
17
+
18
+ xml do
19
+ namespace Mml::Namespace
20
+ element "mfrac"
21
+ mixed_content
22
+
23
+ map_attribute "mathcolor", to: :mathcolor
24
+ map_attribute "mathbackground", to: :mathbackground
25
+ map_attribute "linethickness", to: :linethickness
26
+ map_attribute "numalign", to: :numalign
27
+ map_attribute "denomalign", to: :denomalign
28
+ map_attribute "bevelled", to: :bevelled
29
+ map_attribute "href", to: :href
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mfraction
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+ attribute :linethickness, :string
13
+ attribute :numalign, :string
14
+ attribute :denomalign, :string
15
+ attribute :bevelled, :string
16
+
17
+ xml do
18
+ namespace Mml::Namespace
19
+ element "mfraction"
20
+ mixed_content
21
+
22
+ map_attribute "mathcolor", to: :mathcolor
23
+ map_attribute "mathbackground", to: :mathbackground
24
+ map_attribute "linethickness", to: :linethickness
25
+ map_attribute "numalign", to: :numalign
26
+ map_attribute "denomalign", to: :denomalign
27
+ map_attribute "bevelled", to: :bevelled
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mglyph
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :alt, :string
11
+ attribute :src, :string
12
+ attribute :width, :string
13
+ attribute :index, :integer
14
+ attribute :height, :string
15
+ attribute :valign, :string
16
+ attribute :mathvariant, :string
17
+ attribute :mathbackground, :string
18
+ attribute :fontfamily, :string
19
+
20
+ attribute :mathsize, :string
21
+ attribute :mathcolor, :string
22
+
23
+ xml do
24
+ namespace Mml::Namespace
25
+ element "mglyph"
26
+
27
+ map_attribute "src", to: :src
28
+ map_attribute "alt", to: :alt
29
+ map_attribute "index", to: :index
30
+ map_attribute "width", to: :width
31
+ map_attribute "height", to: :height
32
+ map_attribute "valign", to: :valign
33
+ map_attribute "mathvariant", to: :mathvariant
34
+ map_attribute "mathbackground", to: :mathbackground
35
+ map_attribute "fontfamily", to: :fontfamily
36
+
37
+ map_attribute "mathsize", to: :mathsize
38
+ map_attribute "mathcolor", to: :mathcolor
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mi
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :value, :string
11
+ attribute :mathsize, :string
12
+ attribute :mathcolor, :string
13
+ attribute :mathvariant, :string
14
+ attribute :mathbackground, :string
15
+ attribute :href, :string
16
+ attribute :mglyph_value, :mglyph, collection: true
17
+ attribute :lang, :string
18
+
19
+ xml do
20
+ namespace Mml::Namespace
21
+ element "mi"
22
+ mixed_content
23
+
24
+ map_content to: :value
25
+ map_attribute "mathsize", to: :mathsize
26
+ map_attribute "mathcolor", to: :mathcolor
27
+ map_attribute "mathvariant", to: :mathvariant
28
+ map_attribute "mathbackground", to: :mathbackground
29
+ map_attribute "href", to: :href
30
+ map_attribute "xml:lang", to: :lang
31
+ map_element "mglyph", to: :mglyph_value
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mlabeledtr
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :columnalign, :string
12
+ attribute :mathcolor, :string
13
+ attribute :rowalign, :string
14
+ attribute :id, :string
15
+ attribute :mtd_value, :mtd, collection: true
16
+
17
+ xml do
18
+ namespace Mml::Namespace
19
+ element "mlabeledtr"
20
+ mixed_content
21
+
22
+ map_attribute "mathbackground", to: :mathbackground
23
+ map_attribute "columnalign", to: :columnalign
24
+ map_attribute "mathcolor", to: :mathcolor
25
+ map_attribute "rowalign", to: :rowalign
26
+ map_attribute "id", to: :id
27
+ map_element "mtd", to: :mtd_value
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mlongdiv
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :longdivstyle, :string
12
+ attribute :mathcolor, :string
13
+ attribute :position, :integer
14
+ attribute :shift, :integer
15
+
16
+ xml do
17
+ namespace Mml::Namespace
18
+ element "mlongdiv"
19
+ mixed_content
20
+
21
+ map_attribute "mathbackground", to: :mathbackground
22
+ map_attribute "longdivstyle", to: :longdivstyle
23
+ map_attribute "mathcolor", to: :mathcolor
24
+ map_attribute "position", to: :position
25
+ map_attribute "shift", to: :shift
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mmultiscripts
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+ attribute :subscriptshift, :string
13
+ attribute :superscriptshift, :string
14
+ attribute :mprescripts_value, :mprescripts
15
+
16
+ xml do
17
+ namespace Mml::Namespace
18
+ element "mmultiscripts"
19
+ mixed_content
20
+
21
+ map_attribute "mathcolor", to: :mathcolor
22
+ map_attribute "mathbackground", to: :mathbackground
23
+ map_attribute "subscriptshift", to: :subscriptshift
24
+ map_attribute "superscriptshift", to: :superscriptshift
25
+ map_element "mprescripts", to: :mprescripts_value
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mn
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :value, :string
11
+ attribute :mathcolor, :string
12
+ attribute :mathbackground, :string
13
+ attribute :mathvariant, :string
14
+ attribute :mathsize, :string
15
+ attribute :href, :string
16
+ attribute :mglyph_value, :mglyph, collection: true
17
+
18
+ xml do
19
+ namespace Mml::Namespace
20
+ element "mn"
21
+ mixed_content
22
+
23
+ map_content to: :value
24
+ map_attribute "mathcolor", to: :mathcolor
25
+ map_attribute "mathbackground", to: :mathbackground
26
+ map_attribute "mathvariant", to: :mathvariant
27
+ map_attribute "mathsize", to: :mathsize
28
+ map_attribute "href", to: :href
29
+ map_element "mglyph", to: :mglyph_value
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mo
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :value, :string
11
+ attribute :mathcolor, :string
12
+ attribute :mathbackground, :string
13
+ attribute :mathvariant, :string
14
+ attribute :mathsize, :string
15
+ attribute :form, :string
16
+ attribute :lspace, :string
17
+ attribute :rspace, :string
18
+ attribute :stretchy, :string
19
+ attribute :symmetric, :string
20
+ attribute :maxsize, :string
21
+ attribute :minsize, :string
22
+ attribute :largeop, :string
23
+ attribute :movablelimits, :string
24
+ attribute :accent, :string
25
+ attribute :linebreak, :string
26
+ attribute :lineleading, :string
27
+ attribute :linebreakstyle, :string
28
+ attribute :linebreakmultchar, :string
29
+ attribute :indentalign, :string
30
+ attribute :indentshift, :string
31
+ attribute :indenttarget, :string
32
+ attribute :indentalignfirst, :string
33
+ attribute :indentshiftfirst, :string
34
+ attribute :indentalignlast, :string
35
+ attribute :indentshiftlast, :string
36
+
37
+ # rubocop:disable Metrics/BlockLength
38
+ xml do
39
+ namespace Mml::Namespace
40
+ element "mo"
41
+
42
+ map_content to: :value
43
+ map_attribute "form", to: :form
44
+ map_attribute "accent", to: :accent
45
+ map_attribute "lspace", to: :lspace
46
+ map_attribute "rspace", to: :rspace
47
+ map_attribute "maxsize", to: :maxsize
48
+ map_attribute "minsize", to: :minsize
49
+ map_attribute "largeop", to: :largeop
50
+ map_attribute "stretchy", to: :stretchy
51
+ map_attribute "mathsize", to: :mathsize
52
+ map_attribute "linebreak", to: :linebreak
53
+ map_attribute "symmetric", to: :symmetric
54
+ map_attribute "mathcolor", to: :mathcolor
55
+ map_attribute "mathvariant", to: :mathvariant
56
+ map_attribute "lineleading", to: :lineleading
57
+ map_attribute "indentalign", to: :indentalign
58
+ map_attribute "indentshift", to: :indentshift
59
+ map_attribute "indenttarget", to: :indenttarget
60
+ map_attribute "movablelimits", to: :movablelimits
61
+ map_attribute "linebreakstyle", to: :linebreakstyle
62
+ map_attribute "mathbackground", to: :mathbackground
63
+ map_attribute "indentalignlast", to: :indentalignlast
64
+ map_attribute "indentshiftlast", to: :indentshiftlast
65
+ map_attribute "indentalignfirst", to: :indentalignfirst
66
+ map_attribute "indentshiftfirst", to: :indentshiftfirst
67
+ map_attribute "linebreakmultchar", to: :linebreakmultchar
68
+ end
69
+ # rubocop:enable Metrics/BlockLength
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mover
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :mathcolor, :string
12
+ attribute :accent, :string
13
+ attribute :align, :string
14
+
15
+ xml do
16
+ namespace Mml::Namespace
17
+ element "mover"
18
+ mixed_content
19
+
20
+ map_attribute "mathbackground", to: :mathbackground
21
+ map_attribute "mathcolor", to: :mathcolor
22
+ map_attribute "accent", to: :accent
23
+ map_attribute "align", to: :align
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mpadded
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :mathcolor, :string
12
+ attribute :voffset, :string
13
+ attribute :height, :string
14
+ attribute :lspace, :string
15
+ attribute :depth, :string
16
+ attribute :width, :string
17
+
18
+ xml do
19
+ namespace Mml::Namespace
20
+ element "mpadded"
21
+ mixed_content
22
+
23
+ map_attribute "mathbackground", to: :mathbackground
24
+ map_attribute "mathcolor", to: :mathcolor
25
+ map_attribute "voffset", to: :voffset
26
+ map_attribute "height", to: :height
27
+ map_attribute "lspace", to: :lspace
28
+ map_attribute "depth", to: :depth
29
+ map_attribute "width", to: :width
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mphantom
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+
13
+ xml do
14
+ namespace Mml::Namespace
15
+ element "mphantom"
16
+ mixed_content
17
+
18
+ map_attribute "mathcolor", to: :mathcolor
19
+ map_attribute "mathbackground", to: :mathbackground
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mprescripts
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+
13
+ xml do
14
+ namespace Mml::Namespace
15
+ element "mprescripts"
16
+
17
+ map_attribute "mathcolor", to: :mathcolor
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mroot
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathcolor, :string
11
+ attribute :mathbackground, :string
12
+
13
+ xml do
14
+ namespace Mml::Namespace
15
+ element "mroot"
16
+ mixed_content
17
+
18
+ map_attribute "mathcolor", to: :mathcolor
19
+ map_attribute "mathbackground", to: :mathbackground
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mml
4
+ module Base
5
+ module Mrow
6
+ # NOTE: class_eval resolves constants in module's lexical scope.
7
+ # Use fully qualified names (e.g., Mml::Namespace).
8
+ def self.included(klass)
9
+ klass.class_eval do
10
+ attribute :mathbackground, :string
11
+ attribute :mathcolor, :string
12
+ attribute :content, :string
13
+
14
+ xml do
15
+ namespace Mml::Namespace
16
+ element "mrow"
17
+ mixed_content
18
+
19
+ map_content to: :content
20
+ map_attribute "mathcolor", to: :mathcolor
21
+ map_attribute "mathbackground", to: :mathbackground
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end