bauglir / Kroki.jl

Supports creating a variety of diagrams through the https://kroki.io service.

Home Page:https://bauglir.github.io/Kroki.jl/stable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for TikzPictures

kdheepak opened this issue · comments

Thanks for making this package!

Would it be possible to add support for TikzPictures?

https://github.com/JuliaTeX/TikzPictures.jl

I'm sorry it took so long to get back to you @kdheepak.

To clarify, this package does not directly "support" specific diagram types, it only supports those diagrams supported by the main Kroki project.

Hence if you're specifically asking whether this package can support the Julia TikzPictures package then the answer would be that that is not the intended purpose, so no. I could see the case for an extension so that the TikzPicture type could be used but rendered using Kroki, but that is highly speculative as I haven't looked deeply at the corresponding code. I would prefer to only add that as an "extension" though, which would require Julia v1.9 or later while this package currently supports v1.6 and later. So such an extension would have to wait until support for versions prior to v1.9 would be dropped.

If you're asking whether it would be possible to support Tikz in general, then the answer is yes! As of v0.21.0, which was released about a month after you filed this issue, Kroki supports Tikz/PGF. That technically means that you could already use this package to render Tikz diagrams right now by explicitly constructing Diagram(:tikz, ...) instances, but in the context of #42 I am also adding the string literals, etc. to make Tikz "truly supported", i.e. tikz"""...""" would also work as of the next release.

Awesome! Thank you!