Papers & theses
Numbered sections, cross-references, footnotes, a table of contents and citations are built in. Start from a template that turns on what a paper needs.
reference wit/paper reference ./refs.bib (title Attention as a Moral Practice title) (author T. Greig author) (h2(id: intro) Introduction h2) Attention is "the rarest form of generosity" @cite(weil1952, 117).(fn The phrase is from a letter of 1942. fn) (h2 Conclusion h2) As @ref(intro) argued, looking is already acting. @bibliography
Templates
| Template | Numbering | Citations |
|---|---|---|
wit/paper | sections from h2, figures | APA |
wit/apa | none — APA headings | APA 7 |
wit/mla | none | MLA 9 |
wit/thesis | chapters and sections | APA |
wit/report | chapters and sections | APA |
Any setting can be changed in the document:
#wit_number_headings: h3 !! ~ number from h3; `none` to turn off #wit_number_figures: true !! ~ every captioned figure, not only those with an id #wit_citation_style: chicago !! ~ apa, mla or chicago #wit_labels: { figure: Fig. } !! ~ section, figure, table, equation, contents
~ number from h3; `none` to turn off
~ every captioned figure, not only those with an id
~ apa, mla or chicago
~ section, figure, table, equation, contents
Cross-references
Give a heading, figure, table or display equation an id; refer to it
with @ref(id).
@figure(src: lamp.png, caption: The lamp room, id: lamp) @@mathblock(id: energy) E = mc^2 mathblock@@ See @ref(lamp) and @ref(energy). ~ See Figure 1 and Equation 1. @ref(lamp, number) ~ 1

See Figure 1 and Equation 1. ~ See Figure 1 and Equation 1. 1 ~ 1
An unknown id is E_UNKNOWN_LABEL.
Contents
@contents ~ two levels @contents(depth: 1) ~ chapters only
~ two levels
~ chapters only
The list links to each heading. A PDF also gets bookmarks. Chrome cannot print page numbers in the list.
Footnotes
The keepers logged every night(fn Except during the 1931 earthquake. fn).
Notes are numbered through the document and listed where @footnotes stands — or, without it, before each chapter, before the
reference list and at the end. They print as endnotes.
Citations
Sources come from a BibTeX file, or from records in the document:
#sources: [ { id: weil, author: Weil, Simone, year: 1952, title: Gravity and Grace, publisher: Routledge }, { id: smith, author: Smith, Ann; Jones, Bo, year: 2020, title: Lights at Sea, journal: Maritime History, volume: 12, issue: 2, pages: 44–61, doi: 10.1/abc }, ] !!
@cite(weil) ~ (Weil, 1952) @cite(weil, 117) ~ (Weil, 1952, p. 117) @cite(weil; smith) ~ (Weil, 1952; Smith & Jones, 2020) @cite(weil, 117; smith, 50) ~ (Weil, 1952, p. 117; Smith & Jones, 2020, p. 50) @cite(weil, narrative: true) ~ Weil (1952) @bibliography ~ References, sorted
Fields: author (Last, First; separated by ;), year, title, publisher, place, journal, volume, issue, pages, doi, url, and for other kinds of work booktitle, editor, school, degree, institution, number, site, short — chapters, theses, reports and web pages are
recognised by them, or set type. A #sources list, +#sources entries and .bib files all count together; in a chapter file, add one source at a time with +#sources: { id: … } !!. An unknown id is E_UNKNOWN_SOURCE.
A house style
A journal's own style is a library, kept in a template or the project:
#wit_citation(surnames, year, locator) ::surnames:: ::year::(if ::locator::): ::locator::(end) wit_citation# #wit_reference(author, year, title, journal) ::author:: — ::title:: (::year::).(if ::journal::) ::journal::.(end) wit_reference#
Each definition takes the fields its header names; @cite and then use it.