Hi. I originally posted this issue in the Help category:
But after some conversation with those who gave me replies, I decided to post this as a bug report.
Terminology
There are two font styles involved. For convenience, let me define their names, as below:
- Math font (colored monospace in italics)
- Normal text font
Steps to reproduce
- Enter the editing mode in the sandbox vault. (This bug happens both in the source mode and in the live preview.)
- Type
$$
and move the cursor between these two dollar signs. - Type some equation in it, separating symbols with white spaces, e.g.,
$S_n = \sum_{i=1}^n a_i$
.
Did you follow the troubleshooting guide? [Y/N]
Yes
Expected result
The editor should keep displaying the math font while I’m typing the equation.
Actual result
Every time you insert a white space, you will see the font changes from the math font to the normal text font, like this:
Environment
SYSTEM INFO:
Obsidian version: v1.3.5
Installer version: v1.3.5
Operating system: Darwin Kernel Version 22.3.0: Thu Jan 5 20:53:49 PST 2023; root:xnu-8792.81.2~2/RELEASE_X86_64 22.3.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
See the original post that I mentioned at the beginning for some discussions.
In particular, it has been confirmed that this phenomenon seems to be caused by the white space right before the closing dollar sign, so a simple dirty workaround such as $(type the equation here) \hspace{0em}$
works.
Thank you.