Conversation
|
This is the PDF for reference: |
|
Hi @domWalters
You can add Mermaid configuration like this. However, it is probably difficult to synchronize with the web's light/dark mode. The theme option is here. ```mermaid theme="dark"
```
Yes, it seems the problem lies in Mermaid's Please refer to my samples.
For a temporary workaround, I used PNG format. |
|
It reproduced using this procedure instead of Generate an SVG file using mmdc/mermaid-cli. echo 'graph LR\nhello-->world' | mmdc -i - -o test.svgGenerate a PDF from the SVG file. weasyprint test.svg test.pdfwith warnings. (I don't know the details) The PDF does not contain text labels. However, opening the SVG with Chrome and printing to PDF results in a PDF that contains text labels. Therefore, it seems that the problem is in WeasyPrint. |
|
The issue was caused by CairoSVG.
|
docs/examples/diagrams.md
Outdated
| ## Mermaid | ||
|
|
||
| These examples are from [the `mermaid` docs](https://mermaid.js.org/syntax/examples.html). | ||
|
|
There was a problem hiding this comment.
How about adding a comment: "WeasyPrint/CairoSVG does not support flowchart text." Furthermore, as a workaround for this limitation, we can create the diagram in PNG format.
hkato
left a comment
There was a problem hiding this comment.
I will be offline a few days. It seems to be good, except for the flowchart issue.
|
Personally, my colleagues like both PlantUML and the GUI-based diagram tool, draw.io. These seem to be among the top three popular OSS diagram tools. Of course, it depends on the community. https://hkato.github.io/markdown-kroki/pdf/document.pdf |
I'd be happy with any additional diagrams. I'm familiar with PlantUML and I've heard of draw.io I think. |
|
@hkato would you be happy with me including I'd keep the top part of |
|
it’s okay 👍 🚀 |
|
I'm worried that the public Kroki server might be unavailable. Sometimes the server encounters errors. |
|
@hkato, I've finally done some updates to this. I recently changed the OS on my main machine and have been having a hard time getting stuff working again, but seems stable-ish now. I've submoduled Feel free to ignore the |
|
Thanks for the integration. |
Ah, I thought that might have been a configuration problem with my new PC. I'll try do a local server. |
|
@hkato, yeah you are right. Running a local kroki server gives a 12 second build without the PDF rather than the ludicrous amount of time it was before |
@hkato I took the basic
mermaidexamples from the official documentation and made a page in the documentation using yourmarkdown-kroki.Diagrams work well on the web version. Do you think there is a way to do light vs dark diagrams?
On the PDF version, they all work except the flow charts which lose their labels: