Skip to content
kd
17 Feb 2022
Back to blog

Using MermaidJS with Pandoc

1 min read (83 words)

GitHub recently announced support for MermaidJS. I thought it would be nice to integrate it as part of my blog using Pandoc lua filters. So the following:

```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```

would be rendered as:

JohnBobAliceJohnBobAliceRational thoughts prevail!Hello John, how are you?Great!How about you?Jolly good!

Citation

@online{krishnamurthy2022usingmermaidjswithpandoc,
  author = {Dheepak Krishnamurthy},
  title = {Using MermaidJS with Pandoc},
  year = {2022},
  date = {2022-02-17},
  url = {https://kdheepak.com/blog/using-mermaidjs-with-pandoc/},
  langid = {en},
}

For attribution, please cite this work as:

Dheepak Krishnamurthy, "Using MermaidJS with Pandoc", February 17, 2022 https://kdheepak.com/blog/using-mermaidjs-with-pandoc/


Using Tikz with Pandoc
Reinstall Xcode command line developer tools