plurimath 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +33 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +2 -0
  5. data/AsciiMath-Supported-Data.adoc +280 -0
  6. data/Gemfile +1 -0
  7. data/Latex-Supported-Data.adoc +1872 -0
  8. data/MathML-Supported-Data.adoc +270 -0
  9. data/README.adoc +94 -0
  10. data/lib/plurimath/asciimath/constants.rb +301 -0
  11. data/lib/plurimath/asciimath/parse.rb +121 -0
  12. data/lib/plurimath/asciimath/parser.rb +25 -0
  13. data/lib/plurimath/asciimath/transform.rb +395 -0
  14. data/lib/plurimath/asciimath.rb +16 -0
  15. data/lib/plurimath/html/constants.rb +50 -0
  16. data/lib/plurimath/html/parse.rb +149 -0
  17. data/lib/plurimath/html/parser.rb +26 -0
  18. data/lib/plurimath/html/transform.rb +363 -0
  19. data/lib/plurimath/html.rb +15 -0
  20. data/lib/plurimath/latex/constants.rb +1990 -0
  21. data/lib/plurimath/latex/parse.rb +198 -0
  22. data/lib/plurimath/latex/parser.rb +25 -0
  23. data/lib/plurimath/latex/transform.rb +458 -0
  24. data/lib/plurimath/latex.rb +15 -0
  25. data/lib/plurimath/math/formula.rb +51 -0
  26. data/lib/plurimath/math/function/abs.rb +12 -0
  27. data/lib/plurimath/math/function/arccos.rb +12 -0
  28. data/lib/plurimath/math/function/arcsin.rb +12 -0
  29. data/lib/plurimath/math/function/arctan.rb +12 -0
  30. data/lib/plurimath/math/function/bar.rb +16 -0
  31. data/lib/plurimath/math/function/base.rb +36 -0
  32. data/lib/plurimath/math/function/binary_function.rb +58 -0
  33. data/lib/plurimath/math/function/cancel.rb +12 -0
  34. data/lib/plurimath/math/function/ceil.rb +12 -0
  35. data/lib/plurimath/math/function/color.rb +23 -0
  36. data/lib/plurimath/math/function/cos.rb +12 -0
  37. data/lib/plurimath/math/function/cosh.rb +12 -0
  38. data/lib/plurimath/math/function/cot.rb +12 -0
  39. data/lib/plurimath/math/function/coth.rb +12 -0
  40. data/lib/plurimath/math/function/csc.rb +12 -0
  41. data/lib/plurimath/math/function/csch.rb +12 -0
  42. data/lib/plurimath/math/function/ddot.rb +12 -0
  43. data/lib/plurimath/math/function/deg.rb +12 -0
  44. data/lib/plurimath/math/function/det.rb +12 -0
  45. data/lib/plurimath/math/function/dim.rb +12 -0
  46. data/lib/plurimath/math/function/dot.rb +12 -0
  47. data/lib/plurimath/math/function/exp.rb +12 -0
  48. data/lib/plurimath/math/function/f.rb +12 -0
  49. data/lib/plurimath/math/function/fenced.rb +27 -0
  50. data/lib/plurimath/math/function/floor.rb +12 -0
  51. data/lib/plurimath/math/function/font_style/bold.rb +18 -0
  52. data/lib/plurimath/math/function/font_style/double_struck.rb +18 -0
  53. data/lib/plurimath/math/function/font_style/fraktur.rb +18 -0
  54. data/lib/plurimath/math/function/font_style/monospace.rb +18 -0
  55. data/lib/plurimath/math/function/font_style/sans-serif.rb +18 -0
  56. data/lib/plurimath/math/function/font_style/script.rb +18 -0
  57. data/lib/plurimath/math/function/font_style.rb +25 -0
  58. data/lib/plurimath/math/function/frac.rb +23 -0
  59. data/lib/plurimath/math/function/g.rb +12 -0
  60. data/lib/plurimath/math/function/gcd.rb +12 -0
  61. data/lib/plurimath/math/function/glb.rb +12 -0
  62. data/lib/plurimath/math/function/hat.rb +12 -0
  63. data/lib/plurimath/math/function/hom.rb +12 -0
  64. data/lib/plurimath/math/function/inf.rb +17 -0
  65. data/lib/plurimath/math/function/int.rb +17 -0
  66. data/lib/plurimath/math/function/ker.rb +12 -0
  67. data/lib/plurimath/math/function/lcm.rb +12 -0
  68. data/lib/plurimath/math/function/left.rb +20 -0
  69. data/lib/plurimath/math/function/lg.rb +12 -0
  70. data/lib/plurimath/math/function/lim.rb +23 -0
  71. data/lib/plurimath/math/function/liminf.rb +12 -0
  72. data/lib/plurimath/math/function/limits.rb +18 -0
  73. data/lib/plurimath/math/function/limsup.rb +12 -0
  74. data/lib/plurimath/math/function/ln.rb +12 -0
  75. data/lib/plurimath/math/function/log.rb +29 -0
  76. data/lib/plurimath/math/function/lub.rb +12 -0
  77. data/lib/plurimath/math/function/max.rb +12 -0
  78. data/lib/plurimath/math/function/min.rb +12 -0
  79. data/lib/plurimath/math/function/mod.rb +29 -0
  80. data/lib/plurimath/math/function/multiscript.rb +11 -0
  81. data/lib/plurimath/math/function/norm.rb +16 -0
  82. data/lib/plurimath/math/function/obrace.rb +12 -0
  83. data/lib/plurimath/math/function/oint.rb +17 -0
  84. data/lib/plurimath/math/function/over.rb +29 -0
  85. data/lib/plurimath/math/function/overset.rb +23 -0
  86. data/lib/plurimath/math/function/power.rb +36 -0
  87. data/lib/plurimath/math/function/power_base.rb +33 -0
  88. data/lib/plurimath/math/function/prod.rb +29 -0
  89. data/lib/plurimath/math/function/right.rb +24 -0
  90. data/lib/plurimath/math/function/root.rb +23 -0
  91. data/lib/plurimath/math/function/sec.rb +12 -0
  92. data/lib/plurimath/math/function/sech.rb +12 -0
  93. data/lib/plurimath/math/function/sin.rb +12 -0
  94. data/lib/plurimath/math/function/sinh.rb +12 -0
  95. data/lib/plurimath/math/function/sqrt.rb +16 -0
  96. data/lib/plurimath/math/function/stackrel.rb +12 -0
  97. data/lib/plurimath/math/function/substack.rb +17 -0
  98. data/lib/plurimath/math/function/sum.rb +29 -0
  99. data/lib/plurimath/math/function/sup.rb +12 -0
  100. data/lib/plurimath/math/function/table/align.rb +24 -0
  101. data/lib/plurimath/math/function/table/array.rb +25 -0
  102. data/lib/plurimath/math/function/table/bmatrix.rb +26 -0
  103. data/lib/plurimath/math/function/table/matrix.rb +24 -0
  104. data/lib/plurimath/math/function/table/multline.rb +24 -0
  105. data/lib/plurimath/math/function/table/pmatrix.rb +24 -0
  106. data/lib/plurimath/math/function/table/split.rb +24 -0
  107. data/lib/plurimath/math/function/table/vmatrix.rb +25 -0
  108. data/lib/plurimath/math/function/table.rb +54 -0
  109. data/lib/plurimath/math/function/tan.rb +12 -0
  110. data/lib/plurimath/math/function/tanh.rb +12 -0
  111. data/lib/plurimath/math/function/td.rb +32 -0
  112. data/lib/plurimath/math/function/ternary_function.rb +52 -0
  113. data/lib/plurimath/math/function/text.rb +44 -0
  114. data/lib/plurimath/math/function/tilde.rb +12 -0
  115. data/lib/plurimath/math/function/tr.rb +30 -0
  116. data/lib/plurimath/math/function/ubrace.rb +12 -0
  117. data/lib/plurimath/math/function/ul.rb +12 -0
  118. data/lib/plurimath/math/function/unary_function.rb +46 -0
  119. data/lib/plurimath/math/function/underover.rb +12 -0
  120. data/lib/plurimath/math/function/underset.rb +12 -0
  121. data/lib/plurimath/math/function/vec.rb +16 -0
  122. data/lib/plurimath/math/function.rb +14 -0
  123. data/lib/plurimath/math/number.rb +37 -0
  124. data/lib/plurimath/math/symbol.rb +43 -0
  125. data/lib/plurimath/math.rb +56 -0
  126. data/lib/plurimath/mathml/constants.rb +295 -0
  127. data/lib/plurimath/mathml/parse.rb +68 -0
  128. data/lib/plurimath/mathml/parser.rb +26 -0
  129. data/lib/plurimath/mathml/transform.rb +200 -0
  130. data/lib/plurimath/mathml.rb +16 -0
  131. data/lib/plurimath/omml/constants.rb +154 -0
  132. data/lib/plurimath/omml/parser.rb +22 -0
  133. data/lib/plurimath/omml/transform.rb +216 -0
  134. data/lib/plurimath/omml.rb +15 -0
  135. data/lib/plurimath/unicode.rb +15 -0
  136. data/lib/plurimath/unitsml.rb +15 -0
  137. data/lib/plurimath/utility.rb +73 -0
  138. data/lib/plurimath/version.rb +3 -1
  139. data/lib/plurimath.rb +3 -5
  140. data/plurimath.gemspec +4 -3
  141. metadata +169 -9
  142. data/README.md +0 -40
