zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.1k stars 223 forks source link

Latex Utilising Preamble.sty if it exists #563

Closed mayurankv closed 2 years ago

mayurankv commented 2 years ago

Is your feature request related to a problem? Please describe. Currently the latex feature allows (what I believe to be) standard mathjax. There is a widely used plugin (https://github.com/xldenis/obsidian-latex) which allows users to add a preamble to latex (allowing definition of macros and operators and such). Currently excalidraw does not recognise these commands and thus users have to write different commands as they would outside excalidraw which is a little jarring and time consuming for people with many shortcuts.

Describe the solution you'd like Ideally excalidraw latex would utilise the defined preamble in conjunction with the above plugin if such a preamble exists.

Describe alternatives you've considered Entering the \newcommand and \operatorname tex commands into excalidraw latex inserts (making seemingly invisible boxes) allows these to be used but it is far from an efficient solution and hard to edit.

zsviczian commented 2 years ago

Thanks for letting me know. I was not aware. I will definitely take a look to see what it would take to integrate this into Obsidian-Excalidraw. LaTeX is one of the very few features in Obisidian-Exclidraw that I do not use myself, thus I don't really have a personal need that drives my development work in this case. You can call this a blind spot.

mayurankv commented 2 years ago

Thank you so much for adding it in that case! It is literally a gamechanger for me and I'm sure many others. Hopefully it's a pretty straightforward addition but either way the latex feature is amazing!

zsviczian commented 2 years ago

I will release the feature in 1.6.23 later tonight

mayurankv commented 2 years ago

Thank you!