Open NuclearGandhi opened 4 weeks ago
I have solved the problem in a very time-consuming, maybe overkill, but ultimately satisfying way. I wrote a python script to clean up the syntax of my files, e.g. for the example above:
> [!NOTE] Title
> ABCDEFG
> $$v=\alpha_1e_1 + \dots +\alpha_ne_n$$
> ABCDEFG
turn this into something more readable by general markdown standards:
> [!NOTE] Title
> ABCDEFG
>$$
>v=\alpha_1e_1 + \dots +\alpha_ne_n
>$$
> ABCDEFG
The reason I needed such a script is because Obsidian isn't punishing at all when parsing its markdown files, so parsers like 'remark' have a very hard time when amateur markdown users (me) abuse the user-friendliness of Obsidian. Should this be written into a plugin to run as a transformer
? Maybe, but it would be hard for the average user to debug it should the script mess something up.
So in the end I actually did create a plugin - mathblock-fixer.ts
. It probably still has a way to go, but it actually works quite well on my 500+ note vault.
Describe the bug Having a math block (display, not inline) in a callout, breaks the callout to two separate ones. I understand this probably has to do with
remark-parse
, but I want to make sure before I go into that rabbit hole.To Reproduce
Expected behavior In Obsidian we get:
You can help speed up fixing the problem by either
Desktop (please complete the following information):
node
Version: v20.9.0npm
version: v10.1.0Additional context
mathjax
, but inkatex
I get the same results.remark
handling single line double $ signs, and I fixed it using #607.