Skip to main content

Postext documentation

Contents

Three parts: what Postext is and how it is built, the typographic craft it automates, and the tools you use it with.

Part I · Foundations

  1. 1IntroductionReading time: 6 minWhat Postext is, why it exists, and the problem it solves
  2. 2ArchitectureReading time: 26 minTechnical architecture of the Postext layout engine: its concepts, the document tree, rhythm, backends and performance
  3. 2.1The layout pipelineReading time: 26 minThe placement pass and its rounds: how the engine places lines, floats, notes and columns, and repeats until the layout settles

Part II · The craft

  1. 3ConfigurationReading time: 4 minWhat a Postext configuration is, and where each group of settings is explained in the twenty pages of the reference
  2. 3.1Page and layoutReading time: 32 minThe page size, margins and baseline grid, page numbering, and the columns and their gutters
  3. 3.2Headers and footersReading time: 29 minWhat prints at the top and the foot of every page: text with placeholders, rules, boxes, images and vector paths, by page parity, and where each element sits
  4. 3.3Body textReading time: 24 minThe typography of the running text: font, size and leading, colours, indents, blockquotes, verse, tab stops and drop caps
  5. 3.4Hyphenation and languageReading time: 20 minHyphenation patterns and exceptions, ragged text, the document language and its digits and direction, and the scripts Postext sets
  6. 3.5HeadingsReading time: 31 minHeading defaults, the overrides for each level, page breaks before a heading, page-wide chapter openers and numbers spelled out in words
  7. 3.6Widows, orphans and balancingReading time: 22 minThe rules that keep lines and blocks together across a column break, and the levers that make every column end level
  8. 3.7Lists and mathsReading time: 17 minBulleted and numbered lists, their markers, indents and nesting, task lists, and the size, colour and spacing of mathematical formulas
  9. 3.8Notes and referencesReading time: 27 minFootnotes, line numbers, cross-references and citations, the table of contents and the back-of-book index
  10. 3.9East Asian typographyReading time: 34 minThe cjk settings: line breaking, punctuation widths, spacing, the character grid, ruby and the marks of Chinese, Japanese and Korean text
  11. 3.10Resources and tablesReading time: 40 minResource types and their numbering, table and caption styles, single-ink diagrams and printed videos
  12. 3.11Styles and partsReading time: 33 minNamed styles for paragraphs, chips, highlights, code listings and headings, and the pages that open each part
  13. 3.12Callout boxesReading time: 25 minNamed styles for :::callout boxes: frame, fill, stripe, title, icon, marker and label tab; box shapes with per-corner radii, per-side borders and joined tabs; numbered statements; typography inside the box; boxes split across pages; and designs drawn in a box
  14. 3.13Exercise settingsReading time: 12 minExercise styles (exerciseStyles) and the book's exercise settings (exercises): number badges, instruction type, option labels and markers, blanks, true/false answers, matching, word banks, writing areas, grids, long division, difficulty marks, icons, the answers' colour, where solutions print, the teacher's edition and the screen editions
  15. 3.14Comics settingsReading time: 7 minThe comics settings: the frame and gutters of comic pages, panel styles, lettering, balloon styles and the cast
  16. 3.15Composed pages settingsReading time: 10 minPage templates for composed pages: frames, groups, grids that repeat a frame set, modules, decoration and connectors, inheritance and recto/verso variants, the label styles of picture anchors, and the warnings a template can give
  17. 3.16Fonts, colours and outputReading time: 36 minUnits, colours and the palette, custom fonts, the HTML viewer, PDF and print production, the Folio viewer and the debug overlays
  18. 3.17Programmatic usageReading time: 28 minCalling Postext from code: buildDocument and its warnings, defaults, fonts, caches and the Web Worker
  19. 3.18PDF filesReading time: 20 minpostext-pdf from code: installation, the API, font providers in the browser and in Node, CJK fonts, resource bytes, vertical text, workers and print-ready files
  20. 3.19HTML, Folio, EPUB, SCORMReading time: 16 minThe laid-out book in a web page, as a 3D book with postext-folio, as fixed-layout or reflowable EPUB 3 with postext-epub, and as a SCORM package for an LMS with postext-scorm
  21. 3.20.postext bundlesReading time: 27 minHow to open, lay out, render and create .postext files from code; bilingual bundles; files written by older versions; and the low-level API
  22. 4Hyphenation & JustificationReading time: 40 minHow Postext breaks lines, justifies text, and controls word spacing using the Knuth-Plass algorithm
  23. 5Document FormatReading time: 14 minThe Markdown subset Postext parses: frontmatter, headings, lists and code blocks, what it ignores, and the rules for authoring source documents
  24. 5.1DirectivesReading time: 35 minThe ::: directives: containers, columns, paper, page breaks, numbering, space, verse, contents and index, line breaks, and the markup of comic pages
  25. 5.2Inline formatting and formulasReading time: 25 minMarks inside a line: emphasis, links, chips, small capitals, tabs, vertical text, Chinese and Japanese marks, text direction, and LaTeX formulas
  26. 5.3Notes and referencesReading time: 14 minFootnotes, cross-references and anchors, citations and the bibliography, and the marks of the back-of-book index
  27. 5.4Pictures, tables and videosReading time: 39 minResources in the text: references and embeds, numbering, placement and where a float lands, text wrap, bitmap size, safe areas, comic anchors and videos
  28. 6Chinese layoutReading time: 32 minHow Postext sets Chinese, horizontally and vertically: regions, line breaking, punctuation widths, justification between characters, the character grid, right-bound books, upright numbers, marks, ruby, warichu, Chinese numerals and fonts
  29. 7Arabic layoutReading time: 29 minHow Postext sets Arabic: text direction and the bidirectional algorithm, right-bound books, joined words that are never cut or spaced, kashida justification, vowel marks, emphasis, digits and numeral styles, ordinal words, footnotes, classical verse, contents, index, citations and fonts
  30. 8Japanese layoutReading time: 35 minHow Postext sets Japanese, vertically and horizontally: the Japan region, kinsoku, yakumono spacing, paragraph-start brackets, vertical forms, furigana, emphasis marks and side lines, kanbun, counters, gyōdori headings, notes, a gojūon index, citations, fonts and Aozora Bunko sources
  31. 9ComicsReading time: 38 minHow Postext sets comics and manga from Markdown: comic pages cut by a split tree, panel pictures cropped around their safe area, lettering generated from a script (speech, thought, whisper, shout, radio, captions, sound effects), balloon styles, speaker anchors on the pictures, strips in the text, two-page spreads, right-to-left reading and vertical lettering, translations, and the canvas, PDF, HTML and EPUB outputs
  32. 10Music notationReading time: 12 minHow Postext sets music in a book: notation written as text in ABC, MusicXML, MEI or Humdrum, engraved at the width of the column, broken into systems that run on over columns and pages, numbered music examples as resources, the score style, the outputs, and how a music publisher brings its scores in
  33. 11ExercisesReading time: 16 minHow Postext sets the exercises of a textbook or a workbook: the :::exercise fence, its twelve kinds from multiple choice to long division, answers written in the Markdown, numbering, solutions after the exercise, upside down, at the end of the chapter or of the book, the teacher's edition, the checks, exercises answered on screen in HTML and EPUB, limits for a test, and results sent to an LMS in a SCORM package
  34. 12Composed pagesReading time: 41 minHow to write a composed page in Markdown: the page fence, opened with four colons, that chooses the template; frames and the slot attribute, which share content out among its frames; repeated slots and modules; and warnings for content that does not match the template or covers another frame
  35. 12.1Figures with labelsReading time: 8 minFigures that set words on a picture: labels at the anchors of a resource, a figure's own alternative text, caption and note, how a label is set, labels away from their point with leaders, legends and inline symbols, and the warnings of labels

