4 ms·
> I'd be able to run an md -> html -> pdf pipeline in a lightweight, headless build script. This is how I make my presentation PDFs from Markdown files using p
by rcthompson 8y ago
> I'd be able to run an md -> html -> pdf pipeline in a lightweight, headless build script.
This is how I make my presentation PDFs from Markdown files using pandoc (except I think for me it's md -> latex -> pdf). I use Snakemake[1] to automate it using the following Snakefile: https://gist.github.com/DarwinAwardWinner/5c3fd8fb82757bb04a0a36bda7f2c73f https://gist.github.com/DarwinAwardWinner/5c3fd8fb82757bb04a...
The idea is that you write presentation.mkdn, and then run "snakemake", which runs pandoc to produce presentation.pdf. Any images you include should be in a subdirectory called "images". If you have "images/giraffe.svg", you can include "images/giraffe.pdf" in your presentation and it will convert it for you automatically (using Inkscape's CLI), and same for pdf to png using ImageMagick.
[1]: https://snakemake.readthedocs.io/en/stable/ https://snakemake.readthedocs.io/en/stable/