Skip to content

mxpiotrowski/pandoc-lecturenotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 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

# The Future

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

:::

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. You can exclude slides from the notes by adding the presentation class, for example:

::: {.slide .presentation}
This slide will only appear in the presentation.
:::

You can exclude all slides from the lecture notes by setting the showslides metadata field to false. You can also exclude images, divs, and code blocks from slides by adding the lecturenotes class; for example, this link will only appear in the lecture notes:

![](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, you need to install a more recent version).

© 2022 by Michael Piotrowski mxp@dynalabs.de

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