Shared Typst formatting assets for NIH-style grant documents. Intended to be used as a git submodule.
git submodule add git@github.com:BonhamLab/assets_grants_common assets/grants_commonIn your Typst document, import and apply the NIH template:
#import "/assets/grants_common/lib.typ": *
#show: nih-formatCompile with --root . so that absolute imports resolve from the project root:
typst compile --root . main.typ grant.pdf
typst watch --root . main.typ grant.pdfTo "export" a version that contains the current commit hash:
typst compile --root . main.typ ~/Downloads/(basename $PWD)-(git rev-parse --short HEAD).pdf- Page: US Letter (8.5″ × 11″), 0.5″ margins on all sides
- Font: Liberation Serif, 11 pt
- Paragraphs: justified, single-spaced
- Headings: all at 11 pt per NIH rules — bold (h1), bold italic (h2), italic (h3+)
Pass page: or text: dicts to override specific fields:
#show: nih-format.with(
page-overrides: (margin: 0.75in),
text-overrides: (size: 12pt),
)The exported dicts nih-page and nih-text can also be spread directly into set rules if you need more control:
#import "/assets/grants_common/lib.typ": nih-page, nih-text
#set page(..nih-page, margin: (left: 1in))
#set text(..nih-text)- Typst 0.14
- Liberation Serif font installed (available in most Linux distros via
fonts-liberation)