I do hope some talented, smart person decides to do this for the community. It would be very appreciated. I know it sounds dramatic, but things like this exisiting raise the average i.q. of humanity.
Yes, tikz support would be amazing! So, I wrote a quick proof of concept that renders a tikz picture to a png with an existing pdflatex installation and displays it in place. Just a dirty proof of concept without any libraries or custom styles yet, but shows that this is possible, at least on Linux.
Oh, and I’m not an experienced js/ts programmer, so I’m not sure I can translate this into an actually usable plugin
It’s not available anywhere yet. It’s currently a very messy call to pdflatex in a MarkdownCodeBlockProcessor, and probably only works reliably on Linux. But I can try to polish it a little and put it on GitHub
Awesome plugin @thequilo !
…I modified it a little bit so that it would work better… on Windows… on my computer at least. I hope it won’t crash… tell me if any bug happens. I’m not an experienced programmer, too, so I can’t tell whether it’s stable, or even usable. (It seemed fine for me)
Deleted features No more “{input}” and “{output}”'s in generating commands. They’re kind of error-prone, I think.
Added features
Configure LaTeX command and pdf2svg command separately. (Actually it’s a bug that my pdflatex would recognize the pdf2svg command after the semicolon as part of the file name.)
Cache files to reduce time and space usage. The cache is indexed by the first 32 characters of the source code’s MD5, and I haven’t handled the collision problem yet…
Configure the directory to store cached data. It’s initially .obsidian/TikZRendererGenerated.
Feature request I find out that the graphics generated are large… sometimes too large. I tried to handle it by adding the [scale=] option to LaTeX, but it doesn’t work. I hope someone would work it out. …Oh yes, and live preview.
Recently found a plugin that uses KitzJax to make diagrams in obsidian: GitHub - artisticat1/obsidian-tikzjax
This plugin works fine on my computer, you can also try it out.
Download and extract the obsidian-tikzjax-0.5.1.zip file from the link to .obsidian\plugins folder, open TikZJax in the third-party plugins in the obsidian settings, and you can use it.