0

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.

Bubaya
  • 2,279
  • 1
    A similar question (but not duplicate) is https://tex.stackexchange.com/questions/307002/how-to-automatically-compile-my-standalone-files-before-inserting-them, however that is not fully automatic and I also need to admit that I don't really understand what the answer to that question is supposed to do. – Marijn Mar 23 '23 at 09:18
  • 3
    You can typeset arbitrary content using a sepate document, perhaps using standalone class and then \includegraphics the generated pdf. – David Carlisle Mar 23 '23 at 09:45
  • Idea for a possible implementation: 1. typeset & save content in box and output a page with just that box using https://tex.stackexchange.com/questions/384922/how-to-save-a-box-to-a-file-so-it-can-be-viewed-later-for-debugging-purposes. 2. store the md5 sums of each box in the .aux file. 3. store the page numbers of all the box-pages in a file. 4. run an external script to extract those pages from the pdf and store each page in a separate pdf after cropping them. 4. on next run, check md5, if equal includegraphics the box, otherwise go to 1 for this box. – Marijn Mar 23 '23 at 13:36

0 Answers0