Tikz support

Is there likely to be any follow up on this? I’m also super interested in this!

2 Likes

Indeed, this would be great if someone could make this work.

4 Likes

100% support this, I like to take notes using latex and a diagram language like this would be perfect

2 Likes

Also support this. Would be especially nice for an easy integration of tikz-cd

3 Likes

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.

Thank you

1 Like

i neeeeeed this >_<

1 Like

I want it too

There’s a website named AoPS, which seems to support asymptote code to render math figures.

AoPS is very famous in math olympiad participators.

1 Like

Tikz support would be absolutely amazing.

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.

tikz_poc

Oh, and I’m not an experienced js/ts programmer, so I’m not sure I can translate this into an actually usable plugin

8 Likes

Really need this! BTW, can we also include xyjax? It’s already a mathjax extension and we dont have to install pdftex.

The stack project uses xyjax for commutative diagrams.

@thequilo whaoo that’s awesome !
Many thanks for the work, is it available somewhere, do you plan to share it with the community ?
Thanks

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

1 Like

I put together a small GitHub repository with the proof of concept code, in case anybody is interested: GitHub - thequilo/obsidian-tikz-renderer

4 Likes

@thequilo , awesome !
Thank you very much for this exciting plugin and congrats for the hard work.
You’ve made my day !

1 Like

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

  1. 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.)
  2. 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…
  3. 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.

1 Like

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.

How do I install this??

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.

1 Like

If you don’t mind, please give me the detail of usage of obsidian-tikzjax (my IT is very low). Many thanks!

1 Like