@uniweb/press 0.4.11 → 0.4.12
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.
- package/package.json +1 -1
- package/src/adapters/math-css.js +19 -0
package/package.json
CHANGED
package/src/adapters/math-css.js
CHANGED
|
@@ -54,4 +54,23 @@ math mtable.tml-jot mtd { padding-top: 0.7ex; padding-bottom: 0.7ex; }
|
|
|
54
54
|
}
|
|
55
55
|
body {
|
|
56
56
|
counter-reset: tmlEqnNo;
|
|
57
|
+
}
|
|
58
|
+
/* Display math needs CSS block layout, not MathML layout, for an equation TAG
|
|
59
|
+
to reach the right margin: the tag rides in an mtable whose width:100%
|
|
60
|
+
Chromium ignores under display: block math, collapsing the spacer cells so
|
|
61
|
+
"(1)" sits glued to the equation instead of at the margin.
|
|
62
|
+
|
|
63
|
+
!important is not decoration. Temml emits style=display:block math on
|
|
64
|
+
every display formula unconditionally — no option turns it off — so an inline
|
|
65
|
+
style beats any rule we write, including Temml's own math.tml-display { display: block }, which is exactly what this restores. Fixing it here
|
|
66
|
+
rather than in the generator also repairs math that was already built.
|
|
67
|
+
|
|
68
|
+
Scoped with :has() to formulas that actually carry a tag. Switching every
|
|
69
|
+
display formula to CSS block layout would left-align the lot -- MathML layout
|
|
70
|
+
is what centres them -- so an unnumbered derivation or matrix keeps
|
|
71
|
+
display: block math and stays centred. Where :has() is unsupported the tag
|
|
72
|
+
simply does not reach the margin; nothing else changes. */
|
|
73
|
+
math.tml-display:has(.tml-eqn) {
|
|
74
|
+
display: block !important;
|
|
75
|
+
width: 100%;
|
|
57
76
|
}`
|