Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stellar-revtex template

Typst template that emulates many REVTeX (APS) conventions.

What's inside

  • 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).

Quick start

Render the bundled examples

typst c template/main.typ template.pdf
typst c example/main.typ example.pdf   # uses a few preview packages

Use as a local package in your own project

  1. 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).

  1. 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.

Options reference (non-exhaustive)

  • 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, or 12pt; defaults to 12pt for preprint/onecolumn, 10pt for reprint/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-title analogous.
  • funding, acknowledgment, date, authorNotes, pacs, keywords, show-pacs, show-keywords to mirror common REVTeX front-matter.
  • Author fields: name (required), at/affiliation (string or tuple), optional note keys matching authorNotes, optional email, optional orcid (prints linked ORCID icon); aliases by for name and names (tuple) are accepted.
  • show-appendix-heading: true shows a visible "Appendix" heading in the outline.
  • Appendix helper: #appendix(title: [...], lbl: "app:id") auto letters appendices and resets equation numbering to (A1), (B1), ...

Important limitations

  • REVTeX-style footinbib is 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.

Author

Credits

License

GPL-3.0-only

About

Typst paper templated inspired by `revtex`

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages