Skip to content

Features

Ignacio Ferro Picón edited this page Oct 16, 2026 · 3 revisions

Features

What Postext does today (postext 1.16), area by area, with a link to the page that explains each part. The packages named here are described in Packages.


Pages and columns

  • Page size presets and custom sizes, mirrored margins, a page-wide baseline grid, crop marks and bleed. → Page, Cut lines
  • Single, double and column-and-a-half layouts, with a column rule and a configurable gutter. In column-and-a-half, the side column can hold figures, tables and boxes (sideColumnRole: 'floats'), with side captions set level with their figure. → Layout types
  • :::columns changes the column count part-way down a page; :::pagebreak forces a break with parity control; :::space adds explicit vertical space; :::paper gives one leaf its own paper. → Directives
  • Left- and right-bound books (page.binding), with the PDF asking viewers for right-to-left spreads. → Binding
  • Vertical writing (layout.writingMode: 'vertical-rl') for Chinese and Japanese books. → Vertical writing

Running heads, folios and page numbering

  • Header and footer designs made of text, rule, box and image elements, different on odd and even pages, with placeholders for the page number, chapter number and title, part title and document metadata. → Headers & footers
  • Page numbering in arabic, roman, letters, Chinese, Arabic-Indic and other styles, numbering resets with :::numbering, and PDF page labels that match the printed folios. → Numbering
  • Parity-aware breaks before headings (odd, even, always-odd, …), with blank pages where needed. → Break before

Text and justification

  • Knuth-Plass line breaking over the whole paragraph, with word-spacing bounds and loose-line debugging. → Hyphenation and Justification
  • TeX-pattern hyphenation in English, Spanish, French, German, Italian, Portuguese, Catalan (with the IEC rule for l·l) and Dutch; overlong words are divided by syllable, then by character. → Hyphenation
  • Orphan, widow and runt control, and keep-together rules (a heading with its first lines, a colon with the list it introduces). → Orphans, widows, runts, and keep-together rules
  • Column balancing: columns on a page end level, closing pages of a chapter are evened out, and a chapter laid out alone gives the same pages as inside the whole book. → Column balancing
  • Inline formatting: bold, italic, small capitals, subscripts and superscripts, links, inline colour swatches and inline chips (:chip[…]{style=…}). → Inline formatting
  • LaTeX maths, inline and display, drawn as SVG through MathJax in every output. → Math, Mathematical formulas
  • Custom fonts (woff2, woff, ttf, otf) beside Google Fonts, with missing-font warnings. → Custom fonts
  • A colour palette that re-inks the whole document from one place. → Color Palette

Headings, styles and parts

  • Heading levels with numbering templates, spans (column or page), opener designs and drop caps. → Headings
  • Named heading styles ({style="front-matter"}, appendices, hidden headings) that change running heads, page geometry, body type and palette for a whole section. → Heading styles, Heading attributes
  • :::part divider pages with their own design, and part palettes that recolour every chapter in the part. → Parts
  • Named paragraph styles for bibliographies, glossaries, notes and hanging-indent entries (:::paragraphs{style=…}). → Paragraph styles
  • :::verse blocks for poetry, including Arabic verse set as two hemistichs. → :::verse

Figures, tables and boxes

  • Bitmaps, SVGs, tables and videos declared once beside the text and called with :ref{id=…}. The first reference floats the resource to the first free band after it (column, page or side column); floats of one numbering sequence never overtake each other. → Resources, Placement
  • Pictures with a safe area: a photo may be cropped down to the region that must stay in view, or grow back to the whole picture, so it fills a short column or keeps an inline embed inside its column. → Safe area
  • Videos (YouTube, Vimeo or your own MP4/WebM file), placed, captioned and numbered like pictures (Video 1.1). Print shows the poster frame with a play mark and a QR code that opens the video, and the PDF links the poster; the HTML viewer and EPUB play the video with the player options of the book's video style (no download button, loop, muted…). → Videos, Video style
  • Typed numbering (Figure, Table and your own types), localised for the document language, with reference and caption templates. → Resource types
  • Tables: their own typography, named table styles, zebra rows, rounded frames, cell fills, cell images, in-cell lists, rotated tables, and tables that split between rows across pages with repeated headers and a (cont.) caption. → Table style, Tables taller than the page
  • Captions with their own style, side captions, notes and source lines. → Caption style
  • Single-ink diagrams: SVGs recoloured to tints of one ink for spot-colour printing. → Diagram style
  • :::callout boxes with named styles (fill, frame, title, icon marker column, their own type). Boxes nest, float to the top or bottom of a page, sit in the side column, and split across columns and pages. → Callout styles

Notes, references and apparatus

  • Footnotes ([^id]) at the foot of the citing column, or gathered at the end of the chapter; numbered per chapter, through the book, per page or per column, in decimal, roman or circled numbers (①). → Footnotes, Footnotes config
  • Cross-references to headings, figures, tables and anchors ({#id}), clickable in the PDF. → Cross-references and anchors
  • Citations in Pandoc syntax ([@garcia2020, p. 33]) formatted in a CSL style (APA, Chicago, MLA, IEEE, Vancouver, ISO 690, GB/T 7714, OSCOLA…) with a generated bibliography; BibTeX input. Needs postext-citeproc. → Citations and bibliography, Citations config
  • A table of contents (:::toc) fed by the book's outline, with leaders and page labels. → Table of contents
  • A back-of-book index from :index[…] marks, with sub-entries, sort keys, principal pages in bold and several indexes per book. → Back-of-book index

Languages and scripts

  • A document language (locale) that drives hyphenation, built-in strings, numerals, text direction and the language tagged in the PDF. → Document language, Languages and scripts
  • Chinese (Simplified, Traditional, Hong Kong): line breaking, punctuation widths and hanging punctuation, Han–Latin spacing, the character grid, emphasis dots, proper-name and book-title marks, ruby (pinyin, zhuyin) and warichu, horizontal or vertical. → Chinese Layout, East Asian typography
  • Arabic (Modern Standard and Classical): the bidirectional algorithm, shaping through HarfBuzz in the PDF, kashida justification, vowel marks, Arabic-Indic digits and number words, right-bound books and classical verse. → Arabic Layout
  • Japanese, vertical and horizontal, by JLReq and JIS X 4051: kinsoku, yakumono spacing with paragraph-start brackets, vertical forms and tate-chū-yoko, furigana (jukugo ruby, 1:2:1), sesame emphasis marks and side lines, kanbun kunten, Japanese counters (第一章), 行取り headings and 字下げ blocks, notes, a gojūon index with readings, SIST 02 citations and Aozora Bunko sources. → Japanese Layout

Output

  • Canvas: any page as a bitmap, for previews and thumbnails. → Rendering a page to a bitmap
  • HTML: absolutely positioned markup, with an index so a viewer patches only the blocks that changed. → Integrating the HTML viewer
  • PDF (postext-pdf): outlines, clickable links, embedded fonts with kerning, vector SVG figures and PDF print masters, RGB, CMYK or grayscale, crop marks, and tagged PDF/UA-1 output checked with veraPDF. Runs on a worker for long books. → Generating PDFs
  • EPUB 3 (postext-epub): a fixed-layout book that keeps every printed page with real text, or a reflowable book in semantic XHTML styled from the same configuration; checked with EPUBCheck. → EPUB books
  • Folio (postext-folio): the book in 3D, with leaves that curl and cast shadows, turned by hand or by key; paper stocks, lighting and binding are configurable. → A 3D book, Folio viewer (config)
  • Web Worker: postext/worker runs layout off the main thread with last-wins cancellation, also loaded straight from esm.sh. → Running layout in a Web Worker
  • React: postext/react shows a document's pages in a component. → React

Books and bundles

  • A book is a list of chapters. Each chapter is laid out as a continuation of the one before (page numbers, parity, counters, the open part), or the whole book is built at once. → Books and chapters
  • .postext bundles carry a book's chapters, configuration, resources, fonts and its pagination, so an imported book opens already laid out. postext/bundle creates, opens and builds them from code. → Bundles
  • Warnings for the document and the configuration (overflowing boxes, missing fonts, unknown placeholders, table grid problems…). → Warnings in the document, Configuration warnings

Tools around the engine

  • Sandbox at postext.dev/en/sandbox: a library of books, a markdown editor with source ↔ preview sync, a Design panel for every setting, a Resources panel, Canvas, PDF, Folio, HTML and EPUB previews, a Checks panel, permalinks to any page, and a phone layout. → Sandbox
  • Cookbook: more than a hundred complete recipes, each a real publication set with Postext, with the code, the pages and the pitfalls. → Cookbook and Showcase
  • Showcase books in the Sandbox: magazines, textbooks, literary editions, an atlas, an exhibition catalogue, a classic Chinese novel, Sōseki's Kokoro in Japanese (vertical) and One Thousand and One Nights in Arabic. → Cookbook and Showcase
  • The built-in guide: a book about Postext set with Postext, in English, Spanish, Catalan, Chinese and Japanese (vertical) and Arabic (right to left).
  • Agent skill postext-port: teaches a coding agent to turn an existing publication (PDF, Word, EPUB, InDesign, LaTeX…) into a Postext project. → Agent Skill
  • Website in English, Spanish, Catalan, Simplified Chinese and Arabic, built to WCAG 2.2 AAA, with Markdown versions of every page for agents (llms.txt).

Clone this wiki locally