1 min read
Render PDF from Markdown that is using mermaid
Mermaid and Markdown is widely supported match. With mermaid you can describe diagrams and get them rendered next to your Markdown text. It is kind of a markdown flavor, but not supported by all Markdown processors. Use this guide to get result as described in the title.
You will need: - Pandoc
brew install pandoc
brew cask install basictex
npm i -g mermaid-filter
After everything installed (assume that
available in your
This document itself is written in markdown. Access the source and save it as
mermaid-pandoc-guide.md then use pandoc and the filter to create a PDF.
pandoc mermaid-pandoc-guide.md -o mermaid-pandoc-guide.pdf --toc -V papersize:a4 --highlight-style pygments -N -V geometry:"top=2cm, bottom=1.5cm, left=2cm, right=2cm" -V toc-title:"Inhaltsverzeichnis"
This mermaid graph must be rendered properly:
graph TD; A-->B; A-->C; B-->D; C
Tags: markdown , syntax , mermaid , latex
Improve this page
Show statistic for this page