Skip to content

RyotaUshio/obsidian-inline-math

Repository files navigation

No More Flickering Inline Math for Obsidian

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

Turned OFF Turned ON
Turned OFF Turned ON

Thank you to those who shared their ideas on the forum!

Warning

Make sure you understand how this plugin works before using it.

Installation

You can find it in Obsidian's community plugins browser.

Also, you can participate in the beta-testing of the latest version by installing it using BRAT.

  1. Install the BRAT community plugin and enable it.
  2. Go to Options. In the Beta Plugin List section, click on the Add Beta plugin button.
  3. Copy and paste https://github.com/RyotaUshio/obsidian-inline-math in the pop-up prompt and click on Add Plugin.
  4. (Optional) Turn on Auto-update plugins at startup at the top of the page.
  5. Go to Community plugins > Installed plugins. You will find "No more flickering inline math" in the list. Click on the toggle button to enable it.

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

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!

But just in case, this plugin also offers the following commands to surely clean up the braces:

  • Clean up braces in this note
  • Clean up braces in all the opened notes

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 are enjoying this plugin, please consider supporting me by buying me a coffee!

Buy Me A Coffee