Skip to content

Pandoc Lua filters for producing slides and notes from a single Markdown document

License

Notifications You must be signed in to change notification settings

mxpiotrowski/pandoc-lecturenotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pandoc-lecturenotes

This is a set of filters for producing slides (for Deckset) and notes with embedded slides (for formatting with ms or LaTeX) from a single (Markdown) document. The idea is similar to, e.g., beamerarticle but aims to be lightweight.

Within the document, slides are contained in blocks with the class slide like this:

::: slide
# Inline Quotes

You can also use a quote together with paragraph text or other elements on the slide:

> The best way to predict the future is to invent it  
-- Alan Kay

Prefix the author of the quote with `--`, or leave it out if it's anonymous.
:::

The content of the slide blocks is in Deckset’s Markdown variant, with some extensions and some limitations.

For producing slides, use the deckset-slides.lua filter with commonmark+footnotes+pipe_tables+strikeout+tex_math_dollars as target format. If you use citeproc, add the deckset-post-citeproc.lua filter after the --citeproc option.

For producing notes with embedded slides for formatting with ms or LaTeX, use the embed-slides.lua filter.

⚠ Starting with Pandoc 3.0, the implicit_figures extension generates nodes of the new Figure type. This is a major change that breaks the embed-slide.lua filter; you currently must turn off this extension when producing lecture notes, e.g., by specifying -f markdown-implicit_figures. The deckset-slides.lua filter has been adapted and should work with or without implicit_figures.

ms output currently doesn’t work.

You can exclude slides from the notes by adding the presentation class, for example:

::: {.slide .presentation}
Presentation only
:::

You can exclude all slides from the notes by setting the showslides metadata field to false.

You can exclude images and code blocks from slides by adding the lecturenotes class, for example:

![](https://youtu.be/…){.lecturenotes}

This can be used to explicitly use different images for the presentation and the lecture notes. But you can also use it, for example, to have Deckset include a video from the filesystem (so you don’t depend on a network connection for the presentation) and to include a YouTube link on the lecture notes.

The embed-slides.lua filter aims to produce useful renderings of the slides, but obviously cannot reproduce everything that Deckset does, especially when it comes to images.

Both filters are compatible with the scholarly-metadata filter.

Formatting sample.md

Do make sample-deckset.md to produce the slides version of sample.md, make sample-latex.pdf to produce a LaTeX-formatted PDF version, and make sample-ms.pdf for the groff-formatted PDF version (note that the version of groff shipped with macOS is too old for Pandoc).

© 2022 by Michael Piotrowski [email protected]

About

Pandoc Lua filters for producing slides and notes from a single Markdown document

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published