Commit b1964e2
Add Typst export with color variable definitions
Implements Typst export functionality using the tex2typst library for
LaTeX-to-Typst conversion. Defines colors as variables at the top of
the document and references them throughout, following best practices:
// Color definitions
#let termexponential = rgb("#e6194B")
#let termimaginary = rgb("#3cb44b")
...
// Referenced in equation and text
$ #text(fill: termexponential)[$e$]^... $
The tex2typst library (v0.4.1) was chosen after testing because it
natively handles \textcolor commands and converts them to proper
Typst syntax. The implementation:
1. Preprocesses \htmlClass{term-X}{content} to \textcolor{#hex}{content}
2. Converts LaTeX to Typst using tex2typst
3. Post-processes to replace inline rgb() calls with variable references
Adds Typst export button to the UI export menu.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 87ff3a4 commit b1964e2
4 files changed
+657
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
0 commit comments