Reference
Inline elements
Markup that lives inside a <text> paragraph and nests within itself. Inline tags style a run of text; they are not page content on their own.
<b>
inlineBold weight for a run of text inside a paragraph.
No attributes.
<text size="16">Plain text with a <b>bold</b> word.</text><i>
inlineItalic style for a run of text inside a paragraph.
No attributes.
<text size="16">Plain text with an <i>italic</i> word.</text><u>
inlineUnderline a run of text inside a paragraph.
No attributes.
<text size="16">Plain text with an <u>underlined</u> word.</text><s>
inlineStrike through a run of text inside a paragraph.
No attributes.
<text size="16">Plain text with a <s>struck-out</s> word.</text><a>
inlineA hyperlink run inside a paragraph — clickable in the PDF.
| Attribute | Values | Default | Description |
|---|---|---|---|
href |
url | — | Link target (an external URI). |
Styled blue + underlined by default (override the color with a nested
<font color>). In the PDF the run becomes a clickable Link annotation
pointing at href. An empty or absent href leaves the run unstyled and
links nowhere — and an empty one warns — so always give it a real target.
<text>See <a href="https://example.com">the project page</a> for details.</text><font>
inlineOverride color and/or size for a run of text inside a paragraph.
| Attribute | Values | Default | Description |
|---|---|---|---|
color |
color | inherited | Text color for the run. |
size |
length | inherited | Font size for the run. |
Overrides only the attributes it names — an absent color or size inherits the
surrounding run untouched — so <font> is the inline escape hatch for recoloring
or resizing a span without disturbing weight, slant, or family. It does not change
the font family; that comes from the enclosing <text>'s font attribute.
<text size="16">A line with a <font color="#c4341f" size="22">louder</font> word.</text><br>
inlineA hard line break inside a paragraph.
No attributes.
<text size="16">First line<br/>forced onto a second line.</text><p>
inlineStarts a new paragraph inside a
No attributes.
Wrap each paragraph of a multi-paragraph block in <p>…</p>. Every <p> but the
first opens a gap above it, sized by the paragraph-spacing
attribute on the enclosing <text>, so one styled <text> can hold several
paragraphs without a wrapper around each. Inline markup nests inside a <p> just
as it does in the paragraph itself.
<text size="13" paragraph-spacing="8px">
<p>This is the first paragraph. It says its piece and then ends.</p>
<p>This second one opens below a paragraph-spacing gap, so the two read as
distinct blocks while sharing the <b>same</b> styling.</p>
</text><field>
inlineInline placeholder that prints a document field — the current page or total page count.
| Attribute | Values | Default | Description |
|---|---|---|---|
name |
page | pages | — | Which field to print: page (current physical page) or pages (total). |
<field> lives inside a <text>, like any other inline markup, and is replaced
at layout time with a document value: name="page" prints the current physical
page, name="pages" the total. It inherits the run's font, size, and color, so
it sets exactly like the words around it — style the surrounding <text> (or a
<font>) rather than the field. Placed in a <layout> template, it re-resolves
with the right number on every page; the set of names is meant to grow (a title,
a year) as documents gain metadata.
pages only knows the total once pagination finishes, which is why fields belong
in a <layout> template. Dropped into ordinary page body, name="pages" renders
a literal ? to flag that it can't be resolved there.
<document version="2.0">
<config><page size="A6" margin="20px" /></config>
<layout>
<vertical cross="stretch" flex="1">
<content/>
<expander/>
<horizontal>
<text color="#8a8678">The Daily Layout</text>
<expander/>
<text color="#8a8678">Page <field name="page"/> of <field name="pages"/></text>
</horizontal>
</vertical>
</layout>
<pages>
<page>
<vertical gap="8px">
<text size="20" bold="true" font="serif">A two-page story</text>
<text>This document flows past the bottom of the first page, so the
paginator starts a second one — and the footer field renders the
correct number on each.</text>
<spacer height="320px" />
<text>Now we are near the bottom of page one.</text>
</vertical>
</page>
</pages>
</document><inline>
inlineAn inline-block — a block element (or text) set in the running text, like CSS inline-block.
| Attribute | Values | Default | Description |
|---|---|---|---|
valign |
baseline | middle | top | middle | How the box sits on the line: bottom on the text baseline, centered in the line (default), or top-aligned. |
font |
sans | serif | <face> | inherited | Font family — applies only when <inline> wraps bare text. |
size |
length | inherited | Font size — bare-text case only. |
bold |
true | false | false | Bold weight — bare-text case only. |
italic |
true | false | false | Italic — bare-text case only. |
color |
color | inherited | Text color — bare-text case only. |
<inline> drops a block into the middle of a paragraph — the print cousin of
CSS display: inline-block. Everything else is a regular element: put a
<rect>, a <circle>, an <image>, or a whole <vertical> inside, or just
text, and it flows as one unbreakable unit between the words around it. The line
grows to fit it, and the rest of the paragraph keeps wrapping and justifying as
usual.
Its size and box styling are ordinary style: attributes — the block stays
unaware it is inline, so style:width, style:background, style:padding, and
the rest compose exactly as they do anywhere else. The only inline-specific knob
is valign: middle (the default) centers the box on the line, baseline
rests its bottom on the text baseline, and top aligns its top edge.
When <inline> wraps bare text it builds a styled run like a tiny <text>, so
it also takes the type attributes (font, size, bold, color, …) — handy
for a colored chip or badge.
<document version="2.0">
<config><page size="A6" margin="20px" /></config>
<pages>
<page>
<text size="14">
An <inline style:background="#1b1a17" style:padding="1px 6px"
style:border-radius="4px" color="#ffffff" bold="true">inline</inline>
block rides in the text — a swatch <inline valign="middle"><rect
width="12px" height="12px" fill="#c4341f" /></inline>, a badge
<inline valign="baseline"><circle radius="6px" fill="#1a7f3c" /></inline>,
or a whole stacked block
<inline style:background="#f3f1ea" style:padding="4px"><vertical>
<text size="8">two</text><text size="8">lines</text>
</vertical></inline>
— each growing the line to fit and wrapping like a word.
</text>
</page>
</pages>
</document>