Commit fdc8bf9
Fix pstricks raw TeX interpretation for --includestyles mode (#2777)
* fix pstricks raw TeX interpretation for --includestyles mode
Enable raw pstricks loading alongside the ltxml binding so that
internal registers, utility macros, conditionals, and key-value
handlers from pstricks.tex/sty are available for downstream raw
packages (pst-3d.tex, pst-plot.tex, pstricks-add.tex, etc.).
Four fixes work together:
1. pstricks.tex.ltxml: load raw pstricks.tex via noltxml => 1
instead of redirecting to the sty binding, so TeX-level
internals (\pst@dima, \pstheader, \pst@number, etc.) are defined.
2. pstricks.sty.ltxml: load raw pstricks.sty before the ltxml
overrides; add optional [] family argument to \psset (matching
xkeyval's \setkeys+ interface); fix color key regex to avoid
treating boolean values as colors and guard against undefined
color lookups.
3. KeyVals.pm: filter empty strings from keyset lists produced by
split(',', ...). The pstricks family list \pst@famlist
accumulates as ",pstricks" (leading comma), so splitting
produces ["", "pstricks"]. The empty keyset caused
keyval_qname("psset","","ArrowInside") = "psset@@arrowinside",
which collided with the raw \def\psset@@arrowinside (a delimited-
argument helper), triggering "Missing argument" errors for
delimiters -, \@empty, \@nil.
4. KeyVal.pm: fix empty macroprefix handling for boolean and
command keys — use defined() checks so that an explicitly empty
macroprefix="" is respected rather than falling through to the
default qname-based macro name.
Resolves all 101 pstricks-related errors for arXiv paper 2405.20126v1.
Minimal reproduction: min-pstricks.tex (not committed).
Test suite: all 468 tests pass with no regressions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* create pstricks_support layer and address feedback (thanks @brucemiller)
* only documented color keys with hex values use lowercase c
* add pstricks_support.sty.ltxml to MANIFEST
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 48ad18d commit fdc8bf9
File tree
6 files changed
+1081
-1042
lines changed- lib/LaTeXML
- Core
- Package
6 files changed
+1081
-1042
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
0 commit comments