VECTOR BOOK

Vector
Book

Book design and typesetting for vector humanities editions and translations. Markdown in, through Pandoc and Typst, a printed book out, in five designs.

Covers

One book, every design

A book is a folder of Markdown section files and a short book.toml. vbook samples sets the same book in every design, so the choice is made on the book's own pages. The first book was the vector translation of Kuki Shūzō's 偶然性の問題 (The Problem of Contingency, 1935), shown here with its frame cover after the 1948 Iwanami title page and with a field cover.

Covers: the specimen in the classic, modern, kintsugi, organic and vectors designs

Five designs

Designs

Page156 × 234 mm, Royal octavo
TextEB Garamond 10.5 pt, old-style figures; Gentium for Greek; Hiragino Mincho for Japanese
HeadingsCentred small capitals; chapter titles never italic
Source pagesSmall grey numbers in the outer margin, on the baseline of the line where each page begins
Classic spread: the end of chapter 1 and the opening of chapter 2 with a figure
The end of chapter 1 and the opening of chapter 2: a figure set at its size in the source, English glosses over its Japanese labels, a key beneath.
Classic: the opening of chapter 1
Chapter 1: number, title and original title; notes restarting at 1; margin page numbers.
Page156 × 234 mm
TextSource Serif 4 10.5 pt
HeadingsSource Sans 3 semibold in navy, set flush left
Source pagesInline, as a small grey [12]
Modern spread: the end of chapter 1 and the opening of chapter 2
A full-width rule above the notes; the scheme and table in the same sans as the headings.
Modern: the opening of chapter 1
Chapter 1, with source pages inline.
Page156 × 234 mm
TextCrimson Pro 10.5 pt; Shippori Mincho for Japanese
HeadingsCentred, in gold; section numbers as kanji (一, 二, …)
RulesGold hairlines under the running head and above the notes; figures between gold rules
Kintsugi spread: the end of chapter 1 and the opening of chapter 2, the figure between gold rules
The figure set between gold rules, after the joins of kintsugi repair.
Kintsugi: the opening of chapter 1
Chapter 1, its source page numbers in gold.
Page130 × 190 mm, a paperback
TextFira Sans Condensed 9.4 pt
HeadingsArchivo capitals, stacked and broken across lines
FieldsA generated field page before every chapter, drawn from the book
Organic spread: a field page facing the opening of chapter 2
A field facing the opening of chapter 2.
Organic: the opening of chapter 1, its title broken across four lines
Chapter 1: CONVEN-TIONS OF THE TEXT.
Page140 × 216 mm
TextIBM Plex Serif 9.6 pt; IBM Plex Mono for running heads, folios and source pages
HeadingsBricolage Grotesque, set large over a band of generated imagery
ImageryStreamlines, arrow fields, tensor glyphs, warped grids, point clouds with basis vectors
Vectors spread: a generated page facing the opening of chapter 2
A generated page facing the opening of chapter 2, its title set over a band of streamlines and arrows.
Vectors: the opening of chapter 1
Chapter 1, under its band.

Organic

Fields drawn from the book

Before every chapter the organic design sets a field page: regions of solid ink with white stipple, a dotted contour, and colour, cut from a smooth noise surface seeded by the book's title and the chapter's place in it. The same book always draws the same fields, and no two books share one. On the cover the ink opens around the title, which Typst measures before the field is drawn, so the title never stands on black.

mint-pink acid sand-sky coral electric mono
The organic cover and a field page in six palettes
field-palette chooses the colours, field-colours sets your own, field-ink the solid regions: here black, and electric blue for the electric palette.
Organic title page, Contents and back cover
Title page, Contents and back cover, the back in the field ink with its text in white or black to read on it.

Vectors

Imagery drawn from vector spaces

Each page of imagery is drawn from one flow field, the curl of a smooth noise surface with a few vortices and sources, seeded by the book's title and the chapter's place in it. From it come streamlines, an arrow field, tensor glyphs that lengthen where the flow is fast and round out where it rotates, a coordinate grid bent along the flow into a manifold, and point clouds with an origin and labelled basis vectors. Every other page inverts the palette. Titles over the imagery carry a halo in the ground colour, and their colour follows the ground's lightness, so they read on any palette.

The vectors cover and a chapter opening in five palettes
vector-palette: electric, night, blueprint, garden, spectrum; or your own ground, ink and colours.
Vectors title page, Contents and back cover
Title page under its band, Contents, and the back cover with a band of streamlines.

At print resolution

Details

Source pages in the margin

A marker [p. 12] in the text becomes a small number in the outer margin, on the baseline of the line where page 12 of the source begins.

A margin page number beside the first line of a source page

Figures with glosses

Figures at their size in the source; English glosses laid over their labels from a small JSON file; a key under the caption; a note in the caption kept out of the List of Figures.

A figure with English glosses over its Japanese labels

Schemes and tables

A head joined to its branches by a brace, written as a fenced block; tables that break across pages, their columns sized to their contents.

A brace scheme and a table

A field

Part of a generated field: solid ink with white stipple, the dotted contour that runs beside it, colour beyond.

Part of a generated field

Front matter

The imprint page

Title page, imprint page and Contents, all from book.toml. The imprint page carries the publisher's mark and series, edition, copyright and moral rights, the licence, material outside it, the AI disclosure, cataloguing lines, an ISBN for each format, the DOI, and a typesetting line Vector Book writes from the faces the book's characters reach.

Classic title page, imprint page and Contents

A sample edition

Sketch of the Analytical Engine

Menabrea's memoir of 1842 as Ada Lovelace translated it, with her Notes A to G, set from the Wikisource transcription of Scientific Memoirs (1843). The 1843 page numbers in the margin; Lovelace's footnotes and the editor's, in captions, table cells and chapter titles, some with quotations and displayed mathematics; Lovelace's tables and diagrams, the widest on turned pages; a drawn figure and a glossed facsimile; a glossary; a bibliography formatted from BibTeX. The PDF, and its sources.

The Lovelace sample edition: a page of the introduction with a drawn figure and citations, a facsimile with glosses, the Note G diagram on a turned page, a page with Lovelace's notes and the editor's, and the bibliography

Vector Translation, stage 7

From translation to book

A finished vector translation passes to Vector Book through one manifest, and comes back through numbered returns. The book side never edits the text; the translation side applies every correction to the literal translation and the translation together.

1

Text gate

The translation's checks pass and the translator signs off the text.

2

Manifest

book.toml: the translation side writes the book and its sources, the design side the design and covers, the publisher the imprint.

3

Build

vbook check --report writes the book and a build report: notes and figures set against the sources, missing glyphs.

4

Returns

vbook return writes located faults for the translation side; the translation side checks the PDF word by word in return.

5

Book gate

Every return and check closed; the translator signs off the book with the Vector Book commit.

6

Identifiers

ISBN and DOI last; the book is rebuilt with them and released.

Use

Making a book

From an empty folder to a PDF in nine steps, run on macOS; on Linux the same commands work once the programs and fonts are installed, with open fonts in place of the Apple ones.

1

Install

Python 3.11 or later (standard library only), Pandoc 3, Typst 0.13 or later, and Poppler, whose pdffonts and pdfinfo the checks use. With Homebrew:

brew install python pandoc typst poppler
git clone https://github.com/vector-humanities/vector-book.git

Then the fonts of the designs you want. Hiragino, Menlo and Apple Symbols come with macOS; the rest are open fonts.

DesignFontsHomebrew casks
allGentium Book Plus, Noto Serif JP, STIX Two, DejaVu Sans Monofont-gentium-book-plus font-noto-serif-jp font-stix font-dejavu
classicEB Garamond 12font-eb-garamond
modernSource Serif 4, Source Sans 3font-source-serif-4 font-source-sans-3
kintsugiCrimson Pro, Shippori Minchofont-crimson-pro font-shippori-mincho
organicFira Sans Condensed, Archivo Blackfont-fira-sans-condensed font-archivo-black
vectorsIBM Plex Serif and Mono, Bricolage Grotesque, Space Groteskfont-ibm-plex-serif font-ibm-plex-mono font-bricolage-grotesque font-space-grotesk
brew install --cask font-gentium-book-plus font-noto-serif-jp font-stix font-dejavu font-eb-garamond

