Typst Document Setup
#set page(...), #set text(...), #set par(...), #set heading(...). Four lines and your document is configured.
A complete academic-paper preamble
#set page(
paper: "us-letter",
margin: 1in,
numbering: "1",
)
#set text(
font: "Times New Roman",
size: 12pt,
lang: "en",
)
#set par(
leading: 1em, // line spacing within paragraph
first-line-indent: 1em,
justify: true,
)
#set heading(numbering: "1.")
// Title block
#align(center)[
#text(size: 18pt, weight: "bold")[Your Paper Title]
#text(size: 12pt)[Author Name]
#text(size: 10pt)[Affiliation]
]
#v(1em)
= Introduction
Body text here. The first line of each paragraph is indented 1em.
= Methods
More text...
#bibliography("references.bib", style: "ieee")Common settings, by category
Page
| Option | Effect |
|---|---|
| paper: "us-letter" | Standard US 8.5x11 |
| paper: "a4" | European A4 |
| margin: 1in | All sides |
| margin: (left: 1.5in, right: 1in, y: 1in) | Asymmetric |
| numbering: "1" | Page numbers |
| columns: 2 | Two-column layout |
Text
| Option | Effect |
|---|---|
| font: "Times New Roman" | Body font |
| size: 12pt | Default text size |
| lang: "en" | Hyphenation language |
| weight: 400 | Default weight |
Paragraph
| Option | Effect |
|---|---|
| leading: 1em | Line spacing within paragraph |
| first-line-indent: 1em | Paragraph indent |
| justify: true | Justified text |
TypeTeX includes academic templates with the right #set rules already configured for IEEE, ACM, NeurIPS, ICML, theses, and more. Pick a template, focus on writing.
Frequently Asked Questions
Use #set rules at the top of your document. Common ones: #set page(paper: "us-letter", margin: 1in) for layout, #set text(font: "Times New Roman", size: 12pt) for fonts, #set par(leading: 1em, justify: true) for paragraphs, #set heading(numbering: "1.") for section numbers.
#set page(paper: "us-letter", margin: 1in). Paper options: "us-letter", "us-legal", "a4", "a5", "b5". Margins can be uniform (margin: 1in) or per-side (margin: (left: 1.5in, right: 1in, y: 1in)).
#set heading(numbering: "1.") gives 1, 2, 3 numbering for top-level. "1.1" gives 1.1, 1.2 for two levels. "I." for Roman numerals, "A." for letters. Custom: "1.1.a" mixes integers and letters across nesting levels.
#set par(leading: 1em) controls the space between lines within a paragraph. Default is 0.65em. For 'double-spaced', use leading: 1.5em or 2em. For paragraph-to-paragraph spacing: #set block(spacing: 1em).
#set page(numbering: "1") for simple Arabic. "i" for lowercase Roman, "I" for uppercase. "1 / 1" shows 'page X of Y'. To suppress on the first page (title page): #set page(numbering: none) for that page using #place or #set page rules scoped to a section.
#set page(header: [Your Title], footer: [Page #counter(page).display()]). For just-on-even pages or first-page suppression, pass a function: header: (page) => if page > 1 { ... }. The header/footer take any content — text, formatting, custom layouts.
Typst doesn't have document classes — it has 'templates' which are reusable styled wrappers. Use #import "@preview/journal-template:1.0": * to import a published template, or write your own setup using #set rules. The Typst Universe (typst.app/universe) hosts community templates.
Manually with formatted text: #align(center)[#text(size: 18pt, weight: "bold")[Your Title]\ #text(size: 12pt)[Author Name]]. Or use a template's title() function. Most academic templates expose #title, #author, #abstract that handle the formatting consistently.
LaTeX preamble: \documentclass + \usepackage{geometry} + \setlength{} + \usepackage{fontspec} + \setmainfont{} + \usepackage{titlesec} + \renewcommand{}... 10+ lines, multiple packages, ordering matters. Typst: 4-6 lines of #set rules, no package imports for built-ins, order doesn't matter (unless you intentionally want it to).