ush
August 26, 2023, 4:23pm
1
Hi all,
Let me share my new plugin No More Flickering Inline Math , which lets you work with inline math much more comfortably!
With this plugin, you will be no longer disturbed by the flickering inline math !
Turned OFF
Turned ON
Thank you to those who shared their ideas on the forum !
Installation
It’s still under review by the Obsidian team, but you can install it using BRAT.
Please refer to README for installation instructions.
How does it work?
It’s simple. 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 brackets are then hidden so that you are not disturbed by them.
Don’t like the bracket pollution? Don’t worry!
You can always safely clean up the brackets by running the following commands:
Clean up brackets in this note
Clean up brackets in all the opened notes
Related threads
Use case or problem
Currently, Obsidian recognizes $...$ as inline math only if there is no whitespace before the closing dollar sign. For example,
$S_n$ is inline math
editing mode: [image]
reading mode: [image]
but $S_n $ is not.
editing mode: [image]
reading mode: [image]
This causes user-UNfriendly behavior when we type inline math equations.
That is, every time we type a whitespace, the font changes from the math font (colored monospace in italics) to the normal text font, like th…
Steps to reproduce
The step is too simple. Write following.
$\Sigma$ and $ \Sigma $
Expected result
I expect to be rendered same inline sigma symbols.
Actual result
$\Sigma$ is rendered sigma simbol.
$ \Sigma $ is $ \Sigma $. Not changed.
Other editors I used, (jupyter, vscode, knowledge,…), correctly rendered both.
I don’t know is it bug, but it is hard to use for me.
Environment
Operating system: Windows 10
Debug info:
I used Obsidian 1.0.0.
Additional information
Steps to reproduce
Take a math formula: $x+y = 5$. ← This should render properly.
However, adding a space in the beginning or end will cause Obsidian to not consider this a formula anymore: $ x+y = 5 $ ← This will not be parsed as a formula.
I would understand why would the previous expression not be parsed as a formula in its final state, but, during typing $x+y = 5$ the interpreter constantly (for every space) switches from considering it a formula to not considering it a formula for each ar…
Could we let the syntax parsing program recognize the words embraced by the dollar signs as an inline math block without considering the presence of blank spaces immediately after and before the dollar signs
For instance, see the following thread.
For a reason, when writing in LaTeX, it is necessary to type a space after a math code, hence the live preview may break down for a moment before typing the following characters after one finishes writing a math symbol.
Hi. When I type inline math equations in the Live Preview mode, the font changes from monospace one to that of standard text every time I insert white space, like this:
[ezgif-3-76ababde5e]
I don’t think it’s a bug, but this distracts me a little bit.
So I wonder if there’s a workaround (maybe CSS snippets?) to avoid this phenomenon and keep the font consistent while typing equations.
I searched the doc, this forum, and other relevant websites but got nothing. So I appreciate it if you could…
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)
[image]
Normal text font
[image]
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 cur…
5 Likes
jiwonac
September 14, 2023, 4:20am
2
FYI I believe appending the empty unicode character to the start and end of an equation also prevents flickering while being a bit less intrusive to the source code.
jiwonac
September 14, 2023, 4:42am
3
By empty unicode character I mean “Braille Pattern Blank” Obsidian seems to not consider it whitespace.