vbook fonts mybook prints the stacks of the book's design and marks each face ok or missing.

2

Start the book

Vector Book stays in its own folder and is called by path; nothing is copied into the book's repository. vbook new makes a book folder from the starter project:

./vbook new mybook

mybook/
  book.toml               # title, credits, design, sources, imprint, cover, back
  front/00-preface.md     # front matter, in filename order
  text/01-introduction.md
  back/                   # appendices; the glossary is set last
  figures/overlays.json   # English glosses laid over figure labels
  proof/return.md         # the form for returns to the translation side

A book that already exists as a document comes in through vbook import, which reads anything Pandoc reads: Word, OpenDocument, Markdown, HTML, EPUB, LaTeX. It splits the document at its level-one headings into numbered section files, keeps each footnote with its chapter, extracts the images to figures/, and writes book.toml with the document's title.

./vbook import mybook draft.docx
3

Fill in book.toml

[book] holds the title, subtitle, author, original title, credit line (“Vector translated by …”), affiliation and credits paragraph. Under [design], template picks the design and cover the cover (plain or frame for classic, modern and kintsugi; organic and vectors bring their own). [sources] lists the section files by glob, [markers] gives the page-marker pattern, and [imprint] fills the page behind the title page: publisher, series, edition, copyright, licence, AI disclosure, cataloguing, ISBN and DOI.

Every key is in config.md. A key left out takes its default, and a missing imprint field leaves no gap.

4

Write the text

One Markdown file per section, numbered in reading order. A level-one heading opens a chapter, with attributes for its number, original title and running head:

# Categorical Contingency {num="Chapter 1" orig="定言的偶然" run="Categorical Contingency"}

[p. 12] The chapter's text, page twelve of the source beginning here.[^c1-1]

[^c1-1]: Tr. A translator's note.

[p. N] marks where a page of the source begins and is set in the margin. Notes are Pandoc footnotes with labels unique across the book. A figure is an image on its own line followed by a caption paragraph beginning Figure N., with glosses for its labels in figures/overlays.json. Working notes between <!-- working --> and <!-- /working --> stay in the files and out of the book. Schemes, breaks, verse, tables, the glossary and raw Typst are in conventions.md.

5

Build and check

./vbook build mybook     # book/book.pdf, or [book] output
./vbook check mybook     # rebuilds, then:
pages    10
notes    1 set, 1 defined in the sources
figures  0 set, 0 in the sources
glyphs   no missing glyphs

A note or figure the sources define and the book does not set is a fault to fix before going further. check --report writes the same to book/BUILD.md with the Vector Book commit and the commit of the book's own repository, so the book can be rebuilt from the same text with the same version. Build after every chapter is added; each fault listed in practice.md would have shown in a one-chapter book.

6

Fonts and characters

./vbook sweep mybook

Sets every non-ASCII character in the book on test pages, grouped by Unicode block, and reports a character that falls back to a font outside the stack or reaches none. A missing glyph is fixed by adding a face to [design] fonts.text. A fonts/ folder in the book folder is passed to Typst, so a book can carry its own open fonts for builds away from macOS.

7

Choose the design

./vbook samples mybook   # build/samples.png, build/samples/<design>.pdf

Sets the book's own pages (title page, chapter opening, a text page, a figure, the last chapter) in all five designs side by side, so the design is chosen on the text being typeset. The choice goes in [design] template. Organic takes field-palette and vectors vector-palette, or your own colours; the generated imagery is seeded by the title, so each book has its own.

8

Proof and return

./vbook proof mybook                # build/proof.png, every page on one sheet
./vbook proof mybook --pages 1-12   # some pages only
./vbook return mybook               # check, then proof/return-NN.md

return lists the faults the checks can locate (duplicate or undefined note labels, missing images, unkeyed captions, glyph faults) with file and line, for the translation side to fix in the sources. Proofreading adds its findings beneath them by hand. handover.md sets out the kinds, the responses and the book gate. Rebuild after each round.

9

Publish

Add the ISBN and DOI to [imprint] when they are assigned, rebuild, and run check --report for the final BUILD.md. The PDF in book/ is the book.

The specimen uses every convention and builds to specimen.pdf; its files show how each is written.