PDF Generation
The PDF is the real output. What you see in the preview is the same typesetting engine drawing the same pages — not an approximation of them — so what you approve on screen is what comes out of the printer.
Seeing the pages
| Action | Key | What it does |
|---|---|---|
| Show Preview | Ctrl+W | The formatted pages beside the text, following your edits |
| Re-Render Page | Ctrl+R | Refresh the preview now |
| Color Margins | Tints the margins so you can see the text block | |
| Styling Help | Ctrl+Shift+H | Names the style the line at the cursor is using, and where each setting came from |
Getting a file out
- File > Print (Ctrl+P) — the print dialog.
- File > Print Preview — the full-page preview before printing.
- File > Export to PDF — write a PDF.
- File > Save to Html — write a web page.
- File > Save to LibreOffice (FODT) — write a file Word or LibreOffice Writer can open.
Print, Print Preview and Export to PDF each ask which style set to render (when the document has more than one) and then render fresh, so you never take away a stale file.
The page belongs to the style, not the printer. The print dialogs do not offer paper size, orientation or margins; set those in Page & Slides (below), or make a variant style set for a landscape or different-paper edition.
One document, several outputs
A document can carry several complete style sets. Each renders to its own file, named after the set:
report.ord → report.STYLE.pdf
report.SLIDES.pdf
report.DARK.pdf
The name in the middle is the style set’s own name. The set most documents start with is
called
STYLE, which is where report.STYLE.pdf comes from.
Ctrl+[ and Ctrl+] switch the editor between sets. To produce the whole set of
files in one go, use the /generate-all-pdfs slash command (Ctrl+/), or
Output > View All Styles Slides, which also opens each one in a slide window.
Page setup
Open File > Settings > Page & Slides.
- Page Size — pick a Preset and the width and height fill themselves in, or type your own. Orientation swaps them.
- Margins — Left, Right, Top, Bottom. Turn on Odd/Even for double-sided printing and the first two rows become Odd and Even, so the inner margin swaps sides on left-hand pages.
- Background Images — a fill behind the page: a color, a gradient, a photo or an SVG, bleeding to the trim edge. Double-click the cell for the Fill dialog.
- Formats — the Units every measurement on every page is shown in. Set it to inches or millimeters once and the whole dialog follows.
Headers and footers
On the Headers & Footers page, the Headers and Footers tables have three columns — Left, Center and Right — and one row per set. Add a row for a second set and a style can switch to it partway through the document, so a chapter opener looks different from the pages that follow it.
Codes fill themselves in:
| Code | Becomes |
|---|---|
@@ |
The page number |
@A, @B, @C… |
The level 1, 2, 3… heading title on this page |
@a, @b, @c… |
The level 1, 2, 3… heading number |
A logo goes at the start of the header text as [logo.svg] or [logo.png], and <BR>
breaks a line. $name variables are not filled in here — they work in the document text and
in style settings.
Title page, contents and indices
The Front & Back page turns these on:
- A title page. Tick Title Page, then fill in the Title, Author, Date and two free text lines below it. Each has its own font, size and position down the page.
- A table of contents. Set TOC Levels to how deep it should go — zero means no contents page — and give it its own fonts.
- Lists of figures, tables, diagrams, circuits, source code and quotes. One check box each.
- Indices, built from the index markers in your text, plus a scripture index.
Footnotes
Footnote Mode, in the Footnote Options section of the Headers & Footers page, decides where notes appear:
| Setting | Notes go |
|---|---|
| Footnotes at end of page | At the bottom of the page they are referenced on |
| Endnotes at end of section | At the end of the level-1 section |
| Endnotes at end of doc | All together at the end |
| Inline references | In the text where the marker is |
| Footnotes Off | Not printed |
Beside it, Footnote Super makes the markers superscript, Footnote Tab indents the note text, and the separator rule above the notes has its own thickness and width.
How the page is broken
Pagination is not left to chance. The Output section of the Page & Slides page holds the controls:
- Min Lines Top and Min Lines Bottom — the fewest lines that may be left at either end of a split paragraph, so one line is never stranded on its own.
- Min Paragraphs — how many paragraphs must follow a heading before a break is allowed between blocks, so a heading never sits alone at the foot of a page.
- Keep Together — whether bullet lists, outline sections, both or neither resist being split.
A single style can also force a break. In the Text Styles table, the New Page cell offers a break before the block — never, automatically, always, or only once the page is 50%, 75% or 90% full — plus a New Page After box. On a heading, “after” means after its whole section, so “always” plus “after” is how a style puts each chapter on its own page.
For a one-off break, use Format > Insert Page Break or Insert Column Break in the document itself.
Figures and tables
Figure and table numbers are worked out at render time, so they stay right when you reorder.
Label a
caption with {#name}, refer to it with @fig:name or
@tbl:name, and the reference follows.
Pictures can float with text wrapping beside them, fill a column, or sit in a region. For tables, the Opts cell on the Table & Chart Styles page has the two settings people go looking for: repeat the header row on every page the table continues onto, and keep the table whole so it moves to the next page rather than splitting.
Rendering without opening the program
Every output path is available from the command line, with no window and no display. This is what you want for a build script, a nightly job or a server.
ordstyle --pdf report.ord
ordstyle --pdf report.ord SLIDES # a named style set
ordstyle --html report.ord
ordstyle --fodt report.ord
| Option | Effect |
|---|---|
--section 1.2 |
Render only that section |
--html-assets <dir> |
Write images to a folder instead of inlining them in the HTML |
--fodt-static-toc |
Write the FODT contents page as fixed text, rather than the default one LibreOffice can regenerate |
--redgreen |
Tint the margins, as the Color Margins view does. PDF only: HTML and FODT output is never tinted |
--allow-scripts |
Run every Python script the document names, not only the approved ones |
A Python block’s script runs only if it has been approved on this computer
(File > Review Scripts…) or the render is given --allow-scripts; otherwise the page
shows a “Script not run” note where the figure would be. So a scheduled render will not run
a script nobody approved.
Output is written next to the input, named after the style set. See the command-line reference for the complete list.
A note on HTML and FODT
PDF is the exact rendering. HTML and FODT reproduce as much as their formats allow, which is most of it, but neither is a fixed page. A browser and Writer both reflow the text, so page breaks fall where they fall; the HTML has no running headers or footers, and its contents and indices link to sections instead of giving page numbers. Slide mode is PDF-only. A handful of effects are simplified too — a region’s two-sided text wrap becomes one-sided in HTML, and FODT bakes image treatments and woven lockups into pictures. Where a feature differs, the PDF is the one to trust.