SkillAgentSearch skills...

Patat

Terminal-based presentations using Pandoc

Install / Use

/learn @jaspervdj/Patat
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🥔 patat

CI Hackage GitHub tag

patat (Presentations Atop The ANSI Terminal) is a feature-rich presentation tool that runs in the terminal.

screenshot

Table of Contents

Installation

Pre-built packages

Linux:

Mac OS:

You can also find generic Linux and Mac OS binaries here: https://github.com/jaspervdj/patat/releases.

From source

patat is also available from Hackage. You can install it using cabal by running cabal install patat.

Running

patat [*options*] file

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.

-f, --force

: Run the presentation even if the terminal claims it does not support ANSI features.

-d, --dump

: Just dump all the slides to stdout. This is useful for debugging.

--version

: Display version information.

Controls

  • 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 very useful since it allows you to preview your slides while you are writing them. You can also use this to fix artifacts when the terminal is resized.

Input format

The input format can be anything that 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.

However, if you prefer not use these since they are a bit intrusive in the markdown, you can also start every slide with a header. In that case, the file should not contain a single horizontal ruler.

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

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

Configuration

patat is fairly configurable. 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
    
  2. 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.
    
  3. 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.

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.

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

---
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 dis

Related Skills

View on GitHub
GitHub Stars2.7k
CategoryDevelopment
Updated2d ago
Forks66

Languages

Haskell

Security Score

100/100

Audited on Mar 28, 2026

No findings