Replies: 4 comments 1 reply
-
I don't think the freeze logic is accessible outside of Quarto CLI currently (thus the fact that you don't find documentation). FYI: |
Beta Was this translation helpful? Give feedback.
-
There is also this extension about tikz: https://github.com/danmackinlay/quarto_tikz maybe it does already what you want ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the recommendations above. Actually I tried diagram and quarto_tikz a few months ago. Sadly they were either outdated or crashed on my device at that time (not sure if they work now). Neither do they have a |
Beta Was this translation helpful? Give feedback.
-
Imagify might work for you. It's a Quarto / Pandoc filter that compiles tikz into svg. If you set it to save the SVG in separate files (perhaps in a folder that Quarto doesn't delete) it should only recreate them when the code has changed. It's not a sophisticated freeze method: it merely uses hashes of the tikz code as filenames, and since the hash is the same if the code stays the same, it simply avoids recreating files that already exist. |
Beta Was this translation helpful? Give feedback.
-
Description
I'm trying to implement a custom Lua filter to render TikZ code of the form
into an embedded figure in HTML, just like what a regular computational figure works. It's not too hard to implement though, with the aid of an example of Pandoc filter and dvisvgm. The major problem is that I failed to figure out how to
freeze
the computed result in a custom Lua filter, i.e. to preserve the generated.svg
file and prevent re-rendering. Seemingly little documentation is provided on this topic. Any suggestions would be appreciated!Beta Was this translation helpful? Give feedback.
All reactions