### 4 Comments

1. I am curious, why not use the externalize library in tikz? It will allow you to keep the relevant code for the figure in the corresponding document it should appear in and at the same time it will compile a pdf fitting just the image exactly as you describe in the post. On subsequent compiles, tikz will just include the pre-compiled pdf when it runs into that code. For large documents with a lot of figures this can significantly speed up compile time.

• Hi Lucas,

You are right, externalize is definitely the better choice for multiple or complex TiKZ figures.
Here is the link to the TiKZ/PGF manual.

Best, Tom.

• Thanks for the link! Tom.