temml 0.31.0
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.
- checksums.yaml +7 -0
- data/COPYING.txt +121 -0
- data/README.md +123 -0
- data/lib/temml/engine.rb +24 -0
- data/lib/temml/version.rb +8 -0
- data/lib/temml.rb +90 -0
- data/license/KaTeX/LICENSE +21 -0
- data/license/Temml/LICENSE +21 -0
- data/license/katex-ruby/LICENSE.txt +21 -0
- data/vendor/temml/fonts/Temml.woff2 +0 -0
- data/vendor/temml/javascripts/temml.js +1 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Asana.css.erb +361 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Latin-Modern.css.erb +379 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Libertinus.css.erb +376 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Local.css.erb +372 -0
- data/vendor/temml/sprockets/stylesheets/Temml-NotoSans.css.erb +376 -0
- data/vendor/temml/sprockets/stylesheets/Temml-STIX2.css.erb +367 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Asana.scss +361 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Latin-Modern.scss +379 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Libertinus.scss +376 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Local.scss +372 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-NotoSans.scss +376 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-STIX2.scss +367 -0
- data/vendor/temml/stylesheets/Temml-Asana.css +361 -0
- data/vendor/temml/stylesheets/Temml-Latin-Modern.css +379 -0
- data/vendor/temml/stylesheets/Temml-Libertinus.css +376 -0
- data/vendor/temml/stylesheets/Temml-Local.css +372 -0
- data/vendor/temml/stylesheets/Temml-NotoSans.css +376 -0
- data/vendor/temml/stylesheets/Temml-STIX2.css +367 -0
- metadata +84 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The Latin Modern fonts are released under the Open Font License, version 1.1.
|
|
3
|
+
See https://github.com/alerque/libertinus/blob/master/OFL.txt.
|
|
4
|
+
|
|
5
|
+
The Libertinus WOFF font has been obtained from
|
|
6
|
+
https://github.com/alerque/libertinus
|
|
7
|
+
|
|
8
|
+
The Temml.woff2 is a clone of KaTeX_Script-Regular, except that the code points
|
|
9
|
+
have been changed from ASCII to Unicode Mathematical Alphanumeric Symbols Script capitals,
|
|
10
|
+
Unicode range 1D49C to 1D4B5.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Temml';
|
|
15
|
+
src: url(<%= asset_path('Temml.woff2') %>) format('woff2');
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: Libertinus Math;
|
|
22
|
+
src: url(<%= asset_path('LibertinusMath-Regular.woff2') %>);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
math {
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: normal;
|
|
28
|
+
line-height: normal;
|
|
29
|
+
font-size-adjust: none;
|
|
30
|
+
text-indent: 0;
|
|
31
|
+
text-transform: none;
|
|
32
|
+
letter-spacing: normal;
|
|
33
|
+
word-wrap: normal;
|
|
34
|
+
direction: ltr;
|
|
35
|
+
/* Prevent Firefox from omitting the dot on i or j. */
|
|
36
|
+
font-feature-settings: "dtls" off;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
math * {
|
|
40
|
+
border-color: currentColor;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
math {
|
|
44
|
+
font-family: Libertinus Math, math;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* display: block is necessary in Firefox and Safari.
|
|
48
|
+
* Not in Chromium, which recognizes display: "block math" written inline. */
|
|
49
|
+
math.tml-display {
|
|
50
|
+
display: block;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
*.mathcal {
|
|
55
|
+
font-family: "Cambria Math", 'STIXTwoMath-Regular', "Times New Roman", math;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
mo.tml-prime {
|
|
59
|
+
font-feature-settings: 'ssty';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Cramped superscripts in WebKit */
|
|
63
|
+
mfrac > :nth-child(2),
|
|
64
|
+
msqrt,
|
|
65
|
+
mover > :first-child {
|
|
66
|
+
math-shift: compact
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.menclose {
|
|
70
|
+
display: inline-block;
|
|
71
|
+
position: relative;
|
|
72
|
+
padding: 0.5ex 0ex;
|
|
73
|
+
}
|
|
74
|
+
.tml-cancelto {
|
|
75
|
+
display: inline-block;
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 0;
|
|
78
|
+
left: 0;
|
|
79
|
+
padding: 0.5ex 0ex;
|
|
80
|
+
background-color: currentColor;
|
|
81
|
+
/* Use the SVG as an alpha mask (painted by background-color) */
|
|
82
|
+
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><defs><marker id='a' markerHeight='5' markerUnits='strokeWidth' markerWidth='7' orient='auto' refX='7' refY='2.5'><path fill='black' d='m0 0 7 2.5L0 5z'/></marker></defs><line x2='100%25' y1='100%25' stroke='black' stroke-width='.06em' marker-end='url(<%= asset_path('%23a') %>)' vector-effect='non-scaling-stroke'/></svg>");
|
|
83
|
+
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><defs><marker id='a' markerHeight='5' markerUnits='strokeWidth' markerWidth='7' orient='auto' refX='7' refY='2.5'><path fill='black' d='m0 0 7 2.5L0 5z'/></marker></defs><line x2='100%25' y1='100%25' stroke='black' stroke-width='.06em' marker-end='url(<%= asset_path('%23a') %>)' vector-effect='non-scaling-stroke'/></svg>");
|
|
84
|
+
-webkit-mask-repeat: no-repeat;
|
|
85
|
+
mask-repeat: no-repeat;
|
|
86
|
+
-webkit-mask-size: 100% 100%;
|
|
87
|
+
mask-size: 100% 100%;
|
|
88
|
+
-webkit-mask-position: 0 0;
|
|
89
|
+
mask-position: 0 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@supports (-moz-appearance: none) {
|
|
93
|
+
/* \vec w/o italic correction for Firefox */
|
|
94
|
+
.tml-vec {
|
|
95
|
+
transform: scale(0.75)
|
|
96
|
+
}
|
|
97
|
+
/* Fix \cancelto in Firefox */
|
|
98
|
+
.ff-narrow {
|
|
99
|
+
width: 0em;
|
|
100
|
+
}
|
|
101
|
+
.ff-nudge-left {
|
|
102
|
+
margin-left: -0.2em;
|
|
103
|
+
}
|
|
104
|
+
/* Squash hidden mrows in \bordermatrix. Messes with centering, but necessary to squash. */
|
|
105
|
+
.ff-squash mtd {
|
|
106
|
+
display: block;
|
|
107
|
+
height: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@supports (not (-moz-appearance: none)) {
|
|
112
|
+
/* Chromium and WebKit */
|
|
113
|
+
/* prime vertical alignment */
|
|
114
|
+
mo.tml-prime {
|
|
115
|
+
font-family: Temml;
|
|
116
|
+
}
|
|
117
|
+
/* Italic correction on superscripts */
|
|
118
|
+
.tml-sml-pad {
|
|
119
|
+
padding-left: 0.05em;
|
|
120
|
+
}
|
|
121
|
+
.tml-med-pad {
|
|
122
|
+
padding-left: 0.10em;
|
|
123
|
+
}
|
|
124
|
+
.tml-lrg-pad {
|
|
125
|
+
padding-left: 0.15em;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@supports (-webkit-backdrop-filter: blur(1px)) {
|
|
130
|
+
/* WebKit vertical & italic correction on accents */
|
|
131
|
+
.wbk-acc {
|
|
132
|
+
/* lower by x-height distance */
|
|
133
|
+
transform: translate(0em, 0.431em);
|
|
134
|
+
}
|
|
135
|
+
.wbk-sml {
|
|
136
|
+
transform: translate(0.07em, 0);
|
|
137
|
+
}
|
|
138
|
+
.wbk-sml-acc {
|
|
139
|
+
transform: translate(0.07em, 0.431em);
|
|
140
|
+
}
|
|
141
|
+
.wbk-sml-vec {
|
|
142
|
+
transform: scale(0.75) translate(0.07em, 0);
|
|
143
|
+
}
|
|
144
|
+
.wbk-med {
|
|
145
|
+
transform: translate(0.14em, 0);
|
|
146
|
+
}
|
|
147
|
+
.wbk-med-acc {
|
|
148
|
+
transform: translate(0.14em, 0.431em);
|
|
149
|
+
}
|
|
150
|
+
.wbk-med-vec {
|
|
151
|
+
transform: scale(0.75) translate(0.14em, 0);
|
|
152
|
+
}
|
|
153
|
+
.wbk-lrg {
|
|
154
|
+
transform: translate(0.21em, 0);
|
|
155
|
+
}
|
|
156
|
+
.wbk-lrg-acc {
|
|
157
|
+
transform: translate(0.21em, 0.431em);
|
|
158
|
+
}
|
|
159
|
+
.wbk-lrg-vec {
|
|
160
|
+
transform: scale(0.75) translate(0.21em, 0);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* \cancel & \phase use background images. Get them to print. */
|
|
165
|
+
menclose {
|
|
166
|
+
-webkit-print-color-adjust: exact; /* Chrome & Edge */
|
|
167
|
+
print-color-adjust: exact;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Array cell justification in Firefox & WebKit */
|
|
171
|
+
.tml-right {
|
|
172
|
+
text-align: right;
|
|
173
|
+
}
|
|
174
|
+
.tml-left {
|
|
175
|
+
text-align: left;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* For CD labels that grow to the left in Firefox and WebKit */
|
|
179
|
+
.tml-shift-left { margin-left:-200% }
|
|
180
|
+
|
|
181
|
+
/* Styles for Chromium only */
|
|
182
|
+
@supports (not (-webkit-backdrop-filter: blur(1px))) and (not (-moz-appearance: none)) {
|
|
183
|
+
/* Italic correction on accents */
|
|
184
|
+
.chr-sml {
|
|
185
|
+
transform: translate(0.07em, 0)
|
|
186
|
+
}
|
|
187
|
+
.chr-sml-vec {
|
|
188
|
+
transform: scale(0.75) translate(0.07em, 0)
|
|
189
|
+
}
|
|
190
|
+
.chr-med {
|
|
191
|
+
transform: translate(0.14em, 0)
|
|
192
|
+
}
|
|
193
|
+
.chr-med-vec {
|
|
194
|
+
transform: scale(0.75) translate(0.14em, 0)
|
|
195
|
+
}
|
|
196
|
+
.chr-lrg {
|
|
197
|
+
transform: translate(0.21em, 0)
|
|
198
|
+
}
|
|
199
|
+
.chr-lrg-vec {
|
|
200
|
+
transform: scale(0.75) translate(0.21em, 0)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* For CD labels that grow to the left */
|
|
204
|
+
.tml-shift-left { margin-left:-100% }
|
|
205
|
+
|
|
206
|
+
/* MathML Core & Chromium do not support the MathML 3.0 element <menclose> attributes. */
|
|
207
|
+
/* So use styles. */
|
|
208
|
+
menclose {
|
|
209
|
+
position: relative;
|
|
210
|
+
padding: 0.5ex 0ex;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tml-overline {
|
|
214
|
+
padding: 0.1em 0 0 0;
|
|
215
|
+
border-top: 0.065em solid;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.tml-underline {
|
|
219
|
+
padding: 0 0 0.1em 0;
|
|
220
|
+
border-bottom: 0.065em solid;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.tml-cancel {
|
|
224
|
+
display: inline-block;
|
|
225
|
+
position: absolute;
|
|
226
|
+
left: 0.5px;
|
|
227
|
+
bottom: 0;
|
|
228
|
+
width: 100%;
|
|
229
|
+
height: 100%;
|
|
230
|
+
background-color: currentColor;
|
|
231
|
+
}
|
|
232
|
+
.upstrike {
|
|
233
|
+
clip-path: polygon(0.05em 100%, 0em calc(100% - 0.05em), calc(100% - 0.05em) 0em, 100% 0.05em);
|
|
234
|
+
}
|
|
235
|
+
.downstrike {
|
|
236
|
+
clip-path: polygon(0em 0.05em, 0.05em 0em, 100% calc(100% - 0.05em), calc(100% - 0.05em) 100%);
|
|
237
|
+
}
|
|
238
|
+
.sout {
|
|
239
|
+
clip-path: polygon(0em calc(55% + 0.0333em), 0em calc(55% - 0.0333em), 100% calc(55% - 0.0333em), 100% calc(55% + 0.0333em));
|
|
240
|
+
}
|
|
241
|
+
.tml-xcancel {
|
|
242
|
+
clip-path: polygon(0.05em 0em, 0em 0.05em, calc(50% - 0.05em) 50%, 0em calc(100% - 0.05em), 0.05em 100%, 50% calc(50% + 0.05em), calc(100% - 0.05em) 100%, 100% calc(100% - 0.05em), calc(50% + 0.05em) 50%, 100% 0.05em, calc(100% - 0.05em) 0%, 50% calc(50% - 0.05em));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.longdiv-top {
|
|
246
|
+
border-top: 0.067em solid;
|
|
247
|
+
padding: 0.1em 0.2em 0.2em 0.433em;
|
|
248
|
+
}
|
|
249
|
+
.longdiv-arc {
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: 0;
|
|
252
|
+
bottom: 0.1em;
|
|
253
|
+
left: -0.4em;
|
|
254
|
+
width: 0.7em;
|
|
255
|
+
border: 0.067em solid;
|
|
256
|
+
transform: translateY(-0.067em);
|
|
257
|
+
border-radius: 70%;
|
|
258
|
+
clip-path: inset(0 0 0 0.4em);
|
|
259
|
+
box-sizing: border-box;}
|
|
260
|
+
.menclose {display: inline-block;
|
|
261
|
+
text-align: left;
|
|
262
|
+
position: relative;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.phasor-bottom {
|
|
266
|
+
border-bottom: 0.067em solid;
|
|
267
|
+
padding: 0.2em 0.2em 0.1em 0.6em;
|
|
268
|
+
}
|
|
269
|
+
.phasor-angle {
|
|
270
|
+
display: inline-block;
|
|
271
|
+
position: absolute;
|
|
272
|
+
left: 0.5px;
|
|
273
|
+
bottom: -0.04em;
|
|
274
|
+
height: 100%;
|
|
275
|
+
aspect-ratio: 0.5;
|
|
276
|
+
background-color: currentColor;
|
|
277
|
+
clip-path: polygon(0.05em 100%, 0em calc(100% - 0.05em), calc(100% - 0.05em) 0em, 100% 0.05em);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.tml-fbox {
|
|
281
|
+
padding: 3pt;
|
|
282
|
+
border: 1px solid;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.circle-pad {
|
|
286
|
+
padding: 0.267em;
|
|
287
|
+
}
|
|
288
|
+
.textcircle {
|
|
289
|
+
position: absolute;
|
|
290
|
+
top: 0;
|
|
291
|
+
bottom: 0;
|
|
292
|
+
right: 0;
|
|
293
|
+
left: 0;
|
|
294
|
+
border: 0.067em solid;
|
|
295
|
+
border-radius: 50%;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.actuarial {
|
|
299
|
+
padding: 0.03889em 0.03889em 0 0.03889em;
|
|
300
|
+
border-width: 0.08em 0.08em 0em 0em;
|
|
301
|
+
border-style: solid;
|
|
302
|
+
margin-right: 0.03889em;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* Stretch \widetilde */
|
|
306
|
+
.tml-tilde-2 {
|
|
307
|
+
transform: scale(2.0, 1.1)
|
|
308
|
+
}
|
|
309
|
+
.tml-tilde-3 {
|
|
310
|
+
transform: scale(3.0, 1.3)
|
|
311
|
+
}
|
|
312
|
+
.tml-tilde-4 {
|
|
313
|
+
transform: scale(4.0, 1.4)
|
|
314
|
+
}
|
|
315
|
+
/* Stretch \widehat */
|
|
316
|
+
.tml-hat-1 {
|
|
317
|
+
transform: scale(2.0, 1.0)
|
|
318
|
+
}
|
|
319
|
+
.tml-hat-2 {
|
|
320
|
+
transform: scale(4.2, 1.0)
|
|
321
|
+
}
|
|
322
|
+
.tml-hat-3 {
|
|
323
|
+
transform: scale(6.2, 1.1)
|
|
324
|
+
}
|
|
325
|
+
.tml-hat-4 {
|
|
326
|
+
transform: scale(8.8, 1.1)
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* set array cell justification */
|
|
330
|
+
.tml-right {
|
|
331
|
+
text-align: -webkit-right;
|
|
332
|
+
}
|
|
333
|
+
.tml-left {
|
|
334
|
+
text-align: -webkit-left;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/* flex-wrap for line-breaking in Chromium */
|
|
338
|
+
math {
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
flex-wrap: wrap;
|
|
341
|
+
align-items: baseline;
|
|
342
|
+
}
|
|
343
|
+
math > mrow {
|
|
344
|
+
padding: 0.5ex 0ex;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Default mtd top padding is 0.5ex per MathML-Core and user-agent CSS */
|
|
348
|
+
/* We adjust for jot and small */
|
|
349
|
+
mtable.tml-jot > mtr > mtd {
|
|
350
|
+
padding-top: 0.7ex;
|
|
351
|
+
padding-bottom: 0.7ex;
|
|
352
|
+
}
|
|
353
|
+
mtable.tml-small mtd {
|
|
354
|
+
padding-top: 0.35ex;
|
|
355
|
+
padding-bottom: 0.35ex;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Firefox */
|
|
359
|
+
@-moz-document url-prefix() {
|
|
360
|
+
/* Avoid flex-wrap */
|
|
361
|
+
math { display: inline; }
|
|
362
|
+
math > mrow { padding: 0 }
|
|
363
|
+
/* Adjust Firefox spacing between array rows */
|
|
364
|
+
mtd, mtable.tml-small mtd { padding-top: 0; padding-bottom: 0; }
|
|
365
|
+
mtable.tml-jot > mtr > mtd { padding-top: 0.2ex; padding-bottom: 0.2ex; }
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* AMS environment auto-numbering via CSS counter. */
|
|
369
|
+
.tml-eqn::before {
|
|
370
|
+
counter-increment: tmlEqnNo;
|
|
371
|
+
content: "(" counter(tmlEqnNo) ")";
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
body {
|
|
375
|
+
counter-reset: tmlEqnNo;
|
|
376
|
+
}
|