I am trying to get the following right.
Please help me find out what is wrong.
a = {1, 2, 3}
When I write LaTeX code between $$, it renders. However, when I try to write above using the code below, the right curly brace is not rendered correctly.
$$
a = {1, 2, 3}
$$
It looks something like below. It is the same in the exported PDF.
a = {1, 2
Things I have tried
I tried to add an extra backslash but it give me an error.
Having pasted above code to a site that support MathJax and it renders fine.
Obsidian version is Version 1.5.3 (Installer 1.4.16) on macOS 14.2.1(23C71).
This is not Obsidian specific. That’s how latex works. You need to escape the braces with backslashes because they are reserved for commands like \sqrt{}.