These directives control how content sits inside a panel.
Two scopes: persistent and one-off
Most content directives come in two forms:
Scope
Example
Effect
Persistent
@set-width 60%
Applies to following blocks in this panel until changed.
One-off
@width 80%
Applies to the next content block only.
All persistent state resets at the start of each new panel. A one-off never changes the persistent value.
Alignment
<!-- @set-align left -->
All following blocks are left aligned.
<!-- @align right -->
Only this paragraph is right aligned.
<!-- @set-align -->
Values: left, center (the default), right, justify. With no argument, the directive restores center.
Width
<!-- @set-width 60% -->
Narrow content.
<!-- @width 80% -->
Only this block is 80% wide.
<!-- @set-width reset -->
Width is relative to the panel's content width, not the slide. reset restores 100%.
Scale
<!-- @set-scale 90% -->
This and the following content stay at 90%.
<!-- @scale 130% -->
Only this block is at 130%.
Scale applies on top of the document typography from the frontmatter. It resizes text, not images or video. Use @set-scale 100% to restore the default.
Reduce scale before cramming in more content, but avoid turning slides into pages of small text.
Columns
<!-- @columns 2 4 -->
Longer text flowing across two columns, with a gap of 4.
<!-- @col-break -->
This paragraph starts in the second column.
<!-- @columns -->
@columns N [GAP] takes 1–12 columns and a gap of 0–999 units (1 unit = 1% of the slide width). @col-break forces the next content into the next column. @columns with no arguments turns columns off.
Columns work best for parallel, scannable material on a wide, single-panel slide.
@color accepts a color name (such as amber, rose, or sky) or an inline-color number 1–3. The inline palette is used by emphasis markers:
<!-- @set-colors cyan rose lime -->
_First color_, __second color__, ___third color___.
<!-- @color 2 -->
Second palette color.
Defaults are amber, violet, and emerald.
@set-colors reset restores the palette.
@set-color-1, @set-color-2, @set-color-3 override one entry; reset undoes it.
Spacing
Top content.
<!-- @space -->
Bottom content.
@space is a flexible spacer that fills the remaining panel height. Use one to push content to the bottom, or one above and one below to centre it vertically.
<!-- @gap 4 -->
@gap N inserts an empty block N units high (1 unit = 1% of the slide width; −999 to 999). A negative value pulls the next block upward, useful for small optical corrections.
@set-gap N changes the default gap between all following blocks in the panel; @set-gap reset restores it.
Layout and text
These directives control how content sits inside a panel.
Two scopes: persistent and one-off
Most content directives come in two forms:
@set-width 60%@width 80%All persistent state resets at the start of each new panel. A one-off never changes the persistent value.
Alignment
Values:
left,center(the default),right,justify. With no argument, the directive restorescenter.Width
Width is relative to the panel's content width, not the slide.
resetrestores100%.Scale
Scale applies on top of the document typography from the frontmatter. It resizes text, not images or video. Use
@set-scale 100%to restore the default.Reduce scale before cramming in more content, but avoid turning slides into pages of small text.
Columns
@columns N [GAP]takes 1–12 columns and a gap of 0–999 units (1 unit = 1% of the slide width).@col-breakforces the next content into the next column.@columnswith no arguments turns columns off.Columns work best for parallel, scannable material on a wide, single-panel slide.
Colors
@coloraccepts a color name (such asamber,rose, orsky) or an inline-color number1–3. The inline palette is used by emphasis markers:<!-- @set-colors cyan rose lime --> _First color_, __second color__, ___third color___. <!-- @color 2 --> Second palette color.amber,violet, andemerald.@set-colors resetrestores the palette.@set-color-1,@set-color-2,@set-color-3override one entry;resetundoes it.Spacing
@spaceis a flexible spacer that fills the remaining panel height. Use one to push content to the bottom, or one above and one below to centre it vertically.@gap Ninserts an empty blockNunits high (1 unit = 1% of the slide width; −999 to 999). A negative value pulls the next block upward, useful for small optical corrections.@set-gap Nchanges the default gap between all following blocks in the panel;@set-gap resetrestores it.Sizing in practice
@set-width 55%–75%@float right 40% 2(orleft)@gap 2–6@columns 2 2–4@set-scale 90%, or@scale 80%–90%for one block