0xpapercut / obsidian-wypst

High quality rendering of Typst in Obsidian, powered by wypst.
MIT License
22 stars 2 forks source link

Fallback to LaTeX when variable is not found #1

Closed joelatschool closed 4 months ago

joelatschool commented 4 months ago

I have an existing vault full of LaTeX, and a great deal of LaTeX equations fail to render with this plugin enabled. The main issue I've noticed is that latex allows $dx$ to represent two variables next to each other, while in Typst $dx$ is an error when $dx$ is not defined. There are many LaTeX equations which Wypst detects as Typst as it does not contain a backslash but then fails to render because of this.

If possible, it would be best for Wypst to fallback to LaTeX when a variable is not found, or perhaps any time there is an error rendering the equation.

0xpapercut commented 4 months ago

@joelatschool Thanks for opening this issue. I hope to add some experimental options that will enable the behaviour you request. I'll link the PR here soon enough.