OliverBalfour / obsidian-pandoc

Pandoc document export plugin for Obsidian (https://obsidian.md)
MIT License
717 stars 60 forks source link

Enable export to revealjs slides to support 2D layout #182

Open eastarpen opened 1 year ago

eastarpen commented 1 year ago

Description

As mentioned in the pandoc manual, pandoc supports 2D layout when converting markdown to revealjs slides, just need to enable option '--slide-level=2'.

Note: in reveal.js slide shows, if slide level is 2, a two-dimensional layout will be produced, with level-1 headings building horizontally and level-2 headings building vertically.

However, the default implementation of this plugin does not have this option, resulting in the inability to generate 2D layout slides.

I added such option, and it runs normally

Check

prepare a markdown file like this

# Slide 1

must have content here

## slide 1.1(Vertical)

## slide 1.2 (Vertical)

# Slide 2

export it

console log(The first is the unmodified version)

image

outputs are below

origin version

image

modified version

image

Please consider update it in the next update.