-
-
Notifications
You must be signed in to change notification settings - Fork 211
Document types
The .doctype
function defines the type of document based on different use cases. Each document type has its own set of features and limitations.
The layout of a plain document is linear, with no page breaks, and the content flows continuously.
It resembles the style of knowledge management tools, such as Notion or Obsidian.
The document is composed of three main elements:
- A central content area;
- Two side margin areas.

Page margin content is displayed in a fixed position, not affected by scrolling.
Footnotes are rather sidenotes in this document type, as they are displayed in the right margin area, next to their first reference.
When exporting to PDF:
- The output artifact is composed of a single page;
- The left side margin is removed;
- The right side margin is removed unless footnotes are used.
A paged document is a traditional document with content divided into pages.
Page breaks happen either explicitly or implicitly in case of long content.

Page margin content is displayed on each page in a dedicated area.
Footnotes are displayed at the bottom of the first reference's page, in a dedicated area.
A slides document is designed for presentations, with a layout optimized for displaying content one slide at a time.
Unless specified by the layout theme, slides center their content horizontally.
Line breaks are only triggered explicitly.

Page margin content is displayed on each slide, but not in a dedicated area. It could potentially overlap actual content.
Footnotes are displayed at the bottom of the first reference's slide, but not in a dedicated area.
When exporting to PDF:
- Each slide is a page of the output artifact;
- Each fragment state is displayed on a separate page.
- Figures
- Image size
- TeX formulae
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Document metadata
- Theme
- CSS
- Fonts
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Paragraph style
- Caption position
- Table of contents
- Bibliography
- Footnotes
- Stacks (row, column, grid)
- Container
- Align
- Float
- Figure
- Clip
- Box
- Collapsible
- Landscape
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more