dendron
dendron copied to clipboard
Mermaid content does not appear in PDF generated by Prince
Please select the area your Bug applys to. (Multiple selections are Possible)
- [ ] Onboard. Initial vault setup and import/export pods
- [ ] Create. Note creation, lookup, snippets and templates
- [ ] Retrieve. Backlinks, references, graph view
- [ ] Structure. Refactoring, multi-vault and schemas
- [ ] Publish. Sharing your repo with the world
- [X] Misc (Choose this if your not sure)
Describe the bug
If I include a Mermaid graph in my Markdown, the graph shows up in the preview but not in the PDF.
To Reproduce
Steps to reproduce the behavior:
- Open a Markdown file
- Define a Mermaid graph (sample below)
- View the Dendron preview and confirm that the graph is visible
- Right-click on the preview and choose PDF
- Open the resulting PDF
- Note that the graph is not rendered into the PDF
Sample Mermaid graph
graph TD;
A-->B;
A-->C;
A-->D;
A-->E;
Expected behavior
Graph is visible
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information)
- OS: [Windows 10]
- Browser [Firefox]
- Version [78.10.0esr]
Additional context
Add any other context about the problem here.
Dendron Log file
Please attach the output of >Dev:Dendron: Open Logs here
Untitled-1.log
Thanks for the issue, confirmed and repro'd. The preview pdf export is currently a few versions out of date from the most recent Dendron markdown syntax. Will aim to clear some cycles in May to fix this
So May might have been ambitious 😅 @jeffbarr apologies for the delays on this, this item is still in our backlog.
I've written up a workaround in the meantime. Let me know if this works as a temporary solution.
The following installs everything on a mac. For other operating systems, you can see references at the bottom
Installation
echo "install pandoc"
brew installpandoc
brew install basictex
echo "install mermaid"
npm install -g @mermaid-js/mermaid-cli
echo "install filter"
pip3 install pandoc-mermaid-filter
Running
pandoc {path/to/src} -o {path/to/dst} --filter pandoc-mermaid
References
- Pandoc: install pandoc
- mermaid-cli: install mermaid
- pandoc-mermaid-filter: install mermaid filter