Skip to content
PowerMD
Language:en Author:AtomForge

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:

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.

Colors

<!-- @color amber -->

Amber text.

<!-- @color reset -->

@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.

Sizing in practice

Need Start with
Readable text measure @set-width 55%–75%
Image beside flowing text @float right 40% 2 (or left)
Deliberate space @gap 2–6
Two text columns @columns 2 2–4
Dense material @set-scale 90%, or @scale 80%–90% for one block