-
hello people! i'm trying to make a mermaid diagram with math equations in it (i'm using katex for rendering them). mermaid natively supports katex, but seems like the version currently in mkdocs-material does not. ```mermaid
flowchart LR
A-->B[a + $$b$$]
B-->D(text)
class A cssClass
``` so i tried to also include the mermaid cdn to the .md file <script src=" https://cdn.jsdelivr.net/npm/mermaid@10.9.0/dist/mermaid.min.js "></script> and now it actually shows the math typesetting but does not adapt the color to the theme. my attempts on using custom css classes as suggested here did not work. wanted to ask if there is a workaround (or perhaps if i'm doing something wrong). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Currently not supported, as this is kind of a mixup of two integrations. I'm not sure how this could be pulled off with a proper dark mode integration, but if somebody can cook something up, we can consider it. |
Beta Was this translation helpful? Give feedback.
Yes, as said, I recommend not to use our native integration which is only enabled when a code block tagged with the CSS
.mermaid
class is found, but add your own integration similar to how we do it by using SuperFences:Then, in JavaScript, look for code blocks with the class
.mermaid-custom
and register Mermaid.js as needed.