Create project in app
Manual Install (No
What
TeXst is a Typst package for LaTeX-like academic paper formatting.
Start Here
Use one of these package imports:
- Published package (Typst Universe):
#import "@preview/texst:0.1.0": paper
- Local package install:
#import "@local/texst:0.1.0": paper
Manual Install (No @preview)
If you download the repo manually, you can install it as a local Typst package:
- Download and unzip this repository.
- Copy its contents into this folder structure:
- macOS:
~/Library/Application Support/typst/packages/local/texst/0.1.0/ - Linux:
~/.local/share/typst/packages/local/texst/0.1.0/ - Windows:
%APPDATA%\\typst\\packages\\local\\texst\\0.1.0\\
- macOS:
- Import from
@localin your Typst file:
#import "@local/texst:0.1.0": paper
Fastest Way to Use It
Copy this into your main.typ:
#import "@preview/texst:0.1.0": paper
#show: doc => paper(
title: [Paper Title],
subtitle: [Optional Subtitle],
authors: (
(name: [Author One]),
(name: [Author Two]),
),
date: datetime.today().display("[month repr:long] [day], [year]"),
abstract: [Write a concise abstract here.],
doc,
)
#outline(title: [Contents])
#heading(level: 1)[Introduction]
Start writing your paper.
#heading(level: 1)[Appendix]
#heading(level: 2)[Additional Material]
Add supplementary details here.
Initialize a Template Project
typst init @preview/texst:0.1.0
This generates a starter project from template/main.typ.
What paper(...) Does
paper(...) applies:
- page layout and numbering
- typography defaults
- heading style and spacing
- table/figure alignment and numbering
- equation and reference behavior
- title block and abstract formatting
Your document content is passed through doc.
Public API
paper(title:, subtitle:, authors:, date:, abstract:, style:, doc)nneq(eq)(unnumbered display equation)caption-note(body)caption-with-note(title, note)table-note(body)theorem,proof,prop,lem,rem,asp
Style Overrides
Pass a style dictionary to override defaults:
#show: doc => paper(
title: [Styled Paper],
style: (
body_font: "Libertinus Serif",
page_margin: (x: 1in, y: 1in),
heading_numbering: "1.",
accent_main: rgb(20, 40, 120),
),
doc,
)
Common keys include:
page_margin,page_numberingbody_font,body_sizeparagraph_leading,paragraph_indentheading_numbering,heading_size,heading_weightfootnote_numbering,accent_main
Local Development
examples/minimal.typis the local smoke test.template/main.typis the package template entrypoint.- Compile locally:
typst compile --root . examples/minimal.typ /tmp/minimal.pdf