A handbook that says how it wants to be read
Four pages that state what happens the moment the file is opened: which page it opens on and how much of the window that page fills, the bookmarks shown beside it, the pages two at a time, a print dialogue already filled in, and the address its relative links are read against.
None of what this document states changes a single mark on its pages. It changes what happens the moment somebody double-clicks the file: which page it opens on, how much of the window that page fills, whether the bookmarks stand beside it, and whether the pages are shown one at a time or two.
It also fills in the print dialogue in advance — which pages, whether both sides, how many copies — and gives the address the document's relative links are read against. For a handbook, a catalogue or anything that has to open the same way every time, this is the difference between a file and a document.
What this example shows
- The page it opens on, how far it is zoomed, and what stands beside it.
- Two-up spreads with the cover on its own.
- A print dialogue that comes up already set.
The code, in full
The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.
The document itself
The document this example writes, ready to open.
Open the document in English
Read the Rust source
Read the Python source