With this Obsidian.md plugin, you will be no longer disturbed by the flickering inline math!
Turned OFF | Turned ON |
---|---|
If you are a Latex Suite user, you will need to modify the following lines of the default snippet to avoid some conflicts.
{trigger: "(", replacement: "($0)$1", options: "mA"},
{trigger: "{", replacement: "{$0}$1", options: "mA"},
{trigger: "[", replacement: "[$0]$1", options: "mA"},
All you have to do is to remove $1
from replacement
. If your snippet looks like the following, you are good to go.
{trigger: "(", replacement: "($0)", options: "mA"},
{trigger: "{", replacement: "{$0}", options: "mA"},
{trigger: "[", replacement: "[$0]", options: "mA"},
Thank you @carpetdev for the insight!
It's simple. You can see what's going on under the hood by going to the plugin settings > "Debug mode" and turning on "Disable decorations".
Screen.Recording.2024-04-01.at.22.42.02.mov
Obsidian doesn't recognize $[space]...$
or $...[space]$
as a math.
So, when an inline math $...$
is found, this plugin inserts {}
at the beginning and end of it:
${} ... {}$
These braces are then hidden so that you are not disturbed by them (, which is disabled in the video above by "Disable decorations").
And importantly, they are automatically deleted when you escape from $...$
, so you don't need to worry about messing up your notes with braces!
Here's a list of other math-related plugins I've developed:
- LaTeX-like Theorem & Equation Referencer
- Better Math in Callouts & Blockquotes
- MathJax Preamble Manager
- Auto-\displaystyle Inline Math
If you find something is not working well, please report it by filing an issue. Attatching the following information is highly appreciated:
- The result of the "Show debug info" command
- Screen recording of what happened, with
Debug mode > Disable decorations
turned on. If possible, please visualize your keystroke with a tool like KeyCastr.
If you find my plugins useful, please support my work to ensure they continue to work!