Repository navigation
Commit 37ce214
claude: Fix listing centering in Typst book templates
Add show rule injection to left-align listing figures in Typst output.
This overrides template centering for listing-kind figures by injecting
a show-set rule after the template is applied.
- Add injected_listing_align_rule tracking variable
- Inject #show figure.where(kind: "quarto-float-lst"): set align(start)
- Remove old workaround that only worked inside figure content
- Add ensurePdfTextPositions test for listing alignment
Fixes #9724
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 21dd5a0 commit 37ce214
3 files changed
Lines changed: 21 additions & 7 deletions
File tree
- src/resources/filters/customnodes
- tests/docs/smoke-all/typst/orange-book
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
976 | 979 | | |
977 | 980 | | |
978 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
979 | 992 | | |
980 | 993 | | |
981 | 994 | | |
| |||
1096 | 1109 | | |
1097 | 1110 | | |
1098 | 1111 | | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | 1112 | | |
1107 | 1113 | | |
1108 | 1114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| |||
0 commit comments