Typst template that emulates many REVTeX (APS) conventions.
lib.typ: the template entrypoint (stellar-revtex+appendix).template/main.typ: minimal starter file.example/main.typ: longer scientific sample with figures, tables, bib, and glossaries.typst.toml: package metadata (@local/stellar-revtex:0.1.0).
typst c template/main.typ template.pdf
typst c example/main.typ example.pdf # uses a few preview packages- Make sure the repo is available on Typst's local package path. On macOS:
mkdir -p "$HOME/Library/Application Support/typst/packages/local/stellar-revtex/0.1.0"
cp -R . "$HOME/Library/Application Support/typst/packages/local/stellar-revtex/0.1.0"On Linux: ~/.local/share/typst/packages/local/stellar-revtex/0.1.0 (same layout on Windows under %LOCALAPPDATA%\typst\packages\local\stellar-revtex\0.1.0).
- In your document (e.g.
paper.typ) import and show the template:
#import "@local/stellar-revtex:0.1.0": stellar-revtex, appendix
#show: stellar-revtex.with(
title: [Interesting Results],
authors: ((name: "A. Author", at: "inst", email: "a@author.edu"),),
affiliations: (inst: "Institute of Examples"),
abstract: [One-line abstract.],
layout: "reprint", // "preprint", "reprint", "twocolumn", "onecolumn"
affiliation-style: "auto", // "auto", "superscript", "plain"
aps-journal: "physrev", // or "prl" for PRL-style headings
)
= First Section
Body text ...
#appendix(title: [Supplementary], lbl: "app:sup")
More details.paper-size:"us-letter"(default) or"a4".layout:"preprint"(12 pt, 1-col header),"reprint"(APS 2-col),"twocolumn","onecolumn".journal:"aps"or"aip"(bibliography style);aps-journal:"physrev"or"prl"(heading styling).font-size:10pt,11pt, or12pt; defaults to12ptforpreprint/onecolumn,10ptforreprint/twocolumn(REVTeX-like).affiliation-style:"auto"(skip superscripts if only one affiliation),"superscript","plain".preprint-id: string or content placed top-right (REVTeX\preprint).abstract-title:none(default "Abstract"),false(hide), or custom content;bibliography-titleanalogous.funding,acknowledgment,date,authorNotes,pacs,keywords,show-pacs,show-keywordsto mirror common REVTeX front-matter.- Author fields:
name(required),at/affiliation(string or tuple), optionalnotekeys matchingauthorNotes, optionalemail, optionalorcid(prints linked ORCID icon); aliasesbyfornameandnames(tuple) are accepted. show-appendix-heading:trueshows a visible "Appendix" heading in the outline.- Appendix helper:
#appendix(title: [...], lbl: "app:id")auto letters appendices and resets equation numbering to (A1), (B1), ...
- REVTeX-style
footinbibis not currently possible due to fundamental limitations in typst bibliographies. - Wide equations (
widetext) spanning both columns in a two-column layout are not possible with Typst's layout engine yet.
- Dr. Tobias Wolf — public@wolft.xyz
- inspired by the JACoW Typst template.
GPL-3.0-only