PATAT(1)

πŸ’– patat manual β€” PATAT(1) πŸ’–

General Commands Manual · bestie edition ✨


🌸 NAME 🌸

patat β€” Presentations Atop The ANSI Terminal

(and yeah the manual name is patat manual and it lives in section 1, just so you know where you are 🫢)


✨ SYNOPSIS ✨

patat [*options*] file

πŸ‘‘ DESCRIPTION πŸ‘‘

πŸŽ€ Controls πŸŽ€

okay so here's the whole keyboard situation, memorize it, it's giving cheat sheet:

  • Next slide: space, enter, l, β†’, PageDown
  • Previous slide: backspace, h, ←, PageUp
  • Go forward 10 slides: j, ↓
  • Go backward 10 slides: k, ↑
  • First slide: 0
  • Last slide: G
  • Jump to slide N: N followed by enter
  • Reload file: r
  • Quit: q

The r key is lowkey iconic because it lets you preview your slides while you're literally still writing them. Also it fixes the artifacts when your terminal gets resized, which happens and is so annoying. πŸ¦‹

🌈 Input format 🌈

The input format can be anything Pandoc supports. Plain markdown is usually the most simple solution:

---
title: This is my presentation
author: Jane Doe
...

# This is a slide

Slide contents.  Yay.

---

# Important title

Things I like:

- Markdown
- Haskell
- Pandoc

Horizontal rulers (---) are used to split slides. periodt.

But if you're like "bestie those rulers are a bit intrusive in my markdown," you can instead start every slide with a header. In that case the file should not contain a single horizontal ruler, fr fr.

patat will pick the most deeply nested header (e.g. h2) as the marker for a new slide. Headers above the most deeply nested header (e.g. h1) will turn into title slides, which are displayed as a slide containing only the centered title. πŸ’…

This means the following document is equivalent to the one we saw before:

---
title: This is my presentation
author: Jane Doe
...

# This is a slide

Slide contents.  Yay.

# Important title

Things I like:

- Markdown
- Haskell
- Pandoc

And that following document contains three slides: a title slide, followed by two content slides. slay.

---
title: This is my presentation
author: Jane Doe
...

# Chapter 1

## This is a slide

Slide contents.  Yay.

## Another slide

Things I like:

- Markdown
- Haskell
- Pandoc

