# Authoring guide A `.pres` file is a plain-text source describing a whole presentation. It has two parts: **settings** (global parameters) and **content** (the slides). Revealer accepts raw HTML anywhere, just like reveal.js, but adds a set of shortcuts so you can focus on the content. Three things to remember: 1. **Raw HTML is allowed anywhere** — any line the parser does not recognise is passed through verbatim. A shortcut is never *required*; it is a shorthand for a common pattern. 2. A shortcut line must **start with its marker** (`*`, `!`, `>`, `===`, …). A space after the marker is required where shown, and nested lists use 2 spaces per level. 3. Slides live on a **fixed canvas** that reveal.js scales to fit the window (set its size with `> width:` / `> height:`, e.g. 1920 × 1080). Author at natural sizes and let Revealer fit the content: each block shrinks its own font until it fits, so you rarely need to fight overflow by hand. ## File structure ```text # --- SETTINGS -------------------------------------------------------------- > author: First author > author: Second author > event: Seminar place, 01/01/2026 > logo: Media/Images/Logos/Logo1.png > logo: Media/Images/Logos/Logo2.png > slideNumber: c/t # --- CONTENT --------------------------------------------------------------- >>> first: Title > subtitle: Subtitle === Title of slide 1 This slide is very informative. === Title of slide 2 This slide is extremely informative. ``` Lines starting with `#` are comments and are skipped everywhere. ### Settings Settings are `> key: value` lines placed **before** the first slide. The most common ones: ```text > title: Browser-tab title > author: Your name # repeatable; see Author photos below > affiliation: Your institute # repeatable > event: Place, date > logo: Media/logo.png # repeatable > theme: revealer # see Themes > slideNumber: c/t > bibtex: refs.bib # see Bibliography > build: python figs.py # see Figures pipeline ``` Any other `> option: value` is passed straight to `Reveal.initialize()` (for example `> controls: false`, `> transition: fade`, `> width: 1920`). The complete annotated list — look and identity, layout geometry, math, figure hooks, PDF export — is in [Settings & directives](reference/settings.md). ### Parameter scopes Every `> key: value` directive applies to a **scope**, which determines how far its effect reaches: | Scope | Where it is written | Applies to | | --- | --- | --- | | **Presentation** | in the settings block, before the first slide | the whole presentation | | **Slide** | inside a slide, outside any column block | the current slide | | **Block** | at the top of a column block (`\|\|` / `\|`) | that column only | | **Paragraph** | directly attached to a paragraph (no blank line before its content) | that paragraph only | Most directives have a fixed scope. Three of them — `size`, `align` and `paragraph-spacing` — are **contextual**: their scope is deduced from *where* they appear (see [Sizes and alignment](#sizes-and-alignment)). ## Slides and sections | Command | Description | | --- | --- | | `>>> first:` *title* | **First slide.** Its content is generated automatically (title, subtitle, authors, affiliations, logos, event). | | `===` *title* | **Horizontal slide.** The title renders in the fixed header bar. | | `---` *title* | **Vertical slide** under the previous `===` slide — handy for backups and extras (press ↓). | | `%%%` *title* | **Section slide.** Marks the start of a section; the header is removed. Add `> relief: none` to drop the text stroke, or pair with `> background:` for a full-bleed divider (`
` is allowed in the title). | | `>>> biblio` | **Bibliography slide(s).** Adds formatted bibliography slides from the references cited with `> cite:`. See [Bibliography](bibliography.md). | | `> include:` *file.pres* | **Include another file** at build time. See [Including other files](#including-other-files). | ### Per-slide directives Written right after a slide marker: | Command | Description | | --- | --- | | `> visibility: hidden` | **Hide slide.** | | `> style: dark` | **Dark style** for the current slide. | | `> theme:` *name* | **Theme for the current slide.** Temporarily switches the reveal.js theme while this slide is active. See [Themes](themes.md). | | `> subtitle:` *text* | **Subtitle** (first slide only). | | `> header: none` | **Remove the fixed header** (full-bleed slides). | | `> background:` *path*/*color* | **Background** image or colour. | | `> background-video:` *path* | **Video background** (looped, muted). | | `> background-opacity:` *0–1* | **Background opacity** for a background video. | | `> color:` *color* | **Text colour** for the current slide. | | `> attr:` *attributes* | **Raw attributes** on the `
` — see [Raw slide attributes](#raw-slide-attributes). | Citations, speaker notes, inline SVGs and SVG animation steps are covered [below](#citations); layout geometry (`header-margin`, `column-spacing`, `column-width`, `paragraph-spacing`) in [Layout parameters](#layout-parameters). ### Author photos Author photos are declared in the settings block, before the first slide. If at least one author has a photo, the generated first slide switches automatically from a comma-separated author line to a photo table: one row of photos, with each name below its image. Indented properties attach to the author/photo block just above them: ```html > author: First author > photo: Media/Images/Photos/first.jpg > author: Second author > photo: Media/Images/Photos/second.jpg ``` The inverse order is also accepted when the image is the natural starting point: ```html > photo: Media/Images/Photos/third.jpg > author: Third author ``` The path is written like other media paths: relative to the presentation folder. Authors without a photo are still included in the table when photo mode is active; Revealer shows their initials in a neutral placeholder. The author name may contain inline HTML, for instance `Raphael Candelier`; the raw text is used for image alt text and initials. Set `> rounded_photos: true` to display the photos in a circle (default: square). Only the author/photo properties are nested today; other presentation settings remain top-level. ## Text ### Paragraphs Inside a slide — and inside each column — content is split into **paragraphs** separated by blank lines. A paragraph can be a block of text, a bullet list, an image, a video, a blockquote, a table, and so on. Paragraphs are stacked vertically, centered in their block, with a uniform spacing between them controlled by `paragraph-spacing` (in line-heights, `0.5` by default). ```text === A slide This is the first paragraph. This is the second paragraph. It can span several source lines. * a bullet list is a paragraph too * second item ``` Leading and trailing blank lines are ignored, and several consecutive blank lines still count as a single break. ### Inline formatting Light markdown works in any text, list item, caption, cell or box title: ```text **bold** *italic* `code` [a link](https://revealjs.com) [accented]{.accent} [red]{color=#c0392b} [large]{size=1.4em} [big]{.lede} [small]{.sm} ``` - `[text]{...}` spans accept `.class` tokens (added as CSS classes — themes provide roles such as `.accent`, `.lede`, `.sm`), `color=` and `size=`. - Math spans (`$…$`, `$$…$$`) and HTML tags are left untouched. - Escape a marker with a backslash: `\*`, `` \` ``, `\[`. - The whole layer can be disabled per deck with `> markdown: false`. ### Math `$inline$` and `$$display$$` math render with KaTeX. A bare `$$ … $$` line produces a centered display equation; for a framed, theme-accented equation box see [Callout boxes and framed equations](#callout-boxes-and-framed-equations). Your LaTeX macros can be reused with [`> macros:` / `> macro:`](#katex-macros). ### Sizes and alignment `> size:` sets a relative font size and `> align:` sets the alignment (`left`, `center`, `right`, `justify`). `size` accepts a factor (`0.8`, `120%`) or a **role name** — `title` (1.6), `lede` (1.25), `body` (1), `sm` (0.8), `fine` (0.65). Their **scope depends on where they appear**: - **Attached to a paragraph** (immediately before its content, with no blank line in between): they affect only that paragraph. - **Alone** (followed by a blank line) at the top of a slide or a column: they become the default for that slide or that block. - **Inside a `> … > end:` block** (callout box, card, fragment, table cell): they apply from that line to the end of the block — `> size: reset` / `> align: none` returns to the block's default. - **In the settings block**: they become the presentation default. `size` factors cascade multiplicatively (presentation × slide × block × paragraph). ```text === Sizes > size: 0.8 > align: right This paragraph is 80% of the base size and right-aligned. > size: 0.5 * This list is half size… * …and so is this item. ``` Images in a paragraph fill the block width by default and scale together with the block font; you can still resize any of them with an explicit width, e.g. ``. Inside a table, put `> align:` at the start of the cell content: ```html > table(1,2) > cell > align: right Right-aligned cell > cell > align: center Centered cell ``` ### Bullet lists Bullet lines start with `* ` and can be nested with two spaces per level. Revealer opens and closes the corresponding `