paseo-ratex-markdown 0.1.0 → 0.1.1
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/OVERVIEW.md +2 -2
- package/README.md +8 -5
- package/npm-shrinkwrap.json +4192 -0
- package/package.json +2 -1
- package/scripts/embed-assets.mjs +56 -9
- package/scripts/prepare-plugin.mjs +6 -6
- package/server/glyphs.ts +16 -43
- package/server/vendor/katex-glyphs.ts +45 -0
- package/server/vendor/katex-fonts.ts +0 -45
package/OVERVIEW.md
CHANGED
|
@@ -6,11 +6,11 @@ On Paseo 0.13 and later, opening a `.md` or `.markdown` file offers **Markdown (
|
|
|
6
6
|
|
|
7
7
|
## How it works
|
|
8
8
|
|
|
9
|
-
The daemon lays out each formula with the bundled `ratex-wasm` module and
|
|
9
|
+
The daemon lays out each formula with the bundled `ratex-wasm` module and uses embedded KaTeX glyph outlines, so nothing is downloaded at runtime. The app draws each formula as a vector image that follows the Paseo theme. Selecting text across a formula copies its TeX source. A formula RaTeX cannot parse is shown as source with the error.
|
|
10
10
|
|
|
11
11
|
## Setup and requirements
|
|
12
12
|
|
|
13
|
-
Paseo 0.11.0 or later. Installing from npm or Git needs Node.js and npm on the daemon host
|
|
13
|
+
Paseo 0.11.0 or later. Installing from npm or Git needs Node.js and npm on the daemon host. The npm package includes its embedded math engine and glyph outlines; a Git installation prepares them from locked dependencies.
|
|
14
14
|
|
|
15
15
|
Desktop and web clients render formulas. iOS and Android clients render them where Paseo draws inline SVG icons (0.13 and later) and show the TeX source otherwise.
|
|
16
16
|
|
package/README.md
CHANGED
|
@@ -93,15 +93,17 @@ Markdown text ──► markdown-it + math rules (client) ──► document tre
|
|
|
93
93
|
│ formulas, batched
|
|
94
94
|
▼
|
|
95
95
|
daemon: RaTeX WASM lays out each formula (DisplayList)
|
|
96
|
-
|
|
96
|
+
precomputed KaTeX glyph outlines
|
|
97
97
|
│ scene: glyphs, rules, paths
|
|
98
98
|
▼
|
|
99
99
|
web/desktop: one SVG <img> per formula iOS/Android: one inline SVG icon per glyph
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
The daemon half embeds the `ratex-wasm` binary and
|
|
103
|
-
runtime.
|
|
104
|
-
|
|
102
|
+
The daemon half embeds the `ratex-wasm` binary and KaTeX glyph outlines, so nothing is fetched at
|
|
103
|
+
runtime. During preparation, opentype.js extracts the outlines from the pinned fonts; the
|
|
104
|
+
runtime reads those paths directly without a font parser. Its SVG output matches RaTeX's own
|
|
105
|
+
`ratex-svg` renderer pixel for pixel on the test formulas. Layouts are cached on both sides,
|
|
106
|
+
so a theme change repaints without new requests,
|
|
105
107
|
and an edit only lays out the formulas that changed.
|
|
106
108
|
|
|
107
109
|
## Privacy and data access
|
|
@@ -148,7 +150,8 @@ Set `CHROME_CDP_URL` instead of `CHROME_BIN` to use a running Chrome, `RATEX_SCR
|
|
|
148
150
|
to save screenshots, and `RATEX_CLIENT_BUNDLE=file` to test a bundle taken from a daemon's
|
|
149
151
|
plugin catalog.
|
|
150
152
|
|
|
151
|
-
`npm run check:package` checks the files `npm pack` would publish
|
|
153
|
+
`npm run check:package` checks the files `npm pack` would publish, including the size of
|
|
154
|
+
reachable runtime dependencies and declarations against the registry's 2 MB budget.
|
|
152
155
|
|
|
153
156
|
## Credits
|
|
154
157
|
|