Replies: 2 comments 5 replies
-
Could you share the project or at least a minimum working example? I know CeTZ isn't exactly optimised but this sounds like more of a Typst issue/feature request than just CeTZ... |
Beta Was this translation helpful? Give feedback.
-
I quite like the idea. Cetz could provide something like |
Beta Was this translation helpful? Give feedback.
-
Currently, I have a project that when compiled in once causes Typst's memory usage to explode. I solved it by putting it into a separate file and then importing the SVG. I think this could be solved with the help of an external tool. But there are many unclear things to me before even trying to start some prototype:
show
andset
rules? (e.g. should a previousset text(...)
change the font?)%
andem
) be handled?As a first step, one could preprocess the Typst file and just stupidly put the
canvas
in a separate file, prefix it with the imports and aset page(width: auto, height: auto, margin: 0pt)
and replace thecanvas
withimage("file.svg")
.That's not a great solution, though, as it's definitely expected that the document will look the same with and without externalize. Maybe with the upcoming context changes, it would be possible to make one dummy run that extracts all properties like
text.font
, the container size, styles, states, ..., saves them in a JSON, YAML or whatever and then the separate file could use this information.Beta Was this translation helpful? Give feedback.
All reactions