ush
August 26, 2023, 4:23pm
1
New in v0.3.0:
Now this plugin automatically removes hidden braces when you escape from an inline math!
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
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.
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.
And importantly, they are automatically deleted when you escape from $...$
, so you donāt need to worry about messing up your notes with braces!
Note:
If youāre interested in whatās going on under the hood, go to the plugin setting > Debug mode, and turn on āDisable decorationsā.
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
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ā¦
6 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.
ush
November 24, 2023, 11:14pm
4
Wow, Iām so sorry I was missing your replyā¦ Now this plugin automatically removes braces when escaping from an inline math, so the choice of inserted characters is no longer a big issue, I believe. But thank you for the suggestion!