fix(typst): ship template as partials so code blocks render (#12)
R-CMD-check / R CMD check (pull_request) Successful in 3m54s
R-CMD-check / R CMD check (pull_request) Successful in 3m54s
The single-file `template: civilytics-typst.typ` discarded Quarto's auto-generated `definitions` partial, so any Typst document containing a code block failed with `unknown variable: Skylighting`. Ship the template as Quarto template-partials instead, so Quarto keeps its definitions (Skylighting + token functions) and syntax-highlighted code blocks render while the Civilytics branding still applies: - split civilytics-typst.typ into typst-template.typ (the styling function) and typst-show.typ (the show/entry point, keyword-safe [ ] wrapping kept); remove the single-file template - use_civilytics_theme() now copies both partials and prints the template-partials usage - example report.qmd uses template-partials Verified: a report with an R code block renders with working syntax highlighting and full branding.
This commit is contained in:
@@ -19,7 +19,9 @@ format:
|
||||
toc: true
|
||||
toc-location: right
|
||||
typst:
|
||||
template: ../typst/civilytics-typst.typ
|
||||
template-partials:
|
||||
- ../typst/typst-template.typ
|
||||
- ../typst/typst-show.typ
|
||||
pdf:
|
||||
include-in-header: ../latex/civilytics.tex
|
||||
include-before-body: ../latex/civilytics-title.tex
|
||||
|
||||
Reference in New Issue
Block a user