temml 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/contrib/auto-render/README.md +89 -0
- package/contrib/auto-render/auto-render.js +128 -0
- package/contrib/auto-render/dist/auto-render.js +217 -0
- package/contrib/auto-render/dist/auto-render.min.js +1 -0
- package/contrib/auto-render/splitAtDelimiters.js +84 -0
- package/contrib/auto-render/test/auto-render-spec.js +234 -0
- package/contrib/auto-render/test/auto-render.js +217 -0
- package/contrib/auto-render/test/test_page.html +59 -0
- package/contrib/mhchem/README.md +26 -0
- package/contrib/mhchem/mhchem.js +1705 -0
- package/contrib/mhchem/mhchem.min.js +1 -0
- package/contrib/physics/README.md +20 -0
- package/contrib/physics/physics.js +131 -0
- package/contrib/texvc/README.md +23 -0
- package/contrib/texvc/texvc.js +61 -0
- package/dist/Temml-Asana.css +201 -0
- package/dist/Temml-Latin-Modern.css +216 -0
- package/dist/Temml-Libertinus.css +214 -0
- package/dist/Temml-Local.css +194 -0
- package/dist/Temml-STIX2.css +203 -0
- package/dist/Temml.woff2 +0 -0
- package/dist/temml.cjs +13122 -0
- package/dist/temml.js +11225 -0
- package/dist/temml.min.js +1 -0
- package/dist/temml.mjs +13120 -0
- package/dist/temmlPostProcess.js +70 -0
- package/package.json +34 -0
- package/src/Lexer.js +121 -0
- package/src/MacroExpander.js +437 -0
- package/src/Namespace.js +107 -0
- package/src/ParseError.js +64 -0
- package/src/Parser.js +977 -0
- package/src/Settings.js +49 -0
- package/src/SourceLocation.js +29 -0
- package/src/Style.js +144 -0
- package/src/Token.js +40 -0
- package/src/buildMathML.js +235 -0
- package/src/constants.js +25 -0
- package/src/defineEnvironment.js +25 -0
- package/src/defineFunction.js +69 -0
- package/src/defineMacro.js +11 -0
- package/src/domTree.js +185 -0
- package/src/environments/array.js +791 -0
- package/src/environments/cd.js +252 -0
- package/src/environments.js +8 -0
- package/src/functions/accent.js +127 -0
- package/src/functions/accentunder.js +38 -0
- package/src/functions/arrow.js +204 -0
- package/src/functions/cancelto.js +36 -0
- package/src/functions/char.js +33 -0
- package/src/functions/color.js +253 -0
- package/src/functions/cr.js +46 -0
- package/src/functions/def.js +259 -0
- package/src/functions/delimsizing.js +304 -0
- package/src/functions/enclose.js +193 -0
- package/src/functions/envTag.js +38 -0
- package/src/functions/environment.js +59 -0
- package/src/functions/font.js +123 -0
- package/src/functions/genfrac.js +333 -0
- package/src/functions/hbox.js +29 -0
- package/src/functions/horizBrace.js +32 -0
- package/src/functions/href.js +90 -0
- package/src/functions/html.js +95 -0
- package/src/functions/includegraphics.js +131 -0
- package/src/functions/kern.js +75 -0
- package/src/functions/label.js +29 -0
- package/src/functions/lap.js +75 -0
- package/src/functions/math.js +40 -0
- package/src/functions/mathchoice.js +41 -0
- package/src/functions/mclass.js +201 -0
- package/src/functions/multiscript.js +91 -0
- package/src/functions/not.js +46 -0
- package/src/functions/op.js +338 -0
- package/src/functions/operatorname.js +139 -0
- package/src/functions/ordgroup.js +9 -0
- package/src/functions/phantom.js +73 -0
- package/src/functions/pmb.js +31 -0
- package/src/functions/raise.js +68 -0
- package/src/functions/ref.js +28 -0
- package/src/functions/relax.js +16 -0
- package/src/functions/rule.js +52 -0
- package/src/functions/sizing.js +64 -0
- package/src/functions/smash.js +66 -0
- package/src/functions/sqrt.js +31 -0
- package/src/functions/styling.js +58 -0
- package/src/functions/supsub.js +135 -0
- package/src/functions/symbolsOp.js +53 -0
- package/src/functions/symbolsOrd.js +102 -0
- package/src/functions/symbolsSpacing.js +53 -0
- package/src/functions/tag.js +8 -0
- package/src/functions/text.js +75 -0
- package/src/functions/tip.js +63 -0
- package/src/functions/toggle.js +13 -0
- package/src/functions/verb.js +33 -0
- package/src/functions.js +57 -0
- package/src/linebreaking.js +159 -0
- package/src/macros.js +708 -0
- package/src/mathMLTree.js +175 -0
- package/src/parseNode.js +42 -0
- package/src/parseTree.js +40 -0
- package/src/postProcess.js +57 -0
- package/src/replace.js +225 -0
- package/src/stretchy.js +66 -0
- package/src/svg.js +110 -0
- package/src/symbols.js +972 -0
- package/src/tree.js +50 -0
- package/src/unicodeAccents.js +16 -0
- package/src/unicodeScripts.js +119 -0
- package/src/unicodeSupOrSub.js +108 -0
- package/src/unicodeSymbolBuilder.js +31 -0
- package/src/unicodeSymbols.js +320 -0
- package/src/units.js +109 -0
- package/src/utils.js +109 -0
- package/src/variant.js +103 -0
- package/temml.js +181 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
/*
|
2
|
+
XITS is released under the SIL Open Font License.
|
3
|
+
See https://github.com/stipub/stixfonts/blob/master/OFL.txt details.
|
4
|
+
|
5
|
+
The STIX2 WOFF font has been obtained from
|
6
|
+
https://github.com/stipub/stixfonts
|
7
|
+
*/
|
8
|
+
|
9
|
+
@font-face {
|
10
|
+
font-family: STIX2;
|
11
|
+
src: local('STIXTwoMath-Regular'),
|
12
|
+
url('./STIXTwoMath-Regular.woff2');
|
13
|
+
}
|
14
|
+
|
15
|
+
math {
|
16
|
+
font-style: normal;
|
17
|
+
font-weight: normal;
|
18
|
+
line-height: normal;
|
19
|
+
font-size-adjust: none;
|
20
|
+
text-indent: 0;
|
21
|
+
text-transform: none;
|
22
|
+
letter-spacing: normal;
|
23
|
+
word-wrap: normal;
|
24
|
+
direction: ltr;
|
25
|
+
}
|
26
|
+
|
27
|
+
math * {
|
28
|
+
border-color: currentColor;
|
29
|
+
}
|
30
|
+
|
31
|
+
mtext {
|
32
|
+
font-family: STIX2;
|
33
|
+
}
|
34
|
+
|
35
|
+
math {
|
36
|
+
font-family: STIX2, math;
|
37
|
+
}
|
38
|
+
|
39
|
+
*.mathscr {
|
40
|
+
font-feature-settings: 'ss01';
|
41
|
+
}
|
42
|
+
|
43
|
+
.oldstylenums {
|
44
|
+
font-family: "Cambria Math", math;
|
45
|
+
font-feature-settings: 'onum';
|
46
|
+
}
|
47
|
+
|
48
|
+
mo.tml-prime {
|
49
|
+
font-feature-settings: 'ss04';
|
50
|
+
}
|
51
|
+
|
52
|
+
/* AMS environment auto-numbering via CSS counter. */
|
53
|
+
.tml-eqn::before {
|
54
|
+
counter-increment: tmlEqnNo;
|
55
|
+
content: "(" counter(tmlEqnNo) ")";
|
56
|
+
}
|
57
|
+
|
58
|
+
body {
|
59
|
+
counter-reset: tmlEqnNo;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* Environment arrays */
|
63
|
+
|
64
|
+
/* Environments that addjot to row spacing */
|
65
|
+
mtable.tml-jot > mtr > mtd {
|
66
|
+
padding-top: calc(0.5ex + 0.09em);
|
67
|
+
padding-bottom: calc(0.5ex + 0.09em);
|
68
|
+
}
|
69
|
+
|
70
|
+
/* Zero column gap for {alignat}, {split}, etc */
|
71
|
+
mtable.tml-abut > mtr > mtd,
|
72
|
+
mtable.tml-align > mtr > mtd:nth-child(odd),
|
73
|
+
mtable.tml-align-star > mtr > mtd:nth-child(even) {
|
74
|
+
padding-left: 0em;
|
75
|
+
padding-right: 0em;
|
76
|
+
}
|
77
|
+
|
78
|
+
mtable.tml-align > mtr > mtd:nth-child(even),
|
79
|
+
mtable.tml-align-star > mtr > mtd:nth-child(odd) {
|
80
|
+
padding-left: 1em;
|
81
|
+
padding-right: 0em;
|
82
|
+
}
|
83
|
+
|
84
|
+
mtable.tml-align > mtr > mtd:nth-child(1) {
|
85
|
+
padding-left: 0em;
|
86
|
+
}
|
87
|
+
|
88
|
+
mtable.tml-align > mtr > mtd:nth-child(odd),
|
89
|
+
mtable.tml-alignat > mtr > mtd:nth-child(odd),
|
90
|
+
mtable.tml-aligned > mtr > mtd:nth-child(even) {
|
91
|
+
text-align: -webkit-left;
|
92
|
+
}
|
93
|
+
|
94
|
+
mtable.tml-align > mtr > mtd:nth-child(even),
|
95
|
+
mtable.tml-alignat > mtr > mtd:nth-child(even),
|
96
|
+
mtable.tml-aligned > mtr > mtd:nth-child(odd) {
|
97
|
+
text-align: -webkit-right;
|
98
|
+
}
|
99
|
+
|
100
|
+
mtable.tml-cases > mtr > mtd {
|
101
|
+
padding-left: 0em;
|
102
|
+
padding-right: 0em;
|
103
|
+
text-align: -webkit-left;
|
104
|
+
}
|
105
|
+
|
106
|
+
mtable.tml-cases > mtr > mtd:nth-child(2) {
|
107
|
+
padding-left: 1em;
|
108
|
+
}
|
109
|
+
|
110
|
+
mtable.tml-small > mtr > mtd {
|
111
|
+
padding-top: 0.35ex;
|
112
|
+
padding-bottom: 0.35ex;
|
113
|
+
padding-left: 0.1389em;
|
114
|
+
padding-right: 0.1389em;
|
115
|
+
}
|
116
|
+
|
117
|
+
mtable.tml-subarray > mtr > mtd {
|
118
|
+
padding-top: 0em;
|
119
|
+
padding-left: 0em;
|
120
|
+
}
|
121
|
+
|
122
|
+
mtable.tml-cd > mtr > mtd {
|
123
|
+
padding-left: 0.25em;
|
124
|
+
padding-right: 0.25em;
|
125
|
+
}
|
126
|
+
|
127
|
+
mtable > mtr:first-child > mtr > mtd {
|
128
|
+
padding-top: 0em;
|
129
|
+
}
|
130
|
+
|
131
|
+
mtable > mtr:last-child > mtr > mtd {
|
132
|
+
padding-bottom: 0em;
|
133
|
+
}
|
134
|
+
|
135
|
+
mtable:not(.tml-array) > mtr > mtd:first-child {
|
136
|
+
padding-left: 0em;
|
137
|
+
}
|
138
|
+
|
139
|
+
mtable:not(.tml-array) > mtr > mtd:last-child {
|
140
|
+
padding-right: 0em;
|
141
|
+
}
|
142
|
+
|
143
|
+
mtr.tml-top-solid > mtd {
|
144
|
+
border-top: 0.06em solid;
|
145
|
+
}
|
146
|
+
|
147
|
+
mtr.tml-top-double > mtd {
|
148
|
+
border-top: 0.15em double;
|
149
|
+
}
|
150
|
+
|
151
|
+
mtr.tml-top-dashed > mtd {
|
152
|
+
border-top: 0.06em dashed;
|
153
|
+
}
|
154
|
+
|
155
|
+
mtr.tml-hline-solid > mtd {
|
156
|
+
border-bottom: 0.06em solid;
|
157
|
+
}
|
158
|
+
|
159
|
+
mtr.tml-hline-double > mtd {
|
160
|
+
border-bottom: 0.15em double;
|
161
|
+
}
|
162
|
+
|
163
|
+
mtr.tml-hline-dashed > mtd {
|
164
|
+
border-bottom: 0.06em dashed;
|
165
|
+
}
|
166
|
+
|
167
|
+
/* MathML-Core does not support <menclose> attributes.
|
168
|
+
* So Use background images for \cancel */
|
169
|
+
menclose.cancel {
|
170
|
+
background:
|
171
|
+
linear-gradient(to top left,
|
172
|
+
rgba(0,0,0,0) 0%,
|
173
|
+
rgba(0,0,0,0) calc(50% - 0.06em),
|
174
|
+
rgba(0,0,0,1) 50%,
|
175
|
+
rgba(0,0,0,0) calc(50% + 0.06em),
|
176
|
+
rgba(0,0,0,0) 100%);
|
177
|
+
}
|
178
|
+
|
179
|
+
menclose.bcancel {
|
180
|
+
background:
|
181
|
+
linear-gradient(to top right,
|
182
|
+
rgba(0,0,0,0) 0%,
|
183
|
+
rgba(0,0,0,0) calc(50% - 0.06em),
|
184
|
+
rgba(0,0,0,1) 50%,
|
185
|
+
rgba(0,0,0,0) calc(50% + 0.06em),
|
186
|
+
rgba(0,0,0,0) 100%);
|
187
|
+
}
|
188
|
+
|
189
|
+
menclose.xcancel {
|
190
|
+
background:
|
191
|
+
linear-gradient(to top left,
|
192
|
+
rgba(0,0,0,0) 0%,
|
193
|
+
rgba(0,0,0,0) calc(50% - 0.06em),
|
194
|
+
rgba(0,0,0,1) 50%,
|
195
|
+
rgba(0,0,0,0) calc(50% + 0.06em),
|
196
|
+
rgba(0,0,0,0) 100%),
|
197
|
+
linear-gradient(to top right,
|
198
|
+
rgba(0,0,0,0) 0%,
|
199
|
+
rgba(0,0,0,0) calc(50% - 0.06em),
|
200
|
+
rgba(0,0,0,1) 50%,
|
201
|
+
rgba(0,0,0,0) calc(50% + 0.06em),
|
202
|
+
rgba(0,0,0,0) 100%);
|
203
|
+
}
|
package/dist/Temml.woff2
ADDED
Binary file
|