Skip to content

Instantly share code, notes, and snippets.

@tarleb
tarleb / custom-markdown.lua
Last active June 27, 2023 23:55
Custom Lua writer, using the `layout` module to produce nicely layed-out Markdown.
-- This is a sample custom writer for pandoc, using Layout to
-- produce nicely wrapped output.
local layout = pandoc.layout
local text = pandoc.text
local type = pandoc.utils.type
local l = layout.literal
-- Table to store footnotes, so they can be included at the end.