pandoc-subfigs
enables subfigures to be created in pandoc's markdown.
To run the Lua filter, place the filter in a location accessible to pandoc and execute pandoc with the option --lua-filter=pandoc-subfigs.lua
.
To create subfigures, place the subfigures in a Div of class subfigs
. The first paragraph found in the Div is used as the figure's caption. Using the fenced_divs
extension (which is enabled by default):
:::subfigs
The figure caption.
{#subfig1}
{#subfig2}
:::
Alternatively, according to preference, the figure caption may be placed at the bottom of the Div (as long as it is still the first paragraph in the Div).