Skip to content

Mermaid flowchart labels outside nodes in reveal.js presentations #13598

@prosoitos

Description

@prosoitos

I have:

  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide

Bug description

Mermaid flowcharts that I have in a reveal.js document and which looked fine 2 years ago now have their labels outside the nodes.

I tried to reproduce and the problem is not nearly as bad as in my slides (where the labels are fully out of the circles), but the code below still shows how the labels are not centred properly.

Steps to reproduce

---
format: revealjs
---

## Test slide

```{mermaid}
%%| echo: false
%%| fig-align: center
flowchart TD
   id1((1))---id2((2))---id3((3)):::current
   classDef current stroke: #f96, stroke-width: 2px, color: #f96
```

Actual behavior

No response

Expected behavior

No response

Your environment

  • OS: Arch Linux 6.17.4

Quarto check output

Quarto 1.8.25
[✓] Checking environment information...
      Quarto cache location: /home/marie/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.3.1: OK
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.8.25
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: undefined

[✓] Checking Chrome Headless....................OK
      Chrome:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.7
      Path: /usr/bin/python3
      Jupyter: 5.9.1
      Kernels: julia-1.11, julia-1.12, python3

[✓] Checking Jupyter engine render....OK

(|) Checking R installation...........Loading required package: sysfonts
Loading required package: showtextdb
[✓] Checking R installation...........OK
      Version: 4.5.1
      Path: /usr/lib64/R
      LibPaths:
        - /home/marie/R/lib
        - /usr/lib/R/library
      knitr: 1.49
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiagrams-mermaidMermaid diagrams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions