Log InGet OrdStyle

Document Syntax

A document is a plain text file. You type the words, and you mark the structure with a few characters — usually at the start of a line. This page lists every mark.

Nothing here decides how anything looks. That lives in Settings, so the same words can be a book, a report or a deck without being retyped. And nothing here has to be memorized: almost every mark can be inserted from the Format menu, and Ctrl+/ opens a searchable list of every command.

This page is the everyday tour. The Full Syntax Reference has every header, style field and option the format accepts, and the Design Guide says which of them to reach for to get a given look. Both are also plain Markdown files, ordSyntax.md and authoring.md, to read offline or hand to a tool.

The shape of a document

Lines are the unit. Most marks are the first characters of a line, and a block runs until something ends it — usually a line that no longer starts the same way.

  • Plain text is body text, and every line is its own paragraph. Blank lines are not needed between paragraphs and add no space when printed; the spacing comes from the style, and SPACE|24 (below) gives a deliberate gap.
  • A line starting with % is a note to yourself. It stays in the file and is never printed.
  • Leading @@ indents the line by half a tab. @@@@ indents twice as far.
% check these figures before sending
@@An indented line.

Headings

# Chapter
## Section
### Sub-section

A # heading needs a space after the hashes, so #define and #1 - Title stay ordinary text. Six levels come set up; more hashes give deeper levels, which you style yourself.

A line of nothing but = signs is a closer. It ends the sections deeper than its count of signs without starting a new one, so the text after it goes back to the outer section:

# Chapter
## Section
Text in the section.
=
Text back in the chapter, after the section.

A closer prints nothing and takes no number. The text after it has its own style, so it can be set apart from the text before the sub-section, and a closer can name a style for that text: == [Recap]. Any other line that starts with = is ordinary text.

Headings are also the document’s outline, so folding, promoting and moving sections all work off them. The keys for all of it are listed under Settings > Editor Shortcuts.

Emphasis and inline marks

You type You get
**text** Bold
*text* Italic
***text*** Bold italic
__text__ Underline
~~text~~ Strikethrough
{SC:text} Small capitals
^2 or ^{n+1} Superscript
_2 or _{n-1} Subscript
-- An em dash —
1/2 A properly set fraction
@@ mid-line A bullet character •

The boundary rule. Bold, italic, underline and strikethrough need something other than a letter or digit just outside the marks, and no space just inside them. **word** works; **word ** does not, and neither does 2**3**4. Ctrl+B and Ctrl+I apply bold and italic to the selection for you.

Fractions only convert when they stand alone as numbers, so a date or a URL is left as it is.

A few inline HTML tags also work inside a line: a, b, i, u, s, em, strong, del, ins, sub, sup, span, font, br, img, code, tt, big, small, nobr, cite, var, samp and kbd — so <kbd>Ctrl</kbd> and H<sub>2</sub>O do what you expect. A tag has to be closed by a > on the same line. Any other < prints as typed, so a < b, <100 and block tags such as <div> or <table> are safe.

Naming what a run of words is

A {=term=design variable} is looked up with {=code=resolveColor()}.

{=role= text} marks the text as a named character style. The advantage over plain bold-and-italic is that the document says what the run is — a term, a piece of code — so changing that style later restyles every instance at once. Format > Character Style… writes it for you, and its list shows each style drawn in its own font.

Variables

Prepared for $company on $DATE.

$name in the text prints the value of a variable you define in Settings > Tags & Variables — a client’s name, a product, a version — so changing it there changes every use. Three are always there: $DATE (the date the document is rendered), $TITLE and $AUTHOR (the document’s title and author). A name that is not defined prints as typed, so $5 is safe.

Applying a style to a paragraph

Put the style name in brackets at the start of the line:

[Lead] The opening paragraph, set larger than the rest.
# [Chapter] A heading using the Chapter style
- [Checklist] A bullet using the Checklist style

An explicit name always beats whatever the line would have got on its own. Format > Paragraph Style… offers the list rather than making you type it.

Lists

- Item
+ Alternative bullet
  - Indent to nest

1. First
2. Second
   a. Lettered
      i. Roman

- and + make bullets. 1., a., A., i. and I. make numbered, lettered and roman lists. Indent with tabs or spaces to nest.

Quotations and callouts

> A quotation. Every line that starts with > belongs to it.

>note> A callout in the "note" style.
>warning>Heads up> A callout with a title on the box.

> > A quotation inside a quotation.

