# Postext > A layout engine that bridges centuries-old print typesetting craft with modern web technology. Semantic markdown in, publication-grade pages out — rendered to HTML, canvas, print-ready PDF, and EPUB. Postext takes semantic markdown and applies centuries-old editorial rules — Knuth-Plass justification, balanced columns, floats that know their place — to produce publication-grade pages in HTML, canvas or print-ready PDF. - Install: `pnpm add postext` - Home: [https://postext.dev/en.md](https://postext.dev/en.md) - Full documentation: [Full text of every documentation page in one file](https://postext.dev/llms-full.txt) ## Features - [Knuth-Plass justification](https://postext.dev/en/docs/justification.md#knuth-plass-seeing-the-whole-paragraph): The same optimal line-breaking algorithm TeX uses, with TeX-pattern hyphenation and orphan control — evenly set text blocks with no rivers of whitespace, beyond anything CSS can express. - [Resources & cross-references](https://postext.dev/en/docs/document-format-resources.md#resources): Figures, SVG diagrams and tables float to the top or bottom of columns and pages — the way print floats work — with typed numbering and :ref cross-references that always stay in sync. - [Tables & captions](https://postext.dev/en/docs/configuration-resources.md#table-style): Tables set with independent body and header typography, split across pages with repeated headers, and captions that follow your configuration — numbered and placed alongside the resource they describe. - [Single-ink diagrams](https://postext.dev/en/docs/configuration-resources.md#diagram-style): Recolor SVG diagrams to tints of one ink by luminance, so every illustration matches your design — ready for spot-colour printing. - [LaTeX math](https://postext.dev/en/docs/document-format-inline.md#mathematical-formulas): Inline and display equations written in LaTeX, measured and typeset by the engine so they sit on the baseline grid alongside the text. - [Web, print-ready PDF & EPUB](https://postext.dev/en/docs/architecture.md#backend-interface): One layout engine, four outputs. The same computed pages render to HTML, canvas, or print-ready PDF — with bookmarks, CMYK colour and tagged, accessible PDF/UA output — and go out as an EPUB 3 e-book, page for page or reflowable. ## Packages - [postext](https://www.npmjs.com/package/postext): the layout engine: Markdown in, pages out, with the HTML and canvas renderers - [postext-pdf](https://www.npmjs.com/package/postext-pdf): print-ready PDF, tagged for accessibility (PDF/UA), with crop marks and CMYK - [postext-epub](https://www.npmjs.com/package/postext-epub): EPUB 3 e-books, fixed layout or reflowable - [postext-folio](https://www.npmjs.com/package/postext-folio): a 3D book viewer whose pages turn by hand - [postext-citeproc](https://www.npmjs.com/package/postext-citeproc): citations and bibliographies in CSL styles (APA, Chicago, IEEE, Vancouver, GB/T 7714…) and a BibTeX reader - [postext-cli](https://www.npmjs.com/package/postext-cli): the command line: one self-contained executable for macOS, Linux and Windows (PDF, HTML, EPUB, page images, Word, bundles, checks) ## Documentation - [Introduction to Postext](https://postext.dev/en/docs/introduction.md): What Postext is, why it exists, and the problem it solves - [Postext Architecture](https://postext.dev/en/docs/architecture.md): Technical architecture of the Postext layout engine: its concepts, the document tree, rhythm, backends and performance - [Architecture: the layout pipeline](https://postext.dev/en/docs/architecture-layout-pipeline.md): The placement pass and its rounds: how the engine places lines, floats, notes and columns, and repeats until the layout settles - [Postext Configuration](https://postext.dev/en/docs/configuration.md): What a Postext configuration is, and where each group of settings is explained in the twenty pages of the reference - [Configuration: page and layout](https://postext.dev/en/docs/configuration-page-layout.md): The page size, margins and baseline grid, page numbering, and the columns and their gutters - [Configuration: headers and footers](https://postext.dev/en/docs/configuration-headers-footers.md): What 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 - [Configuration: body text](https://postext.dev/en/docs/configuration-text.md): The typography of the running text: font, size and leading, colours, indents, blockquotes, verse, tab stops and drop caps - [Configuration: hyphenation and language](https://postext.dev/en/docs/configuration-language.md): Hyphenation patterns and exceptions, ragged text, the document language and its digits and direction, and the scripts Postext sets - [Configuration: headings](https://postext.dev/en/docs/configuration-headings.md): Heading defaults, the overrides for each level, page breaks before a heading, page-wide chapter openers and numbers spelled out in words - [Configuration: widows, orphans and balancing](https://postext.dev/en/docs/configuration-page-flow.md): The rules that keep lines and blocks together across a column break, and the levers that make every column end level - [Configuration: lists and maths](https://postext.dev/en/docs/configuration-lists-math.md): Bulleted and numbered lists, their markers, indents and nesting, task lists, and the size, colour and spacing of mathematical formulas - [Configuration: notes and references](https://postext.dev/en/docs/configuration-notes-references.md): Footnotes, line numbers, cross-references and citations, the table of contents and the back-of-book index - [Configuration: East Asian typography](https://postext.dev/en/docs/configuration-east-asian.md): The cjk settings: line breaking, punctuation widths, spacing, the character grid, ruby and the marks of Chinese, Japanese and Korean text - [Configuration: resources and tables](https://postext.dev/en/docs/configuration-resources.md): Resource types and their numbering, table and caption styles, single-ink diagrams and printed videos - [Configuration: styles and parts](https://postext.dev/en/docs/configuration-styles.md): Named styles for paragraphs, chips, character styles, highlights, code listings and headings, and the pages that open each part - [Configuration: callout boxes](https://postext.dev/en/docs/configuration-callouts.md): Named 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 - [Configuration: exercises](https://postext.dev/en/docs/configuration-exercises.md): Exercise 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 - [Configuration: comics](https://postext.dev/en/docs/configuration-comics.md): The comics settings: the frame and gutters of comic pages, panel styles, lettering, balloon styles and the cast - [Configuration: composed pages](https://postext.dev/en/docs/configuration-composed-pages.md): Page 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 - [Configuration: fonts, colours and output](https://postext.dev/en/docs/configuration-fonts-colors-viewers.md): Units, colours and the palette, custom fonts, the HTML viewer, PDF and print production, the Folio viewer and the debug overlays - [Configuration: programmatic usage](https://postext.dev/en/docs/configuration-programmatic-usage.md): Calling Postext from code: buildDocument and its warnings, defaults, fonts, caches and the Web Worker - [Programmatic usage: PDF files](https://postext.dev/en/docs/configuration-pdf-output.md): postext-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 - [Programmatic usage: HTML, Folio, EPUB and SCORM](https://postext.dev/en/docs/configuration-html-folio-epub.md): The 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 - [Programmatic usage: .postext bundles](https://postext.dev/en/docs/configuration-bundles.md): How to open, lay out, render and create .postext files from code; bilingual bundles; files written by older versions; and the low-level API - [Hyphenation & Justification](https://postext.dev/en/docs/justification.md): How Postext breaks lines, justifies text, and controls word spacing using the Knuth-Plass algorithm - [Document Format](https://postext.dev/en/docs/document-format.md): The Markdown subset Postext parses: frontmatter, headings, lists and code blocks, what it ignores, and the rules for authoring source documents - [Document format: directives](https://postext.dev/en/docs/document-format-directives.md): The ::: directives: containers, columns, paper, page breaks, numbering, space, verse, contents and index, line breaks, and the markup of comic pages - [Document format: inline formatting and formulas](https://postext.dev/en/docs/document-format-inline.md): Marks inside a line: emphasis, links, chips, small capitals, tabs, vertical text, Chinese and Japanese marks, text direction, and LaTeX formulas - [Document format: notes and references](https://postext.dev/en/docs/document-format-notes-references.md): Footnotes, cross-references and anchors, citations and the bibliography, and the marks of the back-of-book index - [Document format: pictures and tables](https://postext.dev/en/docs/document-format-resources.md): Resources in the text: references and embeds, numbering, placement and where a float lands, text wrap, bitmap size, safe areas, comic anchors and symbols in captions - [Document format: videos](https://postext.dev/en/docs/document-format-videos.md): Video resources: YouTube, Vimeo, files of your own and HLS streams, what each output shows, the fields of a video, its poster and address, the players, the VDT and bundles, and videos that play on Folio's pages - [Chinese layout](https://postext.dev/en/docs/chinese-layout.md): How 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 - [Arabic layout](https://postext.dev/en/docs/arabic-layout.md): How 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 - [Japanese layout](https://postext.dev/en/docs/japanese-layout.md): How 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 - [Cyrillic layout](https://postext.dev/en/docs/cyrillic-layout.md): How Postext sets Russian, Ukrainian, Belarusian, Bulgarian, Serbian, Macedonian and the other languages written in Cyrillic: hyphenation, words kept together, dialogue, notes counted by page, table titles, letter numbering, number words, citations to GOST, sheet formats and spines - [Comics](https://postext.dev/en/docs/comics.md): How 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 - [Music notation](https://postext.dev/en/docs/music.md): How 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 - [Exercises](https://postext.dev/en/docs/exercises.md): How 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 - [Composed pages](https://postext.dev/en/docs/composed-pages.md): How 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 - [Composed pages: figures with labels](https://postext.dev/en/docs/composed-pages-figures.md): Figures 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 - [Special inks and die-cuts](https://postext.dev/en/docs/special-inks-die-cuts.md): Fifth inks, metallic and fluorescent inks, hot foil, opaque white and varnish as spot colours with a finish, and die-cuts: holes through one or more leaves, rounded corners and shaped books, the die line in the PDF, the preflight and how each viewer shows them - [Print covers](https://postext.dev/en/docs/print-covers.md): A book's print versions, each with its binding, ISBN and spine; binding and paper profiles from the printer; the cover sheet with its flaps, jacket, case and endpapers; the cover's design and finishes; its Markdown text; and the cover from the Sandbox, the command line and code - [Contributing to Postext](https://postext.dev/en/docs/contributing.md): How to join the Postext community and contribute to the project - [Sandbox](https://postext.dev/en/docs/sandbox.md): The Sandbox's interface: the activity bar and the Text, Books, Chapters, Resources and Fonts panels, and the layout on phones - [Sandbox: the Design and Checks panels](https://postext.dev/en/docs/sandbox-design-checks.md): The Design panel's groups, pages, search and summary, and the Checks panel's live warnings, grouped by kind - [Sandbox: composed pages](https://postext.dev/en/docs/sandbox-composed-pages.md): Editing 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 - [Sandbox: the previews](https://postext.dev/en/docs/sandbox-previews.md): The Canvas, PDF, Folio, HTML, EPUB 3 and SCORM tabs of the main viewport: what each shows and what it can do - [Sandbox: books, Word files and saving](https://postext.dev/en/docs/sandbox-books-saving.md): Books 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 - [Sandbox: agents, embedding and presets](https://postext.dev/en/docs/sandbox-embedding.md): WebMCP tools for AI agents, the PostextSandbox component in your own app with its props and CSS, and the preset bundle format - [Composed-page books](https://postext.dev/en/docs/composed-page-books.md): A 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 - [Moving a book to composed pages](https://postext.dev/en/docs/migrating-to-composed-pages.md): How 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 - [InDesign: import, export and porting](https://postext.dev/en/docs/indesign.md): The two ways to bring an InDesign book into Postext, the IDML importer that copies what the document holds and the agent skill that works out its layout rules, when to use each, and how the IDML exporter hands a book back to InDesign - [Agent skill: port a publication to Postext](https://postext.dev/en/docs/skill.md): Install 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 - [Command line: postext in a terminal, a script or an agent](https://postext.dev/en/docs/command-line.md): A 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, with Python and Rust packages that drive it from code - [WebMCP: an agent at work in the Sandbox](https://postext.dev/en/docs/webmcp.md): What an AI agent in the browser can do with the Sandbox through its 71 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 - [Integration: Postext inside a content system](https://postext.dev/en/docs/integration.md): What Postext gives a content management, editorial or review system, or a reading app, that shows laid-out pages: text geometry, anchors that survive revisions, annotation marks and an embeddable page viewer, and what it leaves to the host - [Integration: text on the page](https://postext.dev/en/docs/integration-geometry.md): rangeRects, caretRect, caretAt, wordAt, blockAt and wordRangeAt: where a range of the Markdown is painted on the laid-out pages, and which offset, word or block lies under a point, on justified, right-to-left, vertical and composed pages - [Integration: anchors and edits](https://postext.dev/en/docs/integration-anchors.md): textAnchor and resolveAnchor keep a comment on its words while the Markdown is rewritten (exact, moved, ambiguous, orphaned); applyEdits and mapOffset write corrections into the Markdown and carry the other anchors along - [Integration: annotation marks](https://postext.dev/en/docs/integration-marks.md): layoutAnnotations lays highlights, underlines, struck words, replacements between the lines, insertion carets, margin notes and boxes over the laid-out pages; paintAnnotations, annotationsSvg and annotationAt paint them and find them under a point - [Integration: the page viewer](https://postext.dev/en/docs/integration-viewer.md): postext-viewer: an embeddable viewer that shows the pages, reports selections and presses as Markdown ranges and offsets, paints annotation marks, gives the host layers over each page, and converts between page and screen coordinates; with a React component - [Integration: reading apps and other viewers](https://postext.dev/en/docs/integration-readers.md): The integration API in a reading app, an e-reader or a study platform: a highlighter that snaps to words and keeps its colours across editions, reader notes in the margin with a notebook, and the same marks in a viewer of your own ## Cookbook - [A book page on a baseline grid](https://postext.dev/en/cookbook/baseline-grid-book-page.md): A mirrored two-column page whose text block is exactly 44 leads tall, so the body text sits on one grid across the gutter and the spine. - [Newspaper front page](https://postext.dev/en/cookbook/newspaper-front-page.md): A local weekly's front page and page 2 in two ruled columns, with page-wide headlines set as boxes and a four-column strip of briefs floated to the foot. - [Community newsletter: lead story and briefs](https://postext.dev/en/cookbook/community-newsletter.md): A two-page allotment newsletter in column and a half: the lead fills the wide column and jumps to page 2; column breaks send tagged briefs to the narrow one. - [One-page CV with a sidebar](https://postext.dev/en/cookbook/cv-with-sidebar.md): A one-page A4 CV whose plum sidebar is one box in a float-only left column, carried into the margins by header boxes, with job dates set flush right. - [Business letter to DIN 5008](https://postext.dev/en/cookbook/din-business-letter.md): A two-page German quotation on A4. The subject line is the H1, and its design pins the letterhead, the address and the information block at form B’s positions. - [Research poster on one big page](https://postext.dev/en/cookbook/research-poster.md): A 600 × 800 mm conference poster: a title band over three columns of panels in one page-wide group, a heat map keyed by swatches and −4.2 °C at 150 pt. - [A vertical Chinese novel, bound on the right](https://postext.dev/en/cookbook/vertical-novel-right-bound.md): Chapter 1 of 三國演義 on a Taiwan 25開 page: 40 characters down 16 columns, a ruled 回目 opener, fore-edge heads, Chinese folios and spreads read right to left. - [Dates and acronyms upright in vertical text](https://postext.dev/en/cookbook/chinese-dates-upright.md): Two founding documents of 1912 set vertically, bound on the right: two-digit numbers stand upright in one cell unaided, and :tcy and :upright mark the rest. - [A Chinese official document to GB/T 9704](https://postext.dev/en/cookbook/chinese-official-document.md): A four-page notice on A4 to the national standard: 28 × 22 characters of 三号, a red letterhead, heads 一、(一)1.(1), an annex and “— 1 —” folios. - [Tang poems facing their English verse](https://postext.dev/en/cookbook/tang-poems-facing-english.md): Each Tang poem opens a tinted recto and Giles’s English the verso facing it: one heading style breaks to even pages, the other to odd ones. - [A vertical newspaper page in tiers](https://postext.dev/en/cookbook/vertical-newspaper-tiers.md): Two sheets of a 1912 Chinese paper set vertically: the body in two tiers with a rule between them, the telegrams in three, the lead headline down both. - [A woodblock leaf: double frame, rules and centre strip](https://postext.dev/en/cookbook/woodblock-leaf.md): Zhu Xi's commentary on the Analects set as a woodblock printed it: a leaf to a spread, a double frame, a rule between columns and the centre strip on the fold. - [A two-column Arabic newspaper page](https://postext.dev/en/cookbook/arabic-newspaper-two-columns.md): An Arabic daily in locale 'ar': the first column is the right one, headlines span both, and the In brief strip sets three columns right to left. - [A Bulaq page: the text framed by its commentary](https://postext.dev/en/cookbook/bulaq-framed-page.md): Ibn ʿAqīl’s grammar commentary in the main column, glosses in the outer side column beside the passages they explain, all inside a double ruled frame. - [A bunko novel set vertically, with furigana](https://postext.dev/en/cookbook/bunko-novel-furigana.md): Sōseki's Ten Nights of Dreams on an A6 bunko page: 38 characters down 15 lines, read from the right, readings beside the rare kanji, titles in three lines. - [A Japanese story in two tiers, its title across both](https://postext.dev/en/cookbook/two-tier-tankobon.md): Two Akutagawa stories in a collected works: two tiers of 25 characters down an A5 page, each title across both on an odd page, last pages left as they fall. - [A story on genkō yōshi, one character to a square](https://postext.dev/en/cookbook/genko-yoshi-manuscript.md): Botchan's opening on 400-square manuscript paper: a drawn 20 × 20 grid, a character or mark in every square, and any 、。 that cannot head a line hung below. - [A broadsheet on six columns](https://postext.dev/en/cookbook/broadsheet-six-columns.md): Four pages of a daily on a broadsheet: six ruled columns, photos and boxes across two to five of them, page-wide ads and an opinion page in five columns. - [An org chart and a photo grid built from modules](https://postext.dev/en/cookbook/org-chart-from-modules.md): A town hall's services guide set from modules: an org chart whose lines the template draws, and photo grids that repeat one card per building. - [Filling the column the widow rule left short](https://postext.dev/en/cookbook/filling-short-columns.md): Ragged magazine columns end on the grid: fillShortColumns sets a paragraph of a short column a line longer or shorter instead of leaving a hole at its foot. - [A Greek daily's front page in three columns](https://postext.dev/en/cookbook/greek-daily-front-page.md): A compact front page in Greek: a Didot nameplate, a headline in capitals without tonos, a three-line drop cap with a capital lead-in, and briefs at the foot. - [Two-column paper with numbered equations](https://postext.dev/en/cookbook/journal-article-with-maths.md): A two-column physics paper whose inline formulas and seven numbered equations are set by MathJax and stay vector in the PDF. - [Even word spacing in narrow justified columns](https://postext.dev/en/cookbook/justification-lab.md): Knuth–Plass breaking with word spaces held to 0.8–1.6 times normal, set beside a greedy control whose loose lines, lone lines and runts are marked from the VDT. - [Poems set line by line](https://postext.dev/en/cookbook/poetry-collection.md): Each poem is a :::verse block written as printed: the 1918 indents are leading spaces, turnovers hang 2 em past their line, blank lines part stanzas. - [Justified Spanish in a pocket novel](https://postext.dev/en/cookbook/spanish-pocket-novel.md): The opening of Marianela’s chapter I as a pocket edition: Spanish hyphenation, word spaces under 1.7×, no runts, a raised initial and Figura 1 on the map. - [Lab report: formulas, subscripts and a titration curve](https://postext.dev/en/cookbook/lab-report-formulas.md): A four-page chemistry report on A4 that marks formulas and units in the text with ~ and ^ and keeps TeX for the reaction and the equations. - [Facing translation, stanza by stanza](https://postext.dev/en/cookbook/bilingual-facing-verse.md): Each poem is a frameless box with two columns: a fixed column break opens the English at its title, and :::space keeps each stanza level with its original. - [Critical edition: line numbers and line-keyed notes](https://postext.dev/en/cookbook/critical-edition-line-numbers.md): Milton’s Lycidas in the 1645 text: lineNumbers prints every fifth line number in the side column, and each note opens on its line number, set as a chip. - [Early reader with syllable chips](https://postext.dev/en/cookbook/reading-primer-syllables.md): A primer unit on the letter M: the sounds of each word as chips in the colour of its vowel, and a grid of picture words with a watercolour in each cell. - [Screenplay format](https://postext.dev/en/cookbook/screenplay-format.md): A shooting script in Courier Prime 12 on US Letter, each speech a frameless callout padded to the dialogue block and each scene numbered in both margins. - [Shaped verse: Herbert’s Easter Wings, centred line by line](https://postext.dev/en/cookbook/shaped-verse.md): George Herbert’s Easter Wings and The Altar set as centred body text, a paragraph to each line of verse, so the lengths of the lines draw the two figures. - [A Chinese novel page on a 28 × 28 grid](https://postext.dev/en/cookbook/chinese-novel-horizontal.md): Lu Xun’s “My Old Home” on a 大32开 page: 28 characters to the line, 28 lines to the page, GB line breaks, Kaiming punctuation and Han–Latin spacing. - [A pinyin primer: readings over every character](https://postext.dev/en/cookbook/pinyin-primer.md): Mono ruby in a Hong Kong first reader: {人之初|rén zhī chū} centres one pinyin syllable over each character, in Andika, inside a 28 pt line gap. - [Proper-name and book-title marks, down and across](https://postext.dev/en/cookbook/proper-name-marks.md): The Basic Annals of Xiang Yu with :name and :book marks, set down a right-bound page and then across one: the lines stand left of the names, then under them. - [A vertical reader with zhuyin to the right](https://postext.dev/en/cookbook/zhuyin-vertical-reader.md): A Taiwan school reader set down the page: {守株|ㄕㄡˇ|ㄓㄨ} sets a zhuyin column right of each character, with pictures and notes in an upper tier. - [A Catalan novella, hyphenated by the IEC rules](https://postext.dev/en/cookbook/catalan-pocket-novella.md): Narcís Oller’s El transplantat, complete, as a 32-page pocket book: Catalan syllables by the IEC rules, l·l broken as il- | lusió, and an engraving per chapter. - [An Arabic novel set right to left, bound on the right](https://postext.dev/en/cookbook/arabic-novel-right-bound.md): The opening of an Arabic novel on a 14 × 21 cm page: locale 'ar' sets the text right to left, binds the book on the right and prints ١٢ for its folios. - [A bilingual Arabic–English report](https://postext.dev/en/cookbook/bilingual-arabic-english-report.md): An Arabic annual report with its English beside it: {dir=ltr} on each English block, :ltr[…] for Latin names in Arabic lines, a table set left to right. - [A Maghreb edition of an Arabic text, with European digits](https://postext.dev/en/cookbook/maghreb-edition-european-digits.md): An Arabic chapter printed for Morocco: locale 'ar-MA' keeps the text right to left and bound on the right, and writes every generated number as 1, 2, 3. - [A qasida on a diwan page, each line in two hemistichs](https://postext.dev/en/cookbook/qasida-diwan-page.md): One :::verse block sets al-Mutanabbī’s forty-six bayts in two columns of hemistichs, each half stretched with kashidas to one width. - [Fully vocalised classical prose with Qur'anic brackets](https://postext.dev/en/cookbook/vocalised-classical-prose.md): A maqāma with a vowel on every letter, set at twice its size in leading so the marks of one line never meet those of the next. - [A Japanese technical manual: kana, kanji and Latin](https://postext.dev/en/cookbook/japanese-technical-manual.md): A5 chapter of a Japanese programming book: JLReq line breaking and punctuation spacing, a quarter em between Japanese and Latin, code, 図3-1, page notes. - [Haiku and tanka set vertically](https://postext.dev/en/cookbook/haiku-and-tanka.md): Bashō's haiku inside his travel prose and eleven of Takuboku's three-line tanka down a 四六判 page: a verse per line, set in from the head, signatures at the foot. - [Kanbun with its reading marks, and the Japanese reading](https://postext.dev/en/cookbook/kanbun-kundoku.md): Three Analects sayings and a Tang quatrain as a Japanese reader sets them: return marks and okurigana in vermilion, and the reading in kana under each passage. - [A hiragana picture book, spaced by phrase](https://postext.dev/en/cookbook/hiragana-picture-book.md): A vertical picture book in hiragana with a space between phrases (wakachigaki): keep-all keeps each phrase whole, so lines break only at the spaces. - [A Meiji proclamation in kanji and katakana](https://postext.dev/en/cookbook/katakana-majiri-proclamation.md): The 1889 Constitution set vertically in kanji and katakana: articles 第一條 from a japanese-informal list counter, a ruled frame, countersignatures at the foot. - [Kanji numerals, counters and dates in vertical text](https://postext.dev/en/cookbook/kanji-numerals-and-dates.md): A vertical newsletter that writes each number as Japanese does: counted 百二十, positional 二〇二六, daiji 壱萬弐阡, counters (一) イ あ and 8月22日 upright. - [Japanese in Latin letters: Takuboku's Rōmaji Diary](https://postext.dev/en/cookbook/romaji-nikki.md): A rōmaji text tagged ja-Latn: Japanese rules for its kana, no hyphenation for its Latin, and the macrons of a Latin face carried into the PDF. - [Machine-learning paper with theorems and proofs](https://postext.dev/en/cookbook/ml-paper-theorems-proofs.md): The DPO paper re-set from arXiv: labelled equations numbered and linked, definition, lemma and theorem boxes, proofs that end in a square, Harvard citations. - [Old-style, lining and tabular figures](https://postext.dev/en/cookbook/old-style-and-tabular-figures.md): Thoreau's accounts from Walden: figureStyle sets lining figures in the small-capital headings and tabular ones in the accounts; the prose keeps old-style. - [Colour-coded highlights in a study reader](https://postext.dev/en/cookbook/colour-coded-study-highlights.md): A history reader whose key words carry three highlight colours (green for terms, amber for dates, blue for names) from three markStyles in the palette. - [An amendment with deletions struck and insertions underlined](https://postext.dev/en/cookbook/amendment-redline.md): A comparative print of a copyright act: deleted words struck through, new words underlined, then the amended text in a box whose clauses hang. - [Justified prose without stacked words at the line edges](https://postext.dev/en/cookbook/prose-without-stacks.md): One page of Dickens set twice in a narrow measure: the first proof reports and marks every stack, the second weighs them in the line breaker. - [Logic and set signs from a symbol font](https://postext.dev/en/cookbook/symbol-font-for-logic.md): A logic primer in faces with no ∀, ∈ or ℵ: symbolFont names Noto Sans Math, which draws those signs and the Greek on the canvas and in the PDF. - [Citations and statistics kept off the line edges](https://postext.dev/en/cookbook/clinical-paper-line-edges.md): A two-column clinical paper set twice: the first proof reports every citation or sign left at a line edge, the second prices those breaks in the line breaker. - [A Greek novel hyphenated in monotonic Greek](https://postext.dev/en/cookbook/monotonic-greek-novel.md): The first chapter of Theotokis's Honour and Money as a 13.5 × 20.5 cm novel: monotonic Greek patterns, «» quotes, and running heads in capitals without accents. - [Homer in polytonic Greek, facing its translation](https://postext.dev/en/cookbook/homer-polytonic-facing-translation.md): The opening of the Odyssey on the versos and Eftaliotis's modern Greek on the rectos, hyphenated with the grc patterns and numbered every fifth line. - [A Russian novel with notes counted by page](https://postext.dev/en/cookbook/russian-novel-notes-by-page.md): The first chapter of War and Peace on a 130 × 200 mm page: dialogue dashes, Tolstoy's translations of the French under asterisks, and words kept together. - [Mayakovsky's stepped verse, typed and set](https://postext.dev/en/cookbook/stepped-verse-lesenka.md): A whole Mayakovsky poem of 1929 in four red and black pages: every step typed with a plus sign, numbered by tens, and a closing sentence in a red field. - [Ukrainian poems in a gift edition of the Kobzar](https://postext.dev/en/cookbook/kobzar-ukrainian-poems.md): Three poems by Shevchenko at 130 × 200 mm: centred stanzas, asterisk notes by page, dates underneath and cross-stitch bands drawn in code. - [Twelve Cyrillic languages in one type specimen](https://postext.dev/en/cookbook/cyrillic-specimen-twelve-languages.md): A four-page type specimen: one article in twelve Cyrillic languages, each divided by its own patterns and drawn with its own local letterforms. - [Chapter opener on a full-bleed band](https://postext.dev/en/cookbook/chapter-opener-bleed-band.md): An advancedDesign opener on the level-1 heading: a bleed band, the chapter number on its foot, and a kicker and standfirst from the heading's attributes. - [Magazine feature: photo opener to end mark](https://postext.dev/en/cookbook/magazine-feature-opener.md): One advancedDesign opener sets a bleed photo and the heading's kicker, headline, standfirst and byline; two floated boxes and a chip end mark follow. - [Five chapter openers in one book](https://postext.dev/en/cookbook/five-chapter-openers.md): One opener on level 1 and four heading styles named in the Markdown; each style swaps the accent colour, and some also change the margins, columns or folios. - [Section heads seven levels deep](https://postext.dev/en/cookbook/section-heads-field-manual.md): Sections numbered 1.1 to 1.12 in an amber pill that widens with its number, four more levels beneath them, and a seventh made with a heading style. - [Anchoring cheat sheet: a poster built from chained elements](https://postext.dev/en/cookbook/anchoring-cheat-sheet.md): An A3 lecture poster whose elements hang from the bleed, the page, their slot or one another, and a second sheet that frames each element and tags thirteen. - [Side heads, hanging numbers and run-in heads](https://postext.dev/en/cookbook/side-heads-hanging-numbers.md): A competition brief whose section titles stand in a margin channel on the text's baselines, with subsection numbers hung in the gutter and run-in heads in red. - [Certificate with a guilloche border](https://postext.dev/en/cookbook/certificate-single-page.md): End-of-course certificates drawn by one heading style: a guilloche frame in its header, a seal and signature lines in its footer, the name in its opener. - [Letters edition: datelines and signatures](https://postext.dev/en/cookbook/letters-edition.md): Letters run on without page breaks; each dateline comes from heading attributes, and paragraph styles set the salutation, the signature and a postscript. - [Pocket classic: short chapters that run on](https://postext.dev/en/cookbook/short-chapters-run-on.md): Dom Casmurro as a pocket book: short chapters run on under heads drawn in the column, and no page break strands a line or a head. - [Storybook chapters with vignettes and summaries](https://postext.dev/en/cookbook/storybook-chapter-vignettes.md): One heading style opens every chapter; each heading names its vignette and its italic summary in attributes, which the opener paints. - [Tale headings in Arabic ordinal words: the first night…](https://postext.dev/en/cookbook/nights-ordinal-headings.md): A level template writes each night as الليلة and a feminine ordinal, الليلة الأولى, الثانية, الثالثة, so the Markdown never carries a number. - [Running heads by parity in a book of essays](https://postext.dev/en/cookbook/running-heads-by-parity.md): Header elements filtered by parity and page role: book title on versos, essay title cut short on rectos, folio tabs in the margin, a drop folio on openers. - [Dictionary with a moving thumb index](https://postext.dev/en/cookbook/dictionary-thumb-index.md): A loop makes one heading style per letter, and each style’s footer prints that letter’s navy tab one step lower on the fore-edge, over a pale index. - [A Chinese dictionary page with guide words](https://postext.dev/en/cookbook/chinese-dictionary-page.md): Four pages of a Kangxi Dictionary reader in pinyin order: {firstMark.h2} and {lastMark.h2} print each page’s first and last headword in its running head. - [Walking guide with thumb tabs](https://postext.dev/en/cookbook/walking-guide-thumb-tabs.md): A pocket guide with one heading style per walk, whose palette recolours the fore-edge tab, the stop numbers, the box’s tint and the blank verso before the walk. - [Front matter in roman folios, then page 1](https://postext.dev/en/cookbook/front-matter-roman-to-arabic.md): The cover and prelims are unnumbered headings counted in lower-case roman; :::numbering restarts the count at 1 on the recto where the novel opens. - [One book from separate chapters](https://postext.dev/en/cookbook/book-from-chapters.md): buildBundle sets five Markdown files as one book: each chapter opens on a recto, and page, chapter and figure numbers run on from file to file. - [Parts in colour from one attribute](https://postext.dev/en/cookbook/parts-in-colour.md): A pocket field guide where each :::part sets one palette entry, and its divider, painted verso, thumb tabs, field marks and contents row print in that colour. - [Anthology with bylines](https://postext.dev/en/cookbook/anthology-with-bylines.md): Three essays on walking whose headings carry author, year and magazine: the opener prints all three; the verso running heads and the contents print the author. - [Thesis back matter: appendix, glossary and index](https://postext.dev/en/cookbook/thesis-back-matter.md): The last pages of a thesis in black and white: a lettered appendix, a two-column glossary, APA references and an index built from marks in the text. - [A textbook index that follows the text](https://postext.dev/en/cookbook/back-of-book-index.md): Terms marked where the text discusses them, printed by :::index in two columns with the pages buildBundle finds for them, ranges and cross-references. - [An index of names and an index of subjects](https://postext.dev/en/cookbook/names-and-subjects-indexes.md): Marks with index="names" feed an index of people and the rest an index of subjects; :::index prints each in two columns, and the build settles the pages. - [An index of Chinese names, by pinyin and by strokes](https://postext.dev/en/cookbook/chinese-name-index.md): One set of :index marks in two editions of a 紅樓夢 reader: index.groupBy files the names under pinyin initials in zh-Hans and under stroke counts in zh-Hant. - [A thesis chapter cited in APA 7](https://postext.dev/en/cookbook/apa-thesis-with-bibtex.md): A doctoral chapter whose [@key, p. 33] citations become APA 7 through citeproc-js, with the reference list built from a BibTeX block. - [A two-column conference paper in IEEE style](https://postext.dev/en/cookbook/ieee-conference-paper.md): A workshop paper in two columns: a title block across the page, IEEE citations with [2]–[4] ranges, Section II references and a compact numbered list. - [A history essay with Chicago notes](https://postext.dev/en/cookbook/history-essay-chicago-notes.md): A four-page history essay whose [@key, 87] citations become Chicago notes at the foot of the page: full the first time, short after that, with a bibliography. - [A Chinese paper cited to GB/T 7714](https://postext.dev/en/cookbook/gbt7714-chinese-paper.md): A two-column Chinese journal article: [@key] citations print as superscript [1] and [2–4], the references carry [M], [J], [D] and [EB/OL]. - [Vertical Chinese with citations in inline notes](https://postext.dev/en/cookbook/vertical-book-with-jiazhu-citations.md): A vertical chapter in Traditional characters, bound on the right, whose GB/T 7714 note citations are set as 夾注 inside the column. - [A manual whose references point to pages](https://postext.dev/en/cookbook/manual-see-page-references.md): A bicycle owner's manual whose cross-references say "see section 3.2 on page 3", forward and back, with every number and page taken from the layout. - [One text in four citation styles](https://postext.dev/en/cookbook/one-text-four-citation-styles.md): One short essay with six citations, built in APA 7, Chicago author-date, IEEE and ISO 690: the style setting is the only thing that changes. - [A technical book whose references cross chapters](https://postext.dev/en/cookbook/technical-book-crossref-chapters.md): A three-chapter solar handbook whose text writes @fig:sun, @tbl:loads and @sec:array-size, and buildBundle prints each number and page across chapters. - [A medical article in Vancouver style](https://postext.dev/en/cookbook/medical-article-vancouver.md): A clinical trial report on A4 in two columns: raised citation numbers, a numbered Vancouver reference list and DOIs that open as links in the PDF. - [A humanities essay with MLA works cited](https://postext.dev/en/cookbook/mla-humanities-essay.md): A literary essay whose [@key, 48] citations become MLA 9 author-page references, with a block quotation and a Works Cited list built from BibTeX data. - [A reading list from a Zotero BibTeX export](https://postext.dev/en/cookbook/zotero-bibtex-nocite.md): A seminar reading list whose references are a Zotero BibTeX export pasted as is, cited in Chicago author-date, with nocite for works the text never cites. - [An edited volume with a bibliography per chapter](https://postext.dev/en/cookbook/edited-volume-chapter-bibliographies.md): Three essays by three contributors, each a document of its own in buildBundle, each closing on a Chicago author-date list of only the works it cites. - [A legal opinion cited in OSCOLA](https://postext.dev/en/cookbook/legal-opinion-oscola.md): A four-page case comment whose [@robinson2018, para 21] citations become OSCOLA footnotes: cases in italics, neutral citations, ibid and (n 1) cross-references. - [An Arabic research article with notes, citations, index](https://postext.dev/en/cookbook/arabic-research-article.md): An Arabic journal article: notes «(١)» numbered per page, CSL citations among them in the Arabic locale, and an index sorted without the article ال. - [A taḥqīq: notes per page and abjad front matter](https://postext.dev/en/cookbook/tahqiq-critical-edition.md): Front matter folioed أ ب ج د, the text from ١, the editor’s notes numbered (١) again on every page, and an index that sorts names without their article ال. - [A Japanese research paper cited to SIST 02](https://postext.dev/en/cookbook/sist02-research-paper.md): A two-column A4 research note in Japanese: [@key] citations numbered (1), (2, 3) to SIST 02, a 参考文献 list in Japanese, page notes, 表1 and 図1. - [A Japanese index in gojūon order, by reading](https://postext.dev/en/cookbook/gojuon-index.md): A chapter on Japanese typesetting terms and its index: each mark gives its reading by furigana or yomi, and the entries file under あ行, か行, さ行 in JIS order. - [A gallery guide whose links print as QR codes](https://postext.dev/en/cookbook/museum-guide-qr-link-notes.md): A pocket museum walk whose web links print as numbered notes at the page foot, each with a short address and a QR code, from links.print set to notes. - [Appendices in two columns of smaller type](https://postext.dev/en/cookbook/appendices-in-two-columns.md): A growers' handbook set in one column whose appendices change design: a part names a chapter style, one appendix names its own, and the afterword goes back. - [Footnotes at the foot of the column that cites them](https://postext.dev/en/cookbook/novel-footnotes-column-foot.md): Markdown [^id] markers become numbered notes at the foot of the citing column, with switches for one column, chapter-end notes and continuous numbers. - [Endnotes on a page of their own, in two columns](https://postext.dev/en/cookbook/endnotes-instead-of-footnotes.md): A short preprocessor numbers the [^1] notes and gathers them under a Notes heading, whose style sets them on a page of their own in two columns. - [Boxes that split, float and pin](https://postext.dev/en/cookbook/boxes-split-float-pin.md): A lab worksheet in which the procedure box splits between two columns, the data sheet moves to the head of the next page and a badge is pinned to the foot. - [Worksheet with answer boxes and a word bank](https://postext.dev/en/cookbook/worksheet-answer-boxes.md): A four-page science worksheet: white answer boxes in pale green cards, 2 mm under each question and off the grid, with word banks and blanks made of chips. - [Annotated classic with margin glosses](https://postext.dev/en/cookbook/annotated-classic-glosses.md): Alice’s mad tea-party as an annotated edition: green and red glosses in the outer margin, beside the lines they explain, each called by a letter in its colour. - [Recipe card: ingredients beside the method](https://postext.dev/en/cookbook/recipe-card.md): Two cookbook pages with a white recipe card under a SERVES 4 tab: ingredients, tags and a checklist on the left, steps with 26 pt red numbers on the right. - [Code listings and keycaps](https://postext.dev/en/cookbook/code-listings-and-keycaps.md): A shell guide whose fenced code is set as dark listing boxes, coloured by token, with keys set as keycap chips. - [Exam paper with an answer sheet](https://postext.dev/en/cookbook/exam-paper.md): A four-page history exam on US Letter: bubbles and marks as chips, marks on a tab stop, questions numbered 1, a), i) and answer lines ruled by a table. - [Product manual with safety notices](https://postext.dev/en/cookbook/product-manual-warnings.md): A German kettle manual whose WARNUNG and VORSICHT boxes carry the warning triangle on a signal-coloured band, with German figure and table labels. - [Red-ink commentary in the line and the head margin](https://postext.dev/en/cookbook/red-ink-commentary.md): A vertical Chinese commentary page: the manuscript's side comments folded into two red rows inside the line, head-margin comments in a tier above the text. - [Notes beside a vertical Japanese text, across the spread](https://postext.dev/en/cookbook/vertical-notes-and-sidenotes.md): The first chapter of Ichiyō's Child's Play with seven notes as 傍注: (1) at the right of the line, the notes of both pages at the fore-edge of the left-hand page. - [An AI preprint with prompt exemplars in boxes](https://postext.dev/en/cookbook/ai-preprint-prompt-exemplars.md): The chain-of-thought paper re-set: prompts and model outputs in tabbed boxes side by side, author–year citations from BibTeX, charts drawn from its tables. - [MEI music examples with a critical apparatus in the notes](https://postext.dev/en/cookbook/musicology-mei-apparatus.md): MEI 5 fences engraved in the text at a 5 mm staff, variants encoded as app, lem and rdg, and the apparatus keyed by bar and note in footnotes. - [Figures that float to where you cite them](https://postext.dev/en/cookbook/figures-float-where-cited.md): A two-column chapter with seven numbered figures: six float from their first :ref to the first slot their placement allows; one sits where ::resource puts it. - [Catalogue entries facing their plates](https://postext.dev/en/cookbook/catalogue-facing-plates.md): Each entry opens a verso and cites its plate in the commentary’s first sentence; the plate floats to the facing recto, scaled to fill the text block. - [Two-ink riso zine: art in one spot colour](https://postext.dev/en/cookbook/riso-zine-single-ink.md): A four-page zine for a two-drum risograph: full-colour drawings print as tints of the pink, recoloured by the engine on the canvas and in the PDF. - [Atlas sheet: numbered maps and a rotated overview](https://postext.dev/en/cookbook/atlas-map-sheet.md): Maps with a numbering of their own and captions on a blue bar, a key of swatches in the maps' colours, and a sea chart turned sideways on page 3. - [Photo essay with full-bleed plates](https://postext.dev/en/cookbook/photo-essay-full-bleed.md): Plates as heading styles built from a list, each filling its page to the trim; the storm plate runs across the gutter of a spread in two halves. - [Photos that grow to fill a short column](https://postext.dev/en/cookbook/photos-fill-short-columns.md): Each photo marks a safe area; column balancing may crop outside it to set the photo taller, so a column left short by a heading or a float ends flush. - [A film club programme with QR codes on the posters](https://postext.dev/en/cookbook/film-club-video-qr.md): Each film is a video resource whose poster prints with a play mark and a QR code that opens it on YouTube; in the PDF the poster is a link too. - [Magazine feature on a three-column grid](https://postext.dev/en/cookbook/magazine-three-column-feature.md): layoutType 'multiple' cuts the page into three columns; placement.columns sets photos and a floated pull quote across two of them, or across all three. - [A physics letter with a data figure across the top](https://postext.dev/en/cookbook/physics-letter-two-columns.md): The GW150914 discovery letter re-set in two columns: strain data redrawn from open data across page 1, [1]-style citations, numbered maths and Table I. - [A clinical trial report with a CONSORT diagram](https://postext.dev/en/cookbook/clinical-trial-consort-flow.md): A real trial report, abridged: structured abstract across the page, a CONSORT flow drawn in code from its numbers, aligned tables, APA citations. - [Numbered chorale examples in a two-column harmony method](https://postext.dev/en/cookbook/conservatory-method-chorales.md): Four-part chorales written in Humdrum **kern become score resources typed example: numbered Example 4.1, cited with :ref and floated like figures. - [A piano score from MusicXML over several pages](https://postext.dev/en/cookbook/piano-score-from-musicxml.md): Two keyboard menuets engraved from MusicXML files in a grand staff, broken between systems so each piece runs across a spread, with a score style for players. - [Art plates to the margins, the trim and the bleed](https://postext.dev/en/cookbook/art-plates-to-the-bleed.md): An exhibition essay on four Vermeer interiors: each painting a full-page plate inside the margins, to the trim or to the bleed, and a detail printed 60 mm wide. - [Datasheet: tables from data, merged headers](https://postext.dev/en/cookbook/technical-datasheet.md): Tables pasted as TSV, parsed with parseTSV and shaped with mergeCells, setAlignment and setCellBackground; a register map that splits across pages by itself. - [Garden almanac: calendar grid and landscape chart](https://postext.dev/en/cookbook/garden-almanac.md): A 38-crop sowing chart set in landscape on two pages of its own, a calendar computed from dates and a companion matrix, their cells filled from the palette. - [Mail-order catalogue with pictures in cells](https://postext.dev/en/cookbook/seed-catalogue.md): A seed catalogue whose price list is a table read from TSV, with a painted seed packet in each variety's cell and the list split across a spread. - [Bistro menu: prices on a tab stop](https://postext.dev/en/cookbook/bistro-menu.md): A two-sided bistro menu: prices set flush right on a tab stop, wines in a borderless table, and a brass rule anchored to either side of each course head. - [Conference programme with a merged schedule grid](https://postext.dev/en/cookbook/conference-programme.md): A two-day programme in schedule grids: mergeCells spans a plenary across the three rooms and a workshop over two slots, and each talk takes its track's colour. - [Puzzle book: crossword, word search and maze](https://postext.dev/en/cookbook/puzzle-book.md): A crossword and a word search built as tables from lines of letters: black squares and found words are cell fills, clue numbers are superscripts. - [A metascience essay in English and Spanish](https://postext.dev/en/cookbook/bilingual-metascience-essay.md): Ioannidis's 2005 essay re-set from one script in two editions, with formulas in the text and in the table cells, and Figure 1 drawn from its equation. - [Magazine cover and sectioned contents](https://postext.dev/en/cookbook/magazine-cover-and-contents.md): A photo cover whose cover lines hang below the masthead, and contents generated with a coloured row per section. Each section is a part that opens no page. - [Annual report with flush columns](https://postext.dev/en/cookbook/annual-report-flush-columns.md): An energy co-op's annual report in two justified columns that end on the same grid line, with a key-figures box across the page and a closing page cut level. - [Trade paperback: sunk openers and recto chapters](https://postext.dev/en/cookbook/trade-paperback-novel.md): The Awakening as a 140 × 216 mm trade paperback: a painted cover and a colophon with no running heads, then chapters sunk on rectos under an italic numeral. - [Play script: cast list, speakers and stage directions](https://postext.dev/en/cookbook/stage-play.md): Wilde’s play as an acting edition: names in bold plum, directions in grey italic, and a cast list with a row of dots to each actor on a tab stop. - [A business section on salmon newsprint](https://postext.dev/en/cookbook/business-section-on-salmon.md): An eight-page Berliner daily whose Business pages take one heading style: salmon paper, six columns, a petrol accent and a :::paper run for Folio. - [A protein paper with a Methods section](https://postext.dev/en/cookbook/protein-paper-methods-section.md): The AlphaFold paper re-set on A4: a bold summary across the page, Nature superscripts, and Methods in smaller type whose citations number on from the text. - [A weekly bulletin report: the first AIDS reports](https://postext.dev/en/cookbook/outbreak-report-bulletin.md): Two 1981 CDC reports re-set as a US Letter bulletin: a masthead, case histories with run-in labels, Reported by and Editorial Note styles, numbered references. - [A magazine feature threaded through frames](https://postext.dev/en/cookbook/magazine-threaded-frames.md): A composed spread whose two columns are chained with next, then go on through overflow.continueIn to pages it adds, round a pull quote and a cut-out. - [A songbook with melody, words and chords](https://postext.dev/en/cookbook/songbook-melody-words-chords.md): Each song is an ABC fence: the melody, chord names over the staff and the first verse under the notes, engraved at the column's width by one score style. - [Abai and five poets of the steppe, a Kazakh anthology](https://postext.dev/en/cookbook/abai-kazakh-anthology.md): An eight-page anthology in six Cyrillic languages: a Kazakh book, a poem per language, glosses at the foot of the page and felt-rug ornament. - [One source, print and screen editions](https://postext.dev/en/cookbook/print-and-screen-editions.md): Both editions come from one config: htmlViewer.overrides holds the dark screen design, and applyHtmlViewerOverrides merges it in before each HTML build. - [From a Markdown string to a designed page](https://postext.dev/en/cookbook/first-page-from-markdown.md): A Markdown string with frontmatter is set as two-column magazine pages and painted on canvas, with six named colours in place of the default blue. - [Print-ready PDF: bleed, crop marks and PDF/X](https://postext.dev/en/cookbook/print-ready-pdf.md): An exhibition leaflet with 3 mm of bleed and crop marks, exported as PDF/X-4 on FOGRA51 with print masters and a clean preflight. - [A real PDF with the same fonts embedded](https://postext.dev/en/cookbook/pdf-with-embedded-fonts.md): A recital programme exported to PDF. Each face is fetched once, for FontFace and for the PDF, and each heading becomes a bookmark. - [Type specimen with every font loaded before layout](https://postext.dev/en/cookbook/fonts-before-layout.md): A four-page type specimen built once too early, as evidence, and then with every face its config and text ask for loaded before a line is measured. - [Accessible tagged PDF (PDF/UA)](https://postext.dev/en/cookbook/accessible-tagged-pdf.md): A recycling guide exported as a tagged PDF/UA-1 file with alt text, table header cells, its language and linked contents; the preview draws the tags on page 3. - [Brand fonts in layout, PDF and bundle](https://postext.dev/en/cookbook/brand-fonts-identity-manual.md): A fictional metro's identity manual set in the brand's own font files, fetched once and reused by the layout, the PDF's font provider and a .postext bundle. - [.postext round trip in two languages](https://postext.dev/en/cookbook/bundle-round-trip.md): A two-sided DL leaflet written to a .postext file in code and laid out again from its bytes, with the faces, drawings and caption labels each edition carries. - [Retint a whole document from one palette](https://postext.dev/en/cookbook/live-palette-retint.md): Each colour in the config links to a palette entry, so swapping the palette sets a festival programme in red, teal, violet or sand. - [A galley proof with every fault marked in red](https://postext.dev/en/cookbook/proof-sheet-diagnostics.md): A newspaper galley proofed twice, with every fault the engine reports or the pen finds itself marked in red on the page and linked to its Markdown. - [Live editor with layout in a Web Worker](https://postext.dev/en/cookbook/web-worker-live-editor.md): Markdown beside a pocket page: a Web Worker sets the chapter with its own fonts, and each keystroke cancels the build in flight. - [A laid-out book on the desk, in 3D](https://postext.dev/en/cookbook/folio-book-on-a-desk.md): createFolioFromDocument from the postext-folio package opens a laid-out chapter as a cloth-bound book on a walnut desk, styled by config.folio. - [A swatch book, every leaf on its own paper](https://postext.dev/en/cookbook/paper-swatch-book.md): Each leaf of a paper merchant's stock book sits in a :::paper fence, and postext-folio draws it with that stock's shade, weight, surface and stiffness. - [A stapled zine with a card cover sheet](https://postext.dev/en/cookbook/saddle-stitched-card-cover.md): Two :::paper fences put a salmon card on the outer sheet of an eight-page zine, and postext-folio shows it saddle-stitched round newsprint pages. - [A bench for the Folio viewer's settings](https://postext.dev/en/cookbook/folio-settings-bench.md): A form of every config.folio setting drives one postext-folio viewer through setAppearance: paper, binding, covers, desk, light and tilt change in place. - [One book, two EPUB 3 files: fixed and reflowable](https://postext.dev/en/cookbook/epub-fixed-and-reflowable.md): renderToEpub from postext-epub writes the chapters buildBundle laid out as a fixed-layout EPUB and a reflowable one; readEpub lists what each file holds. - [A lab sheet whose clips play on screen and in the EPUB](https://postext.dev/en/cookbook/pendulum-lab-video-players.md): Two video resources with their own MP4 files: print sets each as its first frame with a QR code, renderToHtml and postext-epub play the files. - [A living newspaper whose pictures move](https://postext.dev/en/cookbook/living-newspaper-video-loops.md): Six video resources set as press photographs on a four-column tabloid; autoplay, loop and exclusive: false make the clips play together in Folio. - [One design for three language editions](https://postext.dev/en/cookbook/shared-design-per-language.md): One booklet in English, Spanish and Arabic from a single set of general settings, with an override for what belongs to each language: faces, sizes, tracking. - [A course module with a test answered on screen](https://postext.dev/en/cookbook/self-checking-course-module.md): Two exercise styles from one Markdown: practice checked at will, a test with one check and no retry; answered in HTML and EPUB, graded in a SCORM course. - [A printed order form that is also a fillable PDF](https://postext.dev/en/cookbook/fillable-order-form.md): A seed list whose quantity boxes are PDF form fields: each line total, the five subtotals and the amount to pay add themselves up in a PDF reader. - [A peek-a-boo board book with holes in register](https://postext.dev/en/cookbook/peek-a-boo-board-book.md): Four die-cut holes, placed with dieCuts where the next painting's telling part lies, a window that steps down to a smaller hole, rounded corners and a die line. - [A window cover that frames the title page](https://postext.dev/en/cookbook/die-cut-window-cover.md): An oval window cut through the cover with dieCuts, measured on the title-page painting so its edge falls on the gilt frame, plus the die line on its own plate. - [A tunnel book twenty leaves deep](https://postext.dev/en/cookbook/forest-tunnel-book.md): Nineteen round windows cut with dieCuts, each smaller than the last on one axis, so the cover looks through twenty painted planes of a wood to a deer at a pool. - [A paperback cover with flaps, its spine from the pages](https://postext.dev/en/cookbook/paperback-cover-with-flaps.md): A 120 × 190 mm paperback with 60 mm flaps: the pages are laid out first, and buildCover makes the cover sheet from them, with a spine as thick as their paper. - [A hardcover's case, dust jacket and endpapers](https://postext.dev/en/cookbook/hardcover-jacket-and-endpapers.md): The pages of a paperback bound again as a cloth hardcover: a second version with its own ISBN, and buildCover makes the case, the jacket and both endpapers. - [A volume of a collection, the series on its endpapers](https://postext.dev/en/cookbook/collection-volume-endpapers.md): Volume XI of a twelve-volume hardcover series: two ISBNs by the barcode, a case design shared by every volume, and endpapers that show the whole collection. - [A cover in gold foil, spot varnish and emboss](https://postext.dev/en/cookbook/cover-foil-varnish-emboss.md): A paperback of Manrique's Coplas with spot gloss over the painting, a foil cartouche on an embossed panel and a blind emboss, each on its own plate. - [Cover text boxes anchored, chained and grown](https://postext.dev/en/cookbook/cover-text-boxes-anchored.md): A paperback of two Poe tales whose cover is set from six text boxes hung from the panels and from each other, a title that grows and a blurb that runs on. - [Gold foil on a deep-blue cover](https://postext.dev/en/cookbook/gold-foil-poetry-cover.md): Gold foil as a spot colour with a foil finish: its own plate in the PDF, light in Folio, and blue card and cream paper that print no ink. - [A fifth ink for the corporate colour](https://postext.dev/en/cookbook/corporate-fifth-ink-report.md): Process colour plus one exact corporate Pantone: the ink table gathers every name the blue goes by onto one plate, PANTONE 286 C. - [A zine in black and fluorescent pink](https://postext.dev/en/cookbook/fluorescent-pink-zine.md): A two-plate job, black and a fluorescent pink: duotone photographs, black that overprints, and a pink that glows in Folio. - [A bakery menu in white ink on kraft](https://postext.dev/en/cookbook/white-ink-kraft-menu.md): Opaque white as a spot ink on kraft: white type on the brown card, a white card under brown type, and white knocked out of a green panel. - [Spot gloss over a soft-touch magazine](https://postext.dev/en/cookbook/spot-uv-photo-magazine.md): Two varnishes as spot inks: soft touch over every page, a gloss over the photographs and the masthead, shown in Folio and the finish views. - [A KDP paperback cover with its proof and listing](https://postext.dev/en/cookbook/kdp-paperback-cover-wrap.md): Pepita Jiménez as a 6 × 9 in KDP paperback on cream paper: the wrap at KDP's measures, a proof with guides, the calculator's figures, the listing checked. - [One cover for KDP, IngramSpark and Lulu](https://postext.dev/en/cookbook/one-cover-three-printers.md): Marianela with one cover design built three times, as a KDP hardcover, an IngramSpark paperback and a Lulu casewrap, each at its printer's spine and wrap. - [One set of panels, three page splits](https://postext.dev/en/cookbook/comic-page-splitters.md): Five comic panels laid out under three split trees: the split attribute of :::page cuts the page, and each picture's safe area keeps its subject in any cell. - [Every kind of balloon on a lighthouse page](https://postext.dev/en/cookbook/balloon-kinds.md): One comic page with speech, thought, whisper, shout, radio, caption, inner voice, editor's note and sound effects, each named in braces on its script line. - [A daily strip and a Sunday half page in the newspaper](https://postext.dev/en/cookbook/newspaper-daily-strip.md): A newspaper's comics pull-out: a Sunday half page set in the text of the cover and a four-panel daily strip set across a four-column page, under its article. - [A splash page, an inset and a broken border](https://postext.dev/en/cookbook/splash-inset-broken-border.md): A storm in two comic pages: a full-bleed splash under an inset panel, a tier bled off three edges, a gull flying out over its border, a captions-only panel. - [A comic EPUB read panel by panel](https://postext.dev/en/cookbook/comic-epub-guided-view.md): One short comic exported as a PDF, a fixed-layout EPUB with region-based navigation for panel-by-panel reading, a Kindle Panel View EPUB and a reflowable EPUB. - [Manga read right to left, lettered vertically](https://postext.dev/en/cookbook/manga-right-to-left.md): Two manga pages drawn for right-to-left reading: artDirection rtl keeps the panel order in every edition, and the Japanese balloons are set in columns. - [An action page with slanted gutters](https://postext.dev/en/cookbook/manga-action-slants.md): The page that decides a kendo final: slanted gutters (40~55) in the split, a borderless strike panel, and ドン kept in Japanese under a small translation. - [Two yonkoma strips on a page](https://postext.dev/en/cookbook/yonkoma.md): A page of four-panel gag strips: two columns of four panels, the right strip read first, each strip titled in a black box in its first panel. - [An album page in clear line, with narration captions](https://postext.dev/en/cookbook/tebeo-album-page.md): A Franco-Belgian album page in four tiers: square frames, yellow narration boxes in the corners, balloons lettered in mixed case, all from the comics config. - [One page lettered in six languages](https://postext.dev/en/cookbook/one-page-six-languages.md): One comic page, split and pictures fixed, lettered per language: the locale picks the face; Japanese runs vertical and, like Arabic, reads from the right. - [One comic page across a double spread](https://postext.dev/en/cookbook/comic-double-spread.md): A :::page with the spread flag lays one split tree over two facing pages: a panorama crosses the spine, and the tier below splits on the fold. - [A Pepper&Carrot page re-lettered from its transcript](https://postext.dev/en/cookbook/pepper-and-carrot-page.md): Two pages of Pepper&Carrot (CC BY 4.0) set again from David Revoy’s text-free art and the official translations, every balloon lettered in ten languages. - [Textbook with a margin column](https://postext.dev/en/cookbook/textbook-margin-column.md): A column-and-a-half page whose outer column holds only floats: span 'side' figures and glosses stack there, and captionSide moves the other captions into it. - [A colour-coded family of textbook boxes](https://postext.dev/en/cookbook/textbook-box-family.md): Six kinds of textbook box in three colours, told apart by a stripe with an icon, a badge, a numbered tab, a strip of pictograms or a marker outside the frame. - [A school reader with furigana over every kanji](https://postext.dev/en/cookbook/jukugo-furigana-textbook.md): Niimi Nankichi’s “Gon the Fox” on a reader page: per-character, word and jukugo furigana, spaced 1:2:1 and running onto kana but never onto kanji. - [An illustrated timeline across a double page](https://postext.dev/en/cookbook/illustrated-timeline-spread.md): A spread template lays a textbook timeline over two pages: a band across the spine, a grid that repeats a card per date, a connector to every card. - [A school atlas labelled from the Markdown](https://postext.dev/en/cookbook/school-atlas-labelled-maps.md): Maps painted without a letter, named by ::label lines at the anchors of each resource, on composed pages and a double-page spread, in three languages. - [Activity book with boxes that grow](https://postext.dev/en/cookbook/activity-book-growing-boxes.md): A science activity book on page templates: boxes in a stack grow with their text, answer lines sit on empty frames, a project goes on overleaf. - [A children's textbook unit in ten languages](https://postext.dev/en/cookbook/children-textbook-pages.md): Nine pages of a Year 3 unit in ten languages, right to left in Arabic and vertical in Chinese and Japanese: coloured spreads, growing boxes, a labelled map. - [Handwriting workbook in ten scripts](https://postext.dev/en/cookbook/handwriting-workbook.md): A first handwriting book in every site language: each country's school script on its own ruling, a model, dotted letters to trace and empty rows. - [A harmony textbook with music examples in ABC](https://postext.dev/en/cookbook/harmony-textbook-abc-examples.md): A chapter on cadences whose examples are ABC fences in the Markdown, engraved at the column width, one of them running on over two pages. - [Primary workbook unit of activities](https://postext.dev/en/cookbook/primary-workbook-activities.md): A four-page science workbook unit whose eleven activities are :::exercise fences in the Markdown, printed by one exercise style: discs, bank, dots to join. - [One worksheet in ten school traditions](https://postext.dev/en/cookbook/school-traditions-worksheet.md): The same seven :::exercise fences in ten languages, each edition printed by an exercise style set the way that country's school books set exercises. - [Column arithmetic as each country writes it](https://postext.dev/en/cookbook/column-arithmetic-by-country.md): A maths worksheet whose sums are - 864 ÷ 4 lines in the Markdown, set digit by digit in squares, long division as each country's schools lay it out. - [A Chinese exercise book, pupil's and teacher's](https://postext.dev/en/cookbook/chinese-exercise-book.md): A 练习册 in Chinese and maths: sections 一、二、, ( ) brackets, 田字格 and sums in columns, built twice from one text, for the pupil and the teacher. - [A Japanese drill with the answers upside down](https://postext.dev/en/cookbook/japanese-drill-upside-down-answers.md): Two pages of a Japanese drill series, arithmetic across and kanji in columns, each exercise followed by its answers printed upside down. - [An Arabic workbook, right to left](https://postext.dev/en/cookbook/arabic-workbook-rtl.md): A primary Arabic workbook unit set right to left: choices with أ ب ج, matching columns, a word bank, صح or خطأ boxes, a word search and Arabic-Indic digits. - [A puzzle page with the answers upside down](https://postext.dev/en/cookbook/puzzle-page-upside-down-answers.md): A children's magazine puzzle page: crossword, word search, riddle, story to order, matching and a mixed-up fact on cards, each with its answers upside down. - [A Greek maths textbook chapter with formulas](https://postext.dev/en/cookbook/greek-maths-textbook.md): Three pages on Pythagoras's theorem for Greek pupils: sections 3.1 to 3.3 in capitals without tonos, Εικόνα and Πίνακας labels, and MathJax formulas. - [A section of a Russian physics textbook](https://postext.dev/en/cookbook/russian-physics-textbook.md): § 14 of a Russian physics textbook: Рис. 1, a table title on two lines, tg and arctg in the formulas, notes by page and lists numbered 1) а). - [A book in a page viewer: pages, zoom, navigation](https://postext.dev/en/cookbook/book-in-a-page-viewer.md): createViewer from postext-viewer shows a laid-out chapter as a scrolling column of pages in a CMS, with the host's own zoom buttons and page counter. - [Select on the page, read the Markdown range and text](https://postext.dev/en/cookbook/selection-as-markdown-range.md): postext-viewer reports a selection on the laid-out pages as a range of the Markdown, the Markdown it covers and its pieces line by line. - [Highlights from a list of ranges](https://postext.dev/en/cookbook/highlights-from-ranges.md): A review tool's records, each a range of the Markdown and a verdict, painted over the laid-out pages as highlights in three colours with setAnnotations. - [Proofreading marks: strike, replace and insert](https://postext.dev/en/cookbook/proofreading-marks-on-pages.md): An editor's corrections drawn on a laid-out story page in postext-viewer: struck words, replacements written above them and insertion carets. - [Notes in the margin, with a popover from page coordinates](https://postext.dev/en/cookbook/margin-notes-with-popovers.md): Note marks tint their words and flag them in the outer margin; a press opens the note in a popover placed under the words with rangeRects and pageToClient. - [Click on the page to find the source](https://postext.dev/en/cookbook/click-to-markdown-source.md): sourceAt and caretAt turn a click on a laid-out page into a block of the Markdown and an offset; the CMS shows that line of the source, marked. - [Anchors through a revision: moved, ambiguous, orphaned](https://postext.dev/en/cookbook/anchors-through-a-revision.md): textAnchor stores each note with its words and context; resolveAnchor finds it in the next revision as exact, moved, ambiguous or orphaned. - [Applying accepted edits and carrying the other notes](https://postext.dev/en/cookbook/applying-accepted-edits.md): applyEdits writes the accepted corrections into the Markdown and carries every other note's anchor through them, flagging the notes an edit fell inside. - [Search results drawn on the pages](https://postext.dev/en/cookbook/search-results-on-pages.md): A search box finds the query in the Markdown, draws every match as a highlight on the laid-out pages, and steps through them with revealAnnotation. - [Marks as SVG over page images, for a report](https://postext.dev/en/cookbook/marks-as-svg-over-pages.md): layoutAnnotations and annotationsSvg lay an editor's marks over plain page images, with no viewer: a proof report a CMS can send by e-mail or print. - [Your own canvas: renderPage, rangeRects and caretAt](https://postext.dev/en/cookbook/own-canvas-page-view.md): A page view written by hand, without postext-viewer: renderPage paints each page once, rangeRects draws the selection and caretAt and caretRect place the caret. - [The same marks on right-to-left and vertical pages](https://postext.dev/en/cookbook/marks-on-rtl-and-vertical-pages.md): One way of writing marks for an Arabic page set right to left and a Japanese page set in vertical columns: layoutAnnotations follows each page's lines. - [A reader's highlighter: a passage and a colour](https://postext.dev/en/cookbook/reader-highlighter.md): Select words on a novel's pages and four colours open over them; the highlight snaps to whole words, is saved as an anchor and joins a list beside the pages. - [A reader's notebook: notes on what they select](https://postext.dev/en/cookbook/reader-notebook.md): Select a passage of a textbook and write a note on it: the words are tinted, a numbered flag goes in the margin, and a notebook beside the pages lists them. - [All recipes, by chapter](https://postext.dev/en/cookbook.md) ## Links - [GitHub](https://github.com/drnachio/postext): source code, issues and examples - [YouTube](https://www.youtube.com/@Postext): video walkthroughs - [Sandbox](https://postext.dev/en/sandbox.md): Interactive in-browser editor: write markdown, tune the configuration and export print-ready PDF and EPUB 3 e-books. - [Agent skills](https://postext.dev/.well-known/agent-skills/index.json): index of the agent skills (postext-port turns a PDF, Word, EPUB, InDesign or HTML publication into a Postext project) - [WebMCP tools](https://postext.dev/en/docs/sandbox.md): in a browser with WebMCP (document.modelContext) every page registers tools for an agent — search, read a page as Markdown, open a Cookbook recipe in the Sandbox — and the Sandbox adds its own (sandbox_*): read and edit the book, change any design setting, get any laid-out page as a JPEG, turn pages, switch viewer, export - [postext-guide.postext](https://postext.dev/bundles/postext-guide.postext): the Postext guide as one .postext file (manifest, Markdown chapters, fonts and pictures) ## Optional - [Glossary](https://postext.dev/en/glossary.md): Plain definitions of the typesetting, Chinese, Japanese and Arabic layout and software terms used across the Postext site, and what each abbreviation stands for. - [MIT License](https://postext.dev/en/license.md) - [Privacy Policy](https://postext.dev/en/privacy-policy.md) - [Cookie Policy](https://postext.dev/en/cookie-policy.md) - [Accessibility](https://postext.dev/en/accessibility.md) - [Documentación en español](https://postext.dev/es/llms.txt) - [Documentació en català](https://postext.dev/ca/llms.txt) - [Dokumentation auf Deutsch](https://postext.dev/de/llms.txt) - [Τεκμηρίωση στα ελληνικά](https://postext.dev/el/llms.txt) - [Documentation en français](https://postext.dev/fr/llms.txt) - [Documentazione in italiano](https://postext.dev/it/llms.txt) - [Documentação em português](https://postext.dev/pt/llms.txt) - [Документация на русском](https://postext.dev/ru/llms.txt) - [简体中文文档](https://postext.dev/zh/llms.txt) - [日本語のドキュメント](https://postext.dev/ja/llms.txt) - [التوثيق بالعربية](https://postext.dev/ar/llms.txt)