#6587·Zettlr

mermaid fails latex math

Author: TheoreticallyhugoCreated Sep 22, 2026Updated Sep 22, 2026
Labelsbug

Description

Mermaid started supporting latex math in its diagrams in 10.9.0, and this project uses Mermaid 11, but I haven't been able to get latex math to work in the diagrams.

Reproducing

Paste the following mermaid block (taken from the docs

mermaid
 graph LR
      A["$$x^2$$"] -->|"$$\sqrt{x+3}$$"| B("$$\frac{1}{2}$$")
      A -->|"$$\overbrace{a+b+c}^{\text{note}}$$"| C("$$\pi r^2$$")
      B --> D("$$x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases}$$")
      C --> E("$$x(t)=c_1\begin{bmatrix}-\cos{t}+\sin{t}\\ 2\cos{t} \end{bmatrix}e^{2t}$$")

Zettlr version

4.8.0

Installation Method

Flathub

Installation Method (Other)

No response

Your Platform

  • Windows
  • macOS
  • Linux

Architecture

  • Intel 64bit
  • ARM 64bit (includes Apple Silicon)

Operating System Version

Fedora 44 KDE

Additional Information

I'm not sure whether this is a bug, or simply not supported by Zettlr. In the latter case, please do convert this to a feature request.