Mermaid charts in docx

Thanks.

I notice that I am using Quarto Version 1.9.38 on Ubuntu 26.04 and I am running a newer version of R but I rather doubt this is the problem or we should be seeing more postings about your problem.

!! Breaking news!!
Quarto 1.10 has just been released

This is my set-up.

> sessionInfo()
R version 4.6.1 (2026-06-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 26.04 LTS
RStudio Desktop Pro, 2026.06.0 Build 242.pro13

The RStudio Desktop Pro is a mistake. I thought I was updating to the standard desktop version.

Using my set-up I can produce your Mermaid chart in

  • html
  • docx
  • odt
  • pdf

For a moment, I was having a problem running your chart plus another {mermaid} chart but a simple restart of R solved that problem.

So, at the moment, I have no idea what is happening. You might want to update R and Quarto just "because". A quick internet search is not turning up much but a possible work-around seems to be Mermaid not rendering in Quarto document in RStudio IDE visual editor - #3 by cderv.

Just for general interest here is my sessionInfo().

R version 4.6.1 (2026-06-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 26.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Toronto
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.6.1    lobstr_1.2.1      cli_3.6.6         tools_4.6.1       rstudioapi_0.19.0 pacman_0.5.1     
[7] rlang_1.3.0       pak_0.11.1