Part III · In practice

  1. 13ContributingReading time: 5 minHow to join the Postext community and contribute to the project
  2. 14SandboxReading time: 28 minThe Sandbox's interface: the activity bar and the Text, Books, Chapters, Resources and Fonts panels, and the layout on phones
  3. 14.1Design and Checks panelsReading time: 38 minThe Design panel's groups, pages, search and summary, and the Checks panel's live warnings, grouped by kind
  4. 14.2Composed pagesReading time: 21 minEditing page templates and frames on the page, connectors and shapes, leaders, pointers and keys, grids, modules and their library, reshaping frames, overlap checks and glyph tabs, the library of frame styles, checking composed pages in every edition, moving a book's text to the Markdown, and fixing a frame in one click
  5. 14.3PreviewsReading time: 14 minThe Canvas, PDF, Folio, HTML, EPUB 3 and SCORM tabs of the main viewport: what each shows and what it can do
  6. 14.4Books, Word files and savingReading time: 38 minBooks and chapters, editing comic pages, importing Word documents, exporting a book to Word and bringing the corrections back, and how the Sandbox saves, exports and imports your work
  7. 14.5Agents, embedding and presetsReading time: 12 minWebMCP tools for AI agents, the PostextSandbox component in your own app with its props and CSS, and the preset bundle format
  8. 15Composed-page booksReading time: 22 minA walk through the Sandbox with a school textbook made of composed pages: build a page template, fill it from the Markdown, label a map, translate the page, fix text that does not fit, select on the page and in the text, then draw a tree with connectors, notes on a map with pointers and a key, a grid of photo cards and a module library for a series
  9. 16Moving to composed pagesReading time: 13 minHow to move a book that keeps the text of its pages in heading styles to page templates and Markdown, either with the Sandbox assistant Move the text to the Markdown or by hand, what to check afterwards, and how to replace lines baked into a picture with connectors and one-off frames with grids and modules
  10. 17SkillReading time: 9 minInstall the postext-port skill in Claude Code, Codex or any agent and let it turn a PDF, Word, PowerPoint, EPUB, InDesign or HTML source into a Postext project that follows the original layout
  11. 18Command lineReading time: 14 minA single self-contained executable for macOS, Linux and Windows. It turns a .postext book, a book folder or loose Markdown into PDF, HTML, EPUB, page images and Word, packs bundles, checks books, and gives JSON output for scripts and agents
  12. 19WebMCPReading time: 12 minWhat an AI agent in the browser can do with the Sandbox through its 53 WebMCP tools — look at the pages, change any setting, edit the text, add pictures, tables and fonts, run the checks, export — and how to call each one, with real arguments and answers