First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
I am trying to get exponents and parentheses to render in Obsidian Mermaid diagram, below.
graph TD
A[Problem] --> B{Is it a data organization problem?}
B -->|Yes| C{Is data order important?}
B -->|No| D{Does it involve finding specific items?}
C -->|Yes| E["<b>Sorting Algorithms</b>
<u>Comparison Based</u>
Bubble Sort <math><mi>= O(n^2)</mi></math>
Selection Sort = O()
Insertion Sort = O()
Merge Sort = O() #DivideAndConquer
Quick Sort = O() #DivideAndConquer
Heap Sort = O()
"]
Things I have tried
Search terms: Latex, Katex, Mermaid
To get the parentheses to render, I wrap the text in quotation marks. That’s working.
To get the exponents to render, well, I don’t know what to do. But it appears from the following discussion that something should work? I haven’t yet figured out what works, though. I’ve tried $, $$ and html tags like and . Nothing I’ve tried has worked yet.
Discussion: Adding LaTeX math support via Katex · Issue #2776 · mermaid-js/mermaid · GitHub