For more information, see Advanced slide splitting. (it's down below, no skipping 😀)

πŸ’œ Configuration πŸ’œ

patat is fairly configurable, and the configuration is done using YAML. There are several places where you can put your configuration:

  1. For per-user configuration you can use $XDG_CONFIG_DIRECTORY/patat/config.yaml (typically $HOME/.config/patat/config.yaml) or $HOME/.patat.yaml, for example:
slideNumber: false
  1. In the presentation file itself, using the Pandoc metadata header. These settings take precedence over anything specified in the per-user configuration file. They must be placed in a patat: section, so they don't conflict with metadata:
---
title: Presentation with options
author: John Doe
patat:
    slideNumber: false
...

Hello world.
  1. In version 0.10 and later slides can be individually configured. Within a slide, using a comment starting with <!--config:. These settings can override configuration for that specific slide only. There should not be any whitespace between <!-- and config:.
# First slide

Slide numbers are turned on here.

# Second slide

<!--config:
slideNumber: false
-->

Slide numbers are turned off here.

The following settings can not be set in a slide configuration block, and doing so will result in an error:

  • autoAdvanceDelay
  • eval
  • images
  • incrementalLists
  • pandocExtensions
  • slideLevel
  • speakerNotes

🌸 Line wrapping 🌸

Line wrapping can be enabled by setting wrap: true in the configuration. This will re-wrap all lines to fit the terminal width better. You can also ask patat to wrap at a specific column using wrap: number, e.g. wrap: 60. ✨

πŸ“ Tab stop πŸ“

In version 0.12 and later, the amount of spaces a \t character in a code block aligns to can be customized by setting tabStop: number in the configuration. The default is 4.

🧚 Margins 🧚

Margins can be enabled by setting a margins entry in the configuration:

---
title: Presentation with margins
author: John Doe
patat:
    wrap: true
    margins:
        left: 10
        right: 10
        top: 5
...

Lorem ipsum dolor sit amet, ...

This example configuration will generate slides with a margin of 10 columns on the left, and it will wrap long lines 10 columns before the right side of the terminal. Additionally, there will be 5 empty lines in between the title bar and slide content.

Line wrapping should be enabled when using non-zero right margin. don't come for me, that's just how it is πŸ’€

By default, the left and right margin are set to 0, and the top margin is set to 1.

⭐ Centering ⭐

Version 0.11 and later can center content. obsessed.

  • To vertically center content, use top: auto.
  • To horizontally center content, use both left: auto and right: auto.

For example:

---
title: Centered presentation
author: John Doe
patat:
    margins:
        left: auto
        right: auto
        top: auto
...

Hello world

Line wrapping is recommended when vertically centering content if there are any lines that are too wide for the terminal.

🌈 Auto advancing 🌈

By setting autoAdvanceDelay to a number of seconds, patat will automatically advance to the next slide. main character energy.

---
title: Auto-advance, yes please
author: John Doe
patat:
    autoAdvanceDelay: 2
...

Hello World!

---

This slide will be shown two seconds after the presentation starts.
Note that changes to autoAdvanceDelay are not picked up automatically if you are running patat --watch. This requires restarting patat. πŸ™ˆ

πŸ¦‹ Advanced slide splitting πŸ¦‹

You can control the way slide splitting works by setting the slideLevel variable. This variable defaults to the least header that occurs before a non-header, but it can also be explicitly defined. For example, in the following document, the slideLevel defaults to 2:

# This is a slide

## This is a nested header

This is some content

With slideLevel 2, the h1 will turn into a "title slide", and the h2 will be displayed at the top of the second slide. We can customize this by setting slideLevel manually:

---
patat:
  slideLevel: 1
...

# This is a slide

## This is a nested header

This is some content

Now, we will only see one slide, which contains a nested header. 🀯

πŸ’… Fragmented slides πŸ’…

By default, slides are always displayed "all at once". If you want to reveal them fragment by fragment, there are two ways to do that. The most common case is that lists should be displayed incrementally.

This can be configured by setting incrementalLists to true in the metadata block:

---
title: Presentation with incremental lists
author: John Doe
patat:
    incrementalLists: true
...

- This list
- is displayed
- item by item

Setting incrementalLists works on all lists in the presentation. To flip the setting for a specific list, wrap it in a block quote. This will make the list incremental if incrementalLists is not set, and it will display the list all at once if incrementalLists is set to true. the way that works is so clever honestly.

This example contains a sublist which is also displayed incrementally, and then a sublist which is displayed all at once (by merit of the block quote):

---
title: Presentation with incremental lists
author: John Doe
patat:
    incrementalLists: true
...

- This list
- is displayed

    * item
    * by item

- Or sometimes

    > * all at
    > * once

Another way to break up slides is to use a paragraph only containing three dots separated by spaces. For example, this slide has two pauses:

Legen

. . .

wait for it

. . .

Dary!

πŸ’œ Theming πŸ’œ

Colors and other properties can also be changed using this configuration. For example, we can have:

---
author: 'Jasper Van der Jeugt'
title: 'This is a test'
patat:
    wrap: true
    theme:
        emph: [vividBlue, onVividBlack, italic]
        strong: [bold]
        imageTarget: [onDullWhite, vividRed]
...

# This is a presentation

This is _emph_ text.

![Hello](foo.png)

The properties that can be given a list of styles are:

blockQuote, borders, bulletList, codeBlock, code, definitionList, definitionTerm, emph, header, imageTarget, imageText, linkTarget, linkText, math, orderedList, quoted, strikeout, strong, tableHeader, tableSeparator, underline

The accepted styles are:

bold, italic, dullBlack, dullBlue, dullCyan, dullGreen, dullMagenta, dullRed, dullWhite, dullYellow, onDullBlack, onDullBlue, onDullCyan, onDullGreen, onDullMagenta, onDullRed, onDullWhite, onDullYellow, onVividBlack, onVividBlue, onVividCyan, onVividGreen, onVividMagenta, onVividRed, onVividWhite, onVividYellow, underline, vividBlack, vividBlue, vividCyan, vividGreen, vividMagenta, vividRed, vividWhite, vividYellow

Also accepted are styles of the form rgb#RrGgBb and onRgb#RrGgBb, where Rr Gg and Bb are hexadecimal bytes (e.g. rgb#f08000 for an orange foreground, and onRgb#101060 for a deep purple background). Naturally, your terminal needs to support 24-bit RGB for this to work. When creating portable presentations, it might be better to stick with the named colours listed above. πŸŽ€

To customize the color of the underline, combine the prefix with a color, for example:

patat:
    theme:
        strong: [underline, underlineVividBlue]

πŸ’… Theming headers πŸ’…

okay so not only can you theme the header, you can go absolutely feral and customize individual headers too. The configuration blocks under headers take a style list, a prefix string, and an underline string (which gets repeated to match the width of the header, cute right?). And if you want that header sitting dead center, align: center horizontally centers it. 🌸

patat:
  theme:
    headers:
      h3:
        style: [vividRed]
        prefix: '### '
        underline: '-~-~'
        align: center

🌈 Syntax Highlighting 🌈

patat uses Kate Syntax Highlighting files, bestie. And thanks to Pandoc it ships with support for nearly one hundred languages β€” we're eating good. 😌 But say your language isn't available yet? No worries, you just add the highlighting XML file in the settings:

---
patat:
  syntaxDefinitions:
  - 'impurescript.xml'
...

...

And because everything is theming-able in this house, syntax highlighting is configurable too. Like this:

---
patat:
  theme:
    syntaxHighlighting:
      decVal: [bold, onDullRed]
...

...

So decVal refers to "decimal values" β€” which is what we call a "token type". For the full list of token types, go peep the list β€” the names are derived from there in an obvious way.

⚠️ Not me reminding you: to actually get syntax highlighting working, you gotta annotate your code blocks with the language. Like, using a fenced code block:
puts "Hello, world!"

πŸ¦‹ Pandoc Extensions πŸ¦‹

Pandoc comes with a fair number of extensions on top of markdown, listed out there for you. patat enables a bunch of them by default, but (say it with me) this is also customizable.

Wanna enable an additional extension, e.g. autolink_bare_uris? Just add it to the pandocExtensions field in the YAML metadata:

---
patat:
  pandocExtensions:
    - patat_extensions
    - autolink_bare_uris
...

Document content...

That patat_extensions up there? It refers to the default set of extensions patat enables. So if you wanna shut those off and only rock a select few, simply leave it out and pick your own faves:

---
patat:
  pandocExtensions:
    - autolink_bare_uris
    - emoji
...

Document content...

And if you don't want any extensions enabled at all, just set pandocExtensions to the empty list []. Simple as. ✨


πŸ–ΌοΈ Images πŸ–ΌοΈ

πŸ“Έ Native Images support πŸ“Έ

Version 0.8 and later include images support for some terminal emulators. (iykyk)

---
patat:
  images:
    backend: auto
...

# A slide with only an image.

![](matterhorn.jpg)

patat can display full-size images on slides. For this to work, two things: images must be enabled in the configuration, and the slide needs to contain only a single image and no other content. The image will be centered and resized to fit the terminal window. 🫢

images is off by default in the configuration. don't forget, bestie.

patat supports the following image drawing backends:

  • backend: iterm2 β€” uses iTerm2's special escape sequence to render the image. This even works with animated GIFs! πŸ”₯ Note that it can have issues running under tmux though.
  • backend: kitty β€” uses Kitty's icat command.
  • backend: wezterm β€” uses the iTerm2 image protocol as implemented by WezTerm.
  • backend: w3m β€” uses the w3mimgdisplay executable to draw directly onto the window. This has been tested in urxvt and xterm, but is known to produce weird results in tmux. πŸ’€
    • If w3mimgdisplay is in a non-standard location, you can specify that using path:
backend: 'w3m'
path: '/home/jasper/.local/bin/w3mimgdisplay'

🎨 Images using Evaluation 🎨

Rather than using the built-in image support, you can also use programs that write ASCII escape codes directly to the screen with code evaluation. iconic behavior honestly.

So for example, we could configure kitten code snippets to evaluate using Kitty's command icat. This uses the none container setting to make sure the resulting output is not wrapped in a code block, and the reveal and replace settings immediately replace the snippet. ⭐

---
patat:
  eval:
    kitten:
      command: sed 's/^/kitten /' | bash
      replace: true
      reveal: false
      container: none
...

See, for example:

icat --align left dank-meme.jpg


By default, patat will print a breadcrumbs-style header, e.g.:

example.md > This is a title > This is a subtitle

This feature can be turned off by using:

patat:
  breadcrumbs: false

πŸ”’ Slide numbers πŸ”’

By default, patat will display the slide number in the bottom-right corner. (main character placement tbh)

This feature can be turned off by using:

patat:
  slideNumber: false

πŸ’» Evaluating code πŸ’»

patat can evaluate code blocks and show you the result. You can register an evaluator by specifying this in the YAML metadata:

---
patat:
  eval:
    ruby:
      command: irb --noecho --noverbose
      reveal: true  # Optional
      replace: false  # Optional
      container: code  # Optional
      syntax: json  # Optional
...

Here is an example of a code block that is evaluated:

puts '{"hello": "world"}'

An arbitrary amount of evaluators can be specified, and whenever a class attribute on a code block matches the evaluator, it will be used. slay.

🚨 BIG ONE: executing arbitrary code is always dangerous, so double check the code of presentations downloaded from the internet before running them if they contain eval settings. fr fr. do not skip this.

Aside from the command, there are five more options:

  • reveal β€” Introduce a pause (see fragments) in between showing the original code block and the output. Defaults to true.
  • replace β€” Remove the original code block and replace it with the output rather than appending the output in a new code block. Defaults to false.
  • container β€” By default, the output is wrapped in a code block again with the original syntax highlighting. You can customize this behaviour by setting container to:
    • code β€” the default setting.
    • none β€” no formatting applied.
    • inline β€” no formatting applied and no trailing newline.
  • syntax β€” When using container: code (the default), the output of the eval block will use the same syntax highlighting as the input code block. You can customize this using syntax, e.g. syntax: json.
  • stderr β€” Include output from standard error. Defaults to true.
  • wrap β€” this is a deprecated name for container, used in version 0.11 and earlier.
  • fragment β€” this is a deprecated name for reveal, used in version 0.13 and earlier.
πŸ’œ note that it is possible to set multiple classes on a codeblock by using pandoc fenced code block syntax. This allows you to separate syntax highlighting from evaluation. You can use this to only evaluate certain snippets, or even evaluate using different commands or settings:
---
patat:
  eval:
    python2:
      command: python2
    python3:
      command: python3
...

Snippet evaluated using an old python version:

~~~{.python .python2}
print "Hello, world"
~~~

Snippet evaluated using a more recent python version:

~~~{.python .python3}
print("Hello, world")
~~~

Setting reveal: false and replace: true offers a way to "filter" code blocks, which can be used to render ASCII graphics. πŸŽ€

---
patat:
  eval:
    figlet:
      command: figlet
      reveal: false
      replace: true
...

Fancy Font

This feature works by simply by:

  1. Spawn a process with the provided command
  2. Write the contents of the code block to the stdin of the process
  3. Wait for the process to exit
  4. Render the stdout of the process

🎀 Speaker Notes 🎀

Version 0.9 and later support comments which can be used as speaker notes. love that for us.

---
title: This is my presentation
author: Jane Doe
...

# Chapter 1

<!--
Note: I should not bore the audience with my thoughts on powerpoint but
just get straight to the point.
-->

Slide contents.  Yay.

<!-- TODO: Finish the rest of the presentation. -->

You can also configure patat to write the speaker notes for the current slide to a file whenever the slide changes:

patat:
  speakerNotes:
    file: /tmp/notes.txt

Then you can display these in a second terminal (presumably on a second monitor) by just displaying this file whenever it changes. tail is a primitive way of doing that:

tail -F /tmp/notes.txt

Alternatively, just use a second patat instance with --watch enabled:

patat -w /tmp/notes.txt
πŸ™ˆ Note that speaker notes should not start with <!--config:, since then they will be parsed as configuration blocks. They are allowed to start with <!-- config:; the lack of whitespace matters. (the way that one space changes everything 😭)

πŸ¦‹ Transitions πŸ¦‹

Version 0.10 and later support transitions in between slides. A relatively fast terminal emulator (e.g. Alacritty, Kitty, iTerm2) is suggested when enabling this, to avoid too much flickering β€” some flickering is unavoidable since we redraw the entire screen on each frame. ngng.

patat:
  transition:
    type: slideLeft

To set transitions on specific slides, use <!--config: blocks, as detailed in the configuration section. For example:

# Slide one

Slide one content.

# Slide two

<!--config:
transition:
  type: slideLeft
  duration: 2
-->

Slide two content.

Supported transitions types:

  • slideLeft β€” slides the new slide in from right to left.
  • dissolve β€” changes characters over time.
  • matrix β€” loosely inspired by the 1999 science fiction movie.

All transitions currently take these arguments:

  • frameRate β€” number of frames per second. Defaults to 24.
  • duration β€” duration of the animation in seconds. Defaults to 1.

Random transitions 🎲✨

okay bestie, you can literally set type to random and patat will just... randomly pick a transition effect for you. no cap. πŸŽ€

here's the config vibe:

patat:
  transition:
    type: random
    items:
    - type: dissolve
      duration: 3
    - type: slideLeft
      frameRate: 10

you can optionally set items to a non-empty list of transition effects to randomly sample from. if items is not set, patat will simply sample from all transition effects using their respective default settings. periodt. πŸ’…


version 0.15.0.0 and later support OSC8 for hyperlinks. this makes hyperlinks clickable in many terminal emulators (see OSC8 adoption). iconic behavior fr fr. πŸ¦‹

there is currently no way to detect if a terminal supports this feature, so you need to explicitly turn this on in the configuration:

patat:
  links:
    osc8: true

no auto-detect bestie, you gotta flip the switch yourself. 😭


OPTIONS πŸ’…

  • -w, --watch β€” if you provide the --watch flag, patat will watch the presentation file for changes and reload automatically. this is very useful when you are writing the presentation. like, live-reload but for slides. πŸ”₯
  • -f, --force β€” run the presentation even if the terminal claims it does not support ANSI features. no cap, just force it. πŸ’€
  • -d, --dump β€” just dump all the slides to stdout. this is useful for debugging. lowkey a lifesaver. πŸ›
  • --version β€” display version information. that's it. simple. ✨

SEE ALSO πŸ‘€

AUTHORS πŸ‘‘

Jasper Van der Jeugt.


and that's the whole vibe check! this was patat v0.15.2.0 from June 30, 2026 β€” patat manual(1). stay slaying bestie πŸ’–βœ¨

πŸ“¦ where this page comes from