@uniweb/press 0.4.10 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/press",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "Press your React components into downloadable files — Word, Excel, PDF. Registration-based pattern with lazy-loaded format adapters.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -42,4 +42,35 @@ export const MATH_CSS = `/* Temml's own class hooks — without these an aligned
42
42
  /* Row spacing. The browser gives mtd no vertical padding, so state the
43
43
  MathML-Core default here; Temml's own CSS only adjusts it for jot. */
44
44
  math mtd { padding-top: 0.5ex; padding-bottom: 0.5ex; }
45
- math mtable.tml-jot mtd { padding-top: 0.7ex; padding-bottom: 0.7ex; }`
45
+ math mtable.tml-jot mtd { padding-top: 0.7ex; padding-bottom: 0.7ex; }
46
+ /* AMS auto-numbering. Which equations number is the AUTHOR's choice, made in
47
+ LaTeX: align and equation number, aligned and the starred forms do not.
48
+ Without these two rules that choice was discarded -- align and align-star
49
+ rendered identically, so an author who asked for numbers silently got none.
50
+ (No backticks in here: this string is a JS template literal.) */
51
+ .tml-eqn::before {
52
+ counter-increment: tmlEqnNo;
53
+ content: "(" counter(tmlEqnNo) ")";
54
+ }
55
+ body {
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%;
76
+ }`