@@ -0,0 +1,270 @@
1
+ === MathML Support
2
+
3
+ ==== Classes
4
+ |===
5
+ | Functions | Fonts
6
+
7
+ | stackrel | double-struck
8
+ | underset | sans-serif
9
+ | mathfrak | monospace
10
+ | mathcal | fraktur
11
+ | overset | script
12
+ | cancel | bold
13
+ | obrace |
14
+ | ubrace |
15
+ | mathtt |
16
+ | mathbf |
17
+ | mathbb |
18
+ | mathsf |
19
+ | arctan |
20
+ | arcsin |
21
+ | arccos |
22
+ | color |
23
+ | floor |
24
+ | tilde |
25
+ | prod |
26
+ | text |
27
+ | norm |
28
+ | sqrt |
29
+ | cosh |
30
+ | tanh |
31
+ | sinh |
32
+ | sech |
33
+ | csch |
34
+ | coth |
35
+ | ddot |
36
+ | ceil |
37
+ | oint |
38
+ | root |
39
+ | frac |
40
+ | log |
41
+ | mod |
42
+ | vec |
43
+ | hat |
44
+ | dot |
45
+ | bar |
46
+ | abs |
47
+ | min |
48
+ | max |
49
+ | dim |
50
+ | det |
51
+ | csc |
52
+ | cot |
53
+ | lub |
54
+ | lcm |
55
+ | glb |
56
+ | gcd |
57
+ | exp |
58
+ | sum |
59
+ | cos |
60
+ | tan |
61
+ | sin |
62
+ | int |
63
+ | sec |
64
+ | ln |
65
+ | ul |
66
+ | g |
67
+ | f |
68
+ |===
69
+
70
+ ==== Tags
71
+ ** annotation_xml
72
+ ** annotation-xml
73
+ ** mmultiscripts
74
+ ** maligngroup
75
+ ** munderover
76
+ ** annotation
77
+ ** malignmark
78
+ ** semantics
79
+ ** mscarries
80
+ ** menclose
81
+ ** mlongdiv
82
+ ** mphantom
83
+ ** mfenced
84
+ ** msgroup
85
+ ** maction
86
+ ** mpadded
87
+ ** msubsup
88
+ ** mscarry
89
+ ** msline
90
+ ** mspace
91
+ ** mstack
92
+ ** mstyle
93
+ ** mtable
94
+ ** munder
95
+ ** merror
96
+ ** msqrt
97
+ ** mroot
98
+ ** msrow
99
+ ** mover
100
+ ** mfrac
101
+ ** math
102
+ ** mrow
103
+ ** msub
104
+ ** msup
105
+ ** mtd
106
+ ** mtr
107
+ ** mn
108
+ ** mo
109
+ ** mi
110
+ ** ms
111
+
112
+ ==== Unicodes
113
+ ** \α
114
+ ** \β
115
+ ** \γ
116
+ ** \Γ
117
+ ** \δ
118
+ ** \Δ
119
+ ** \∆
120
+ ** \ε
121
+ ** \ɛ
122
+ ** \ζ
123
+ ** \η
124
+ ** \θ
125
+ ** \Θ
126
+ ** \ϑ
127
+ ** \ι
128
+ ** \κ
129
+ ** \λ
130
+ ** \Λ
131
+ ** \μ
132
+ ** \ν
133
+ ** \ξ
134
+ ** \Ξ
135
+ ** \π
136
+ ** \Π
137
+ ** \ρ
138
+ ** \ς
139
+ ** \σ
140
+ ** \Σ
141
+ ** \τ
142
+ ** \υ
143
+ ** \φ
144
+ ** \Φ
145
+ ** \ϕ
146
+ ** \χ
147
+ ** \ψ
148
+ ** \Ψ
149
+ ** \ω
150
+ ** \Ω
151
+ ** \⋅
152
+ ** \∙
153
+ ** \·
154
+ ** \∗
155
+ ** \⋆
156
+ ** \×
157
+ ** \⋉
158
+ ** \⋊
159
+ ** \⋈
160
+ ** \÷
161
+ ** \∘
162
+ ** \⊕
163
+ ** \⨁
164
+ ** \⊗
165
+ ** \⊙
166
+ ** \∑
167
+ ** \∏
168
+ ** \∏
169
+ ** \∧
170
+ ** \⋀
171
+ ** \∨
172
+ ** \⋁
173
+ ** \∩
174
+ ** \⋂
175
+ ** \∪
176
+ ** \⋃
177
+ ** \≠
178
+ ** \≤
179
+ ** \≥
180
+ ** \≺
181
+ ** \≻
182
+ ** \⪯
183
+ ** \⪰
184
+ ** \∈
185
+ ** \∉
186
+ ** \⊂
187
+ ** \⊃
188
+ ** \⊆
189
+ ** \⊇
190
+ ** \≡
191
+ ** \≅
192
+ ** \≈
193
+ ** \∝
194
+ ** \¬
195
+ ** \∀
196
+ ** \∃
197
+ ** \⊥
198
+ ** \⊤
199
+ ** \⊢
200
+ ** \⊨
201
+ ** \〈
202
+ ** \〉
203
+ ** \⟨
204
+ ** \⟩
205
+ ** \∫
206
+ ** \∮
207
+ ** \∂
208
+ ** \∇
209
+ ** \±
210
+ ** \∅
211
+ ** \∞
212
+ ** \ℵ
213
+ ** \∴
214
+ ** \∵
215
+ ** \∠
216
+ ** \△
217
+ ** \′
218
+ ** \  
219
+ ** \    
220
+ ** \⌢
221
+ ** \⋯
222
+ ** \⋮
223
+ ** \⋱
224
+ ** \⋄
225
+ ** \□
226
+ ** \⌊
227
+ ** \⌋
228
+ ** \⌈
229
+ ** \⌉
230
+ ** \ℂ
231
+ ** \ℕ
232
+ ** \ℚ
233
+ ** \ℝ
234
+ ** \ℤ
235
+ ** \↑
236
+ ** \↓
237
+ ** \←
238
+ ** \↔
239
+ ** \⇒
240
+ ** \⇐
241
+ ** \⇔
242
+ ** \→
243
+ ** \↣
244
+ ** \↠
245
+ ** \⤖
246
+ ** \↦
247
+ ** \…
248
+ ** \−
249
+ ** \⁡
250
+ ** \⏞
251
+ ** \⏟
252
+
253
+ === Symbols
254
+ ** |
255
+ ** /
256
+ ** \
257
+ ** ~
258
+ ** (
259
+ ** )
260
+ ** (:
261
+ ** :)
262
+ ** {
263
+ ** }
264
+ ** {:
265
+ ** :}
266
+ ** ]
267
+ ** [
268
+ ** =
269
+ ** +
270
+ ** -
data/README.adoc ADDED
@@ -0,0 +1,94 @@
1
+ = Plurimath
2
+
3
+ This gem implements a mechanism of conversion between Math languages mentioned below.
4
+
5
+ 1. **AsciiMath**
6
+ 2. **MathML**
7
+ 3. **Latex**
8
+
9
+ == Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem "plurimath"
15
+ ```
16
+ And then execute:
17
+ ```shell
18
+
19
+ $ bundle install
20
+ ```
21
+ Or install it yourself as:
22
+ ```shell
23
+ $ gem install plurimath
24
+ ```
25
+
26
+ == Usage
27
+
28
+ Pass the string you want to convert and Math type of the string provided, which will give you **Plurimath::Math::Formula** object as output, Let's see some examples below.
29
+
30
+ === Conversion Examples
31
+
32
+ ==== Asciimath Formula Example
33
+ [source, ruby]
34
+ ----
35
+ asciimath = "sin(1)"
36
+ formula = Plurimath::Math.parse(asciimath, :asciimath)
37
+ ----
38
+ ==== MathML Formula Example
39
+ [source, ruby]
40
+ ----
41
+ mathml = <<~MATHML
42
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
43
+ <mstyle displaystyle='true'>
44
+ <mi>sin</mi>
45
+ <mn>1</mn>
46
+ </mstyle>
47
+ </math>
48
+ MATHML
49
+ formula = Plurimath::Math.parse(mathml, "mathml")
50
+ ----
51
+ ==== Latex Formula Example
52
+ [source, ruby]
53
+ ----
54
+ latex = "\\sin{1}"
55
+ formula = Plurimath::Math.parse(latex, "latex")
56
+ ----
57
+ ---
58
+ Since we have the object of **Plurimath::Formula**,We can generate **AsciiMath**, **MathMl** or **Latex** string from the formula object,All we have to do is call conversion function on formula object, see examples below.
59
+
60
+ ==== AsciiMath Output conversion
61
+ [source, ruby]
62
+ ----
63
+ formula.to_asciimath
64
+ > sin(1)
65
+ ----
66
+ ==== Latex Output conversion
67
+ [source, ruby]
68
+ ----
69
+ formula.to_latex
70
+ > \\sin1
71
+ ----
72
+ ==== MathML Output conversion
73
+ [source, ruby]
74
+ ----
75
+ formula.to_mathml
76
+ > <math xmlns='http://www.w3.org/1998/Math/MathML'>
77
+ > <mstyle displaystyle='true'>
78
+ > <mi>sin</mi>
79
+ > <mn>1</mn>
80
+ > </mstyle>
81
+ > </math>
82
+ ----
83
+ === Supported Content
84
+ --
85
+ include::AsciiMath-Supported-Data.adoc[]
86
+ --
87
+
88
+ --
89
+ include::MathML-Supported-Data.adoc[]
90
+ --
91
+
92
+ --
93
+ include::Latex-Supported-Data.adoc[]
94
+ --
@@ -0,0 +1,301 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Plurimath
4
+ class Asciimath
5
+ class Constants
6
+ TABLE_PARENTHESIS = {
7
+ "[": "]",
8
+ "{": "}",
9
+ "(": ")",
10
+ "|": "|",
11
+ }.freeze
12
+ PARENTHESIS = {
13
+ "(:": ":)",
14
+ "{:": ":}",
15
+ "(": ")",
16
+ "{": "}",
17
+ "[": "]",
18
+ }.freeze
19
+ SYMBOLS = {
20
+ twoheadrightarrowtail: :"&#x2916;",
21
+ twoheadrightarrow: :"&#x21A0;",
22
+ rightarrowtail: :"&#x21A3;",
23
+ Leftrightarrow: :"&#x21D4;",
24
+ leftrightarrow: :"&#x2194;",
25
+ Rightarrow: :"&#x21D2;",
26
+ rightarrow: :"&#x2192;",
27
+ varepsilon: :"&#x25B;",
28
+ Leftarrow: :"&#x21D0;",
29
+ leftarrow: :"&#x2190;",
30
+ downarrow: :"&#x2193;",
31
+ therefore: :"&#x2234;",
32
+ backslash: :"\\",
33
+ setminus: :"\\",
34
+ triangle: :"&#x25B3;",
35
+ bigwedge: :"&#x22C0;",
36
+ rceiling: :"&#x2309;",
37
+ lceiling: :"&#x2308;",
38
+ supseteq: :"&#x2287;",
39
+ subseteq: :"&#x2286;",
40
+ vartheta: :"&#x3D1;",
41
+ emptyset: :"&#x2205;",
42
+ diamond: :"&#x22C4;",
43
+ uparrow: :"&#x2191;",
44
+ implies: :"&#x21D2;",
45
+ partial: :"&#x2202;",
46
+ because: :"&#x2235;",
47
+ upsilon: :"&#x3C5;",
48
+ epsilon: :"&#x3B5;",
49
+ bigcap: :"&#x22C2;",
50
+ bigvee: :"&#x22C1;",
51
+ propto: :"&#x221D;",
52
+ approx: :"&#x2248;",
53
+ exists: :"&#x2203;",
54
+ forall: :"&#x2200;",
55
+ otimes: :"&#x2297;",
56
+ ltimes: :"&#x22C9;",
57
+ bowtie: :"&#x22C8;",
58
+ rtimes: :"&#x22CA;",
59
+ models: :"&#x22A8;",
60
+ mapsto: :"&#x21A6;",
61
+ bigcup: :"&#x22C3;",
62
+ succeq: :"&#x2AB0;",
63
+ preceq: :"&#x2AAF;",
64
+ rfloor: :"&#x230B;",
65
+ lfloor: :"&#x230A;",
66
+ square: :"&#x25A1;",
67
+ supset: :"&#x2283;",
68
+ subset: :"&#x2282;",
69
+ lambda: :"&#x3BB;",
70
+ Lambda: :"&#x39B;",
71
+ varphi: :"&#x3C6;",
72
+ ">->>": :"&#x2916;",
73
+ "/_\\": :"&#x25B3;",
74
+ "|><|": :"&#x22C8;",
75
+ kappa: :"&#x3BA;",
76
+ Delta: :"&#x394;",
77
+ delta: :"&#x3B4;",
78
+ gamma: :"&#x3B3;",
79
+ Gamma: :"&#x393;",
80
+ Theta: :"&#x398;",
81
+ theta: :"&#x3B8;",
82
+ alpha: :"&#x3B1;",
83
+ aleph: :"&#2135;",
84
+ infty: :"&#221E;",
85
+ equiv: :"&#2261;",
86
+ frown: :"&#2322;",
87
+ notin: :"&#2209;",
88
+ angle: :"&#2220;",
89
+ "!in": :"&#x2209;",
90
+ cdots: :"&#x22EF;",
91
+ vdash: :"&#x22A2;",
92
+ wedge: :"&#x2227;",
93
+ oplus: :"&#x2295;",
94
+ nabla: :"&#x2207;",
95
+ ddots: :"&#x22F1;",
96
+ vdots: :"&#x22EE;",
97
+ Sigma: :"&#3A3;",
98
+ Omega: :"&#3A9;",
99
+ omega: :"&#3C9;",
100
+ sigma: :"&#3C3;",
101
+ times: :"&#xD7;",
102
+ ldots: :"...",
103
+ ">-=": :"&#x2AB0;",
104
+ "-<=": :"&#x2AAF;",
105
+ "><|": :"&#x22CA;",
106
+ "|==": :"&#x22A8;",
107
+ "|--": :"&#x22A2;",
108
+ "^^^": :"&#x22C0;",
109
+ "|->": :"&#x21A6;",
110
+ ">->": :"&#x21A3;",
111
+ "->>": :"&#x21A0;",
112
+ "__|": :"&#x230B;",
113
+ "|__": :"&#x230A;",
114
+ "|><": :"&#x22C9;",
115
+ "_|_": :"&#x22A5;",
116
+ "***": :"&#x22C6;",
117
+ "<=>": :"&#x21D4;",
118
+ quad: :"&#xA0;&#xA0;",
119
+ star: :"&#x22C6;",
120
+ odot: :"&#x2299;",
121
+ cdot: :"&#x22C5;",
122
+ rarr: :"&#x2192;",
123
+ darr: :"&#x2193;",
124
+ prop: :"&#x221D;",
125
+ lArr: :"&#x21D0;",
126
+ rArr: :"&#x21D2;",
127
+ uarr: :"&#x2191;",
128
+ hArr: :"&#x21D4;",
129
+ harr: :"&#x2194;",
130
+ larr: :"&#x2190;",
131
+ grad: :"&#x2207;",
132
+ circ: :"&#x2218;",
133
+ sube: :"&#x2286;",
134
+ supe: :"&#x2287;",
135
+ succ: :"&#227B;",
136
+ prec: :"&#227A;",
137
+ cong: :"&#2245;",
138
+ beta: :"&#x3B2;",
139
+ zeta: :"&#x3B6;",
140
+ iota: :"&#x3B9;",
141
+ ":'": :"&#x2235;",
142
+ "^^": :"&#x2227;",
143
+ "o+": :"&#x2295;",
144
+ "o.": :"&#x2299;",
145
+ "**": :"&#x2217;",
146
+ "~~": :"&#x2248;",
147
+ "O/": :"&#x2205;",
148
+ "->": :"&#x2192;",
149
+ "=>": :"&#x21D2;",
150
+ ">>": :"&#x232A;",
151
+ "<<": :"&#x2329;",
152
+ "~|": :"&#x2309;",
153
+ "!=": :"&#x2260;",
154
+ ">-": :"&#x227B;",
155
+ "-<": :"&#x227A;",
156
+ "~=": :"&#x2245;",
157
+ "-=": :"&#x2261;",
158
+ ":.": :"&#x2234;",
159
+ ">=": :"&#x2265;",
160
+ "<=": :"&#x2264;",
161
+ "|~": :"&#x2308;",
162
+ "/_": :"&#x2220;",
163
+ "+-": :"&#xB1;",
164
+ "-:": :"&#xF7;",
165
+ sup: :"&#x2283;",
166
+ sub: :"&#x2282;",
167
+ top: :"&#x22A4;",
168
+ vvv: :"&#x22C1;",
169
+ vee: :"&#x2228;",
170
+ nnn: :"&#x22C2;",
171
+ cap: :"&#x2229;",
172
+ ast: :"&#x2217;",
173
+ bot: :"&#x22A5;",
174
+ del: :"&#x2202;",
175
+ uuu: :"&#x22C3;",
176
+ cup: :"&#x222A;",
177
+ iff: :"&#x21D4;",
178
+ eta: :"&#x3B7;",
179
+ Phi: :"&#x3A6;",
180
+ Psi: :"&#x3A8;",
181
+ psi: :"&#x3C8;",
182
+ chi: :"&#x3C7;",
183
+ phi: :"&#x3D5;",
184
+ rho: :"&#x3C1;",
185
+ tau: :"&#x3C4;",
186
+ div: :"&#xF7;",
187
+ neg: :"&#xAC;",
188
+ not: :"&#xAC;",
189
+ "@": :"&#x2218;",
190
+ "*": :"&#x22C5;",
191
+ "<": :"&lt;",
192
+ ">": :"&gt;",
193
+ "-": :"-",
194
+ "=": :"=",
195
+ "+": :"+",
196
+ "/": :"/",
197
+ nn: :"&#x2229;",
198
+ vv: :"&#x2228;",
199
+ TT: :"&#x22A4;",
200
+ EE: :"&#x2203;",
201
+ ox: :"&#x2297;",
202
+ to: :"&#x2192;",
203
+ AA: :"&#x2200;",
204
+ uu: :"&#x222A;",
205
+ ne: :"&#x2260;",
206
+ ZZ: :"&#x2124;",
207
+ RR: :"&#x211D;",
208
+ QQ: :"&#x211A;",
209
+ NN: :"&#x2115;",
210
+ CC: :"&#x2102;",
211
+ oo: :"&#x221E;",
212
+ ge: :"&#x2265;",
213
+ le: :"&#x2264;",
214
+ in: :"&#x2208;",
215
+ nu: :"&#x3BD;",
216
+ mu: :"&#x3BC;",
217
+ pi: :"&#x3C0;",
218
+ Pi: :"&#x3A0;",
219
+ xi: :"&#x3BE;",
220
+ Xi: :"&#x39E;",
221
+ xx: :"&#xD7;",
222
+ pm: :"&#xB1;",
223
+ gt: :"&gt;",
224
+ lt: :"&lt;",
225
+ }.freeze
226
+ UNARY_CLASSES = %i[
227
+ arccos
228
+ arcsin
229
+ arctan
230
+ ubrace
231
+ obrace
232
+ cancel
233
+ tilde
234
+ floor
235
+ ceil
236
+ ddot
237
+ coth
238
+ csch
239
+ sech
240
+ sinh
241
+ tanh
242
+ cosh
243
+ sqrt
244
+ norm
245
+ text
246
+ sec
247
+ sin
248
+ tan
249
+ cos
250
+ exp
251
+ gcd
252
+ glb
253
+ lcm
254
+ lub
255
+ cot
256
+ csc
257
+ det
258
+ dim
259
+ max
260
+ min
261
+ abs
262
+ bar
263
+ dot
264
+ hat
265
+ vec
266
+ ul
267
+ ln
268
+ f
269
+ g
270
+ ].freeze
271
+ BINARY_CLASSES = %i[
272
+ underset
273
+ stackrel
274
+ overset
275
+ color
276
+ prod
277
+ frac
278
+ root
279
+ oint
280
+ int
281
+ sum
282
+ mod
283
+ log
284
+ ].freeze
285
+ FONT_STYLES = %i[
286
+ mathfrak
287
+ mathcal
288
+ mathbb
289
+ mathsf
290
+ mathtt
291
+ mathbf
292
+ bbb
293
+ bb
294
+ fr
295
+ cc
296
+ sf
297
+ tt
298
+ ].freeze
299
+ end
300
+ end
301
+ end