-
DescriptionThanks for reading. I am a very beginner user, looking for help with the ELK layout for Mermaid. The ELK layout does not show up on my Mermaid diagram. However, when inspecting index.html with the devtools console mermaid.mermaidAPI.getConfig(), I see some ELK settings, but I don't know enough to determine whether they are correct. The Mermaid diagram is defined in a separate file, and injected via an 'include' directive. I was not able to upload any Quarto Markdown .qmd files to this discussion, but I made a github mini rep with my index.qmd, _quarto.yml, and three companion .qmd files. https://github.com/anaitab/mermaid-elk Here is my index.qmd: Here is my included Diagram.qmd with my mermaid config settings. I have 'elk' everywhere, in case it would by chance make it work (a novice here), but it does not. ` Here is a screenshot of how the rendered mermaid diagram looks like; no elk layout.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
|
Important Accessibility: To improve accessibility, please add alternative text to your screenshots. This helps all users, including those using screen readers, to understand the context of the images. A brief description can make a big difference! See Good Alt Text, Bad Alt Text — Making Your Content Perceivable. Could you properly format your post using code blocks for code and terminal outputs? Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
I don't know what is the mermaid.js version required for this, but for now in development version of Quarto (1.9) with mermaid.js 11.12.0, this does not seem to work. Regarding all your theming, these are in conflict, i.e., overwritten by Quarto theming system: https://quarto.org/docs/authoring/diagrams.html#mermaid-theming ---
title: "Reproducible Quarto Document"
format: html
---
```{mermaid}
---
config:
layout: elk
elk:
mergeEdges: true
nodePlacementStrategy: LINEAR_SEGMENTS
---
flowchart LR
A[Start] --> B{Choose Path}
B -->|Option 1| C[Path 1]
B -->|Option 2| D[Path 2]
``` |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.





ELK layout is not working for Mermaid version 11.*. According to the discussion at that issue, you need to have the engine loaded and registered.
Try:
Yo…