What is the latest for using `Weave.jl` with Tikz images?

I was wondering if it is possible to embed Tikz images into Weave files, for rendering to html or pdf? I have tikz snippets and I was wondering if there is an easy way to migrate these into Weave rendered documents.

Now in looking at the Weave repo, there is a reference to one issue about this. Output markdown with math as images · Issue #287 · JunoLab/Weave.jl · GitHub . But the solution that was referenced there was to use this GenTex package, GitHub - rikhuijzer/GenTeX.jl: Generate LaTeX images. However, that package is also deprecated and archived now.

So I figured I would check whether anyone had figured out a suitable workaround as yet? I think that using Mathjax or Katex or something would support tikz. I have used Tikz images when creating Hugo blog posts etc., but I am not sure how difficult that is to link into Weave.

Any suggestions would be appreciated.

At the risk of not being what you asked for, Franklin has a demo using tikzcd: Franklin FAQ (I’m only mentioning this since you specifically mention Hugo, if you do want PDF output, Franklin does not support that yet though it will in a matter of months)
TikzCD is based on TikzPictures which might also be of interest

@tlienart Oh thanks for pointing that out. I did not realize that Franklin could do tikz stuff now. I remember looking at the project a while ago, but glad to see that it has matured so much. I will take a look at the docs. I would still like a way to export to pdf, but it is nice that there is a julia solution for the web side at least :). Thanks again.

1 Like