-
Notifications
You must be signed in to change notification settings - Fork 1
Report #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Report #22
Changes from 3 commits
8fc5b53
135b607
dc33be8
0611c78
dae1b5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # NAIF report Quarto format | ||
|
|
||
| This Quarto extension exposes the NAIF Typst report template as the custom format | ||
| `naif-report-typst`. | ||
|
|
||
| ## Use | ||
|
|
||
| ```yaml | ||
| format: | ||
| naif-report-typst: | ||
| toc: true | ||
| number-sections: true | ||
| ``` | ||
|
|
||
| Common report metadata: | ||
|
|
||
| - `title` | ||
| - `subtitle` | ||
| - `authors` | ||
| - `date` | ||
| - `report-version` | ||
| - `abstract` | ||
| - `keywords` | ||
| - `doc-category` | ||
| - `compact-mode` | ||
| - `logo-path` | ||
|
|
||
| Render reports with the repository-managed Quarto command: | ||
|
|
||
| ```bash | ||
| uv run quarto render path/to/report.qmd | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| title: NAIF Report | ||
| author: NAIF team | ||
| version: "0.1.0" | ||
| quarto-required: ">=1.9.18" | ||
| contributes: | ||
| formats: | ||
| typst: | ||
| doc-category: "NAIF report" | ||
| website: "https://eth-library.github.io/naif/" | ||
| toc: true | ||
| number-sections: true | ||
| template-partials: | ||
| - typst-template.typ | ||
| - typst-show.typ | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||
| #show: doc => naif-report( | ||||||
| $if(doc-category)$ | ||||||
| doc-category: [$doc-category$], | ||||||
| $endif$ | ||||||
| $if(title)$ | ||||||
| title: [$title$], | ||||||
| $endif$ | ||||||
| $if(subtitle)$ | ||||||
| subtitle: [$subtitle$], | ||||||
| $endif$ | ||||||
| $if(by-author)$ | ||||||
| authors: ( | ||||||
| $for(by-author)$ | ||||||
| $if(it.name.literal)$ | ||||||
| ( | ||||||
| name: [$it.name.literal$], | ||||||
| affiliation: [$for(it.affiliations)$$it.name$$sep$, $endfor$], | ||||||
| email: [$it.email$], | ||||||
|
||||||
| email: [$it.email$], | |
| email: "$it.email$", |
Copilot
AI
Apr 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template passes Quarto’s project lang through to Typst (language: "$lang$"). In this repo _quarto.yml sets lang: en-UK, which is a non-standard BCP47 tag (typically en-GB). If Typst validates language tags, this can break rendering. Consider either omitting language unless explicitly set for the report, or normalising common values (e.g. mapping en-UK → en-GB).
| language: "$lang$", | |
| language: if "$lang$" == "en-UK" { "en-GB" } else { "$lang$" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extension config contributes settings under
formats.typst, but the documentation and example report use the custom format namenaif-report-typst. As written,format: naif-report-typst:will not be registered by this extension (unless Quarto implicitly aliases it), so the example render will fail. Align these by either defining the format underformats.naif-report-typst(and inheriting from Typst) or updating the docs/examples to useformat: typst:.