No more flickering inline math

approved

by Ryota Ushio

Remove flickering inline math.

40 stars7,557 downloadsUpdated 1y agoMIT
View on GitHub

No More Flickering Inline Math for Obsidian

With this Obsidian.md plugin, you will be no longer disturbed by the flickering inline math!

Turned OFFTurned ON
Turned OFFTurned ON

Latex Suite compatibility

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!

How does it work?

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".

https://github.com/RyotaUshio/obsidian-inline-math/assets/72342591/cde99cc2-b1f9-4521-993f-c7bc63b5a9d4

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!

Companion plugins

Here's a list of other math-related plugins I've developed:

Reporting issues

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.

Support Development

If you find my plugins useful, please support my work to ensure they continue to work!

GitHub Sponsors

Buy Me A Coffee

Buy Me a Coffee at ko-fi.com

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.