I find that working with tikzexteralize can become quite complicated. I am therefore wondering if tikzexternalize is really the best approach. I guess I am thinking something like:
Can we externalize not only tikz, but arbitrary boxes?
Edit: I should be more clear about what I want. I'm dreaming of a command \externalize, such that
Some lengthy document
\externalize{some code}
compiles some code into a pdf if it has changed, with all definitions and settings in effect when \externalize is called, and subsequently includes it.
Now, that's a dream, and I happily read everything that goes in that direction.
standaloneclass and then\includegraphicsthe generated pdf. – David Carlisle Mar 23 '23 at 09:45