jaspervdj / patat

Terminal-based presentations using Pandoc
GNU General Public License v2.0
2.37k stars 60 forks source link

Support centering content with auto margins #164

Closed jaspervdj closed 5 months ago

jaspervdj commented 5 months ago

See #38.

Configuration is done through the existing margins setting.

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

Setting wrap: true is recommended when vertically centering content if there are any lines that are too wide for the terminal.