The name between the extra > marks is a block style you define once in Settings > Block & Figure Styles — its fill, border, corner rounding, padding and accent bar. A third section puts a title on the box.

Until you define one, a named quote is set like an ordinary quotation. Nothing breaks while you decide how it should look. Format > Insert Quote builds any of these for you.

Code

```python
def hello():
    print("Hello")
```

Name the language after the opening fence to get it colored — python, cpp, rust, sql, bash and many more. To put a title on the block, add a backtick and the title after the language: an opening fence of ```python`Listing 1 gives the block the heading Listing 1.

Tables

| Region | Q1 | Q2 |
| West   | 12 | 18 |
| East   | 9  | 21 |
  • The first row is the header. You do not need a |---| line.
  • Short rows are padded out, not dropped.
  • A table taller than the page splits at a row boundary and continues on the next page.
  • Write \| for a pipe inside a cell: | A \| B | C | is two cells, the first reading A | B.

A caption goes on its own line directly above or below the table, with no blank line between:

TBLCAP| Quarterly revenue by region

Formulas

A cell can hold =FORMULA=RESULT. What sits between the first two = signs is calculated; what follows is the value shown.

| Product | Price | Qty | Total           |
| Apples  | 1.50  | 10  | =B2*C2=15       |
| Oranges | 2.25  | 8   | =B3*C3=18       |
| Total   |       |     | =SUM(D2..D3)=33 |

Cells are column letter plus row number (A1); ranges use two dots (D2..D5).

Kind Functions
Aggregate SUM, AVERAGE (or AVG), MIN, MAX, COUNT, COUNTA, COUNTBLANK, MEDIAN, MODE, PRODUCT, STDEV, VAR, LARGE, SMALL
Math ABS, ROUND, FLOOR, CEIL, INT, MOD, POWER, SQRT, LOG, LN, SIGN, PI
Logic IF, AND, OR, NOT
Operators + - * / and == != < > <= >=

Pictures

![A caption](photo.jpg)
![](logo.svg)
![The site plan](plan.png){width=40% align=right wrap=image}

The file is looked for beside your document. A missing file prints a dashed placeholder with the file name rather than vanishing, so you can see what went wrong. PNG, JPG, GIF, BMP and SVG are supported.

Format > Insert Image fills all of this in from a file picker, and reopens with the same fields when the cursor is on an existing picture — so the braces are only there if you want to type them.

Figure settings

Pictures and Python blocks take all of these in their braces. Diagrams and circuits take the placement ones — width, align, wrap and margin — and read scale their own way (see Diagrams and circuits). Charts are written differently again: their side, width and margin are fields of the CHART| line, and braces there hold chart options (see Charts).

Setting Meaning
width= 40% of the column, 120pt, or auto for its natural size
height= A fixed height in points
scale= Zoom from natural size (0.5 is half). For diagrams and circuits it is a percent instead — see below
align= left, center or right
wrap= Let text flow beside it: image (as tall as the picture), column (to the bottom), or a height in points. Needs align=left or right
fit= With both a width and a height: cover fills the box and crops, contain letterboxes
focus= X/Y in percent: which point of the picture stays in view when cover crops it. 50/20 keeps a face near the top
flip Mirror the picture left to right
margin= Space around it, or T,R,B,L for each side
border= 1 or 1:#888888 for a hairline frame
radius= / shadow= Rounded corners, drop shadow
gray / duo= Desaturate, or duotone in a given color
mask= An SVG whose alpha crops the picture — for a shaped or feathered edge
bleed Run to the page edge

A width on its own sizes the picture. Add wrap and it becomes the width of the zone the text flows around. Inside columns, a percentage is read against the column rather than the page.

A picture inside a paragraph

A picture marker that owns its whole line is a figure. Written inside a line of text, it floats: the line carrying it finishes at the full width, and from the next line down the picture takes the margin while the rest of the paragraph flows beside it.

…a little way into the sentence. ![](plate.svg) From here the text flows beside it…
…and on the other side. ![](plate.svg){align=right width=25%}

It defaults to a third of the width, on the left. Add {aschar} and the picture is a character in the line instead — it sits on the baseline, nothing wraps around it, and it is as tall as a capital letter unless you size it ({size=line}, {size=1.5em}). Use that for a warning glyph or a small logo in a sentence.

Floating a figure beside the text about it

@float:Name does the same for a figure written on its own lines — a chart, diagram, circuit, Python or math block, picture, or a quotation. Name the figure with a [Name] prefix (a quotation already has one in >Name>), and put the anchor in the paragraph directly before or after it:

[Adoption] CHART|Adoption|0.62|1|left|33
Uptake tripled over the period. @float:Adoption From here the paragraph flows beside the chart…

The figure takes its side and width from its own settings. For the chart above those are the fifth and sixth fields: left puts it on the left, and 33 makes it a third of the column wide (after the title, 0.62 is its height-to-width ratio and 1 its size). A picture would say the same in braces, {align=left width=33%}. This is a page-layout instruction, so the HTML and LibreOffice exports leave the figure where it was written.

Diagrams and circuits

```diagram Signal path {width=50%}
+-------+    +-------+
| Box A | -> | Box B |
+-------+    +-------+
```

Drawn with characters inside a fence, and closed with a plain ``` line. Use ```circuit for electronic schematics. Both take the placement settings above — width, align, wrap, margin — with one difference: a diagram sits at the left of the column, and align= only chooses its side when it floats with wrap=.

Two settings are their own. scale= is a whole-number percent, 80 unless you say otherwise, so {scale=40} draws it at half the usual size; a drawing too wide for the column is shrunk to fit. fullwidth, on its own, stretches the drawing across the whole column: ```circuit Amplifier {fullwidth}.

Charts

A chart is drawn from the table immediately above it:

| Month | Sales [Bar] | Trend [Line] |
| Jan   | 120         | 118          |
| Feb   | 145         | 130          |

CHART|Monthly sales|0.6|1.0

The tag in each header cell chooses what that column becomes — [Bar], [Line], [Spline], [Area], [Pie], [Donut], [Scatter], the horizontal and stacked bar forms ([HBar], [StackedBar], [PercentBar] and their HBar versions), and [X] for the horizontal axis. The tags are not printed.

After the title come the height-to-width ratio and the size. A chart fills the column unless two more fields float it: a side, left or right, and a width — a percent of the column, 120pt, or auto — so CHART|Monthly sales|0.6|1|right|40 sits at the right, 40% wide, with the text beside it. A margin goes in its own field as m= with all four sides in points, top, right, bottom, left: CHART|Monthly sales|0.6|1|right|40|m=0,0,6,12.

Braces on a chart line hold chart options, not the figure settings above: CHART|Monthly sales|0.6|1.0|{legend=bottom labels=1}. Format > Insert Chart offers the whole option list — legend position, value labels, colors, axis ranges — without your having to type it.

Python blocks

![Caption](script.py){width=40% align=center}
input data line 1
input data line 2
~~~

The lines between the opener and the ~~~ terminator go to the script on standard input; what it writes out — a PNG or an SVG — becomes the figure. So a plot from live data regenerates every time you render.

A script is a program, so it never runs on your computer until you say so. Until then its place shows Script not run; File > Review Scripts… lists the scripts waiting and lets you approve them. When rendering from the command line, --allow-scripts runs them all. The script has to be in the document’s folder or a folder below it — a path that leads anywhere else is refused. On a server, the server’s administrator decides whether a document’s scripts may run at all.

Math

MATH|Title|Scale
math content
+END
You type You get
[Read the report](report.ord) A link to another document
[Safety rules](handbook.ord#Safety) A link to a section of it
[See above](#Introduction) A link inside this document
[](#2.1) A link to section 2.1, which names itself
[Q3 plan](ord://host/Plans/q3.ord) A document on a server. Following it connects first; the port defaults to 8642
https://example.com Linked automatically

Embedding another document

![](appendix.ord)
![](handbook.ord#Safety)

When the file ends in .ord, its contents are pulled in rather than treated as a picture. By default the embedded headings are shifted to sit one level below the heading they land under. Add {absolute} to keep their original levels, or {sameLevel} to put them at the same level as the parent.

This is how a large document is assembled from parts different people own.

Footnotes

The survey[^1] disagrees.

[^1]: Annual Review, 2025.

Put the marker where the reference belongs and the text on its own line anywhere. Ctrl+T inserts a matched pair: the marker at the cursor, and its line under a # Footnotes heading at the end of the document, which it adds if there is none. The notes are renumbered in order as you add them. Whether notes appear at the foot of the page, the end of the section or the end of the document is a setting, not a mark.

Cross-references

![The site plan {#plan}](plan.png)
As @fig:plan shows, the layout is regional.

Label a caption with {#name} and refer to it with @fig:name (or @ref:name), or @tbl:name for a table. The number is worked out when the document is rendered, so it stays right when you reorder. The number shown on the figure itself comes from the List of Figures or List of Tables, so turn those on in Settings > Front & Back.

Index entries

[idx:Terms:Escrow]
[idx:Terms:Escrow_Release]

Invisible markers. The first name is which index, the second is the entry, and anything after an underscore is a sub-entry.

Bible references

Joh 3:16
Eph 1:18; 2:1-4, 7

Recognized and looked up automatically. Ranges, lists and cross-references all work, and any kind of dash works as the range separator, so autocorrect will not break one.

Two versions of one document

Text can be marked as belonging to an audience, and each style set decides which audiences it prints.

{:draft: This sentence only appears in the draft edition.}
The pilot runs through May. :draft:
# Open questions :draft:

The braces tag a run of words. A tag written on its own, :draft:, tags the whole line it is on, wherever in the line it sits, and is not printed. On a heading it takes the whole section with it: an edition that leaves out draft leaves out everything under Open questions. Join tags with a colon to give a line several: :draft:notes:.

Tag names are lowercase letters, digits, @ and _. Because a tag can sit anywhere in a line, text shaped like one becomes one: 10:30: now loses its :30: and is tagged 30. Write 10.30 or 10:30 now instead.

For more than a sentence, fence a whole region rather than tagging every line:

:::slide
- Evaporation
- Condensation
:::

:::notes
Facilitator prose that only appears in the notes edition.
:::

Every line inside behaves as if you had tagged it by hand. Fences nest, and a closer is a bare :::. Join names with a colon — :::slide:handout — to put lines in two editions at once.

The usual idiom is to put the heading outside the fences so both editions share it, then fence the per-edition content under it. Ctrl+Alt+V cycles the editor between showing everything and showing one audience at a time. Ctrl+: adds a tag to the end of the line, or wraps the selected words in braces.

Page furniture

Each of these is a line on its own:

Line Does
PAGEBRK Start a new page here
COLBRK Jump to the next column
SPACE|24 Exactly 24 points of blank space
--- *** ___ A horizontal rule. The three can be given different looks, so one can be a plain line and another an ornament
REGION|side … REGION|1 Everything between the two lines goes into the named region — a sidebar or band set up in Settings > Regions — instead of the main text

Columns

COL|2|50|50|5
Text set in two equal columns with a 5% gap …
COL|1

The numbers are the column count, each column’s width as a percentage, and the gap. COL|1 returns to a single column.

Form Does
COL|2|50|50|5 Text flows down one column and on into the next
COL|2|bal|50|50|5 Balances the columns to the same height
COL|2|indep|50|50|5 Each column has its own content, separated by COLBRK

Settings can follow the gap, each as key=value: bg= fills the columns (one value for all, or a comma list, one per column — a color, gradient or image), border=1:#888:6 draws a box as width, color and corner radius, pad= insets the content, fg= recolors the text, gaps= sets each gap separately, and bleed runs the outer fills to the page edge:

COL|2|50|50|6|bg=#fff5e6,#e6fff0|border=1:#cc8844:8|pad=8

Format > Insert Columns builds the line for you. A style can also carry a column layout, so every section with that heading style is set in columns with nothing in the text at all — see Document Styling.

Records: cards, tables and leader lines

Give a style a layout in Settings > Text Styles > Presentation and its lines become structured records, with fields separated by |:

[Spec] Weight | 1.2 kg          one record on its own

[Spec]                          a group: each line below is a record
Weight | 1.2 kg
Height | 30 cm

A blank line, a new style or a heading closes the group. The same content becomes a stat block, a row of cards, an aligned table, a dot-leader list or a margin note by editing only the style — nothing in the document changes. Write \| for a literal pipe.

If the style has no layout set, [Spec] … is just an ordinary styled paragraph and | is literal text.

Summary of block types

Starts with Block Ends at
# … ###### Heading The next heading or block
=, == … alone on a line Section closer One line
> Blockquote or callout A line not starting with >
``` Code block A closing ```
```diagram Diagram A closing ```
```circuit Circuit A closing ```
| Table row A line not starting with |
TBLCAP| Table caption One line
CHART| Chart One line
![ Picture or embed One line
![ with a .py file Python block ~~~
MATH| Math +END
COL|, COLBRK, PAGEBRK, SPACE| Page furniture One line
REGION|name Routed to a region REGION|1
---, ***, ___ Horizontal rule One line
::: Audience fence A bare :::
% Comment, never printed One line

See also