Templates
A template gives a manuscript its pieces — title, author, abstract, chapter — and its look: fonts, page size, margins, page numbers. Reference one at the top.
reference wit/paper (title Attention as a Moral Practice title) (author T. Greig author) (date October 2026 date) (abstract This paper argues that attention is a moral act. abstract) (h2 Introduction h2)
wit build essay.wit -o essay.pdfBundled templates
| Template | For | Page |
|---|---|---|
wit/document | the default word-processor look | Letter |
wit/paper | an academic article | A4 |
wit/apa | an APA 7 student paper | Letter |
wit/mla | an MLA 9 paper | Letter |
wit/thesis | a thesis: title page, chapters on new pages, binding margin | A4 |
wit/report | a report: cover, summary page, "Page N of M" | A4 |
wit/letter | a formal letter | A4 |
wit/article | a long read for the web | — |
wit/book | a printed book: mirrored margins, drop caps | 6 × 9 in |
wit/manuscript | standard manuscript format for fiction | Letter |
The pieces
Every template defines the same pieces, so a manuscript builds with any of them.
| Piece | Use |
|---|---|
title, subtitle, author, affiliation, date | the title block |
abstract, summary, keywords | front matter |
dedication, epigraph | front matter for books and theses |
chapter | a chapter heading; a new page in thesis, report and book |
note, warning | callouts |
references | a hand-written reference list with hanging indents — or use citations |
from, to, subject, closing, signature | letters |
@pagebreak, @scenebreak | a new page; a break between scenes |
A piece that spans paragraphs opens and closes on lines of its own:
(abstract First paragraph. Second paragraph. abstract)
Switch template without editing
wit build essay.wit --template thesis -o essay.pdf wit build essay.wit --paper letter -o essay.pdf # the flag beats the template's size
--template replaces the manuscript's reference wit/… line, or adds
one.
Change one piece
Define it yourself; your definition wins over the template's, everywhere.
reference wit/paper #title @h1(class: wit-title) ::body:: — draft h1@ title#
A style block restyles a piece — each has a wit- class:
@@style .wit-doc .wit-title { color: #2b6a4f; } style@@
Your own template
A template is a Wit file of definitions plus a top-level @@style,
or a folder with a main.wit and its fonts and images. Put it in .wit/templates/ at the top of your project (or in ~/.wit/templates/ for all your documents) and reference it by name:
my-thesis/
.wit/templates/acme/main.wit
chapters/one.wit ~ reference wit/acmewit/<name> looks in the nearest .wit/templates above the
document, then ~/.wit/templates, then each folder in WIT_TEMPLATES_PATH, then the bundled ones — so a project template
named paper replaces the bundled one.
Start from a bundled one: reference wit/document inside your template
gives you all the pieces to restyle.