-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for externalizing tikz images.
This commit will cause all the tikz images to be generated first in the tikz-cache folder before being included in the main PDF file. There are several issues that need to be resolved for this to work: - The tikz-cache folder is not auto-generated, so it is being tracked in version control to avoid users cloning the repo and seeing mysterious error messages when compiling. No cached tikz files should be added to this directory. - The \newenvironment command used in our custom circuit and plot environments does not play well with the externalizing library. These were modified to use the environ library which solves the problem as described [here](https://tex.stackexchange.com/a/15614) - This caching significantly improves the compile time when figures are already cached, but the first compile takes much longer since the image compilation is single-threaded. However, it is possible to use tikzexternalize in `list and make` mode which allows you to use `make -j` to compile all the images using multiple threads. This requires running the pdflatex commands manually without some more complex configuration of a latexmkrc file. Only attempt this if you know what you are doing. Otherwise, just wait a couple minutes for the compilation.
- Loading branch information
Showing
4 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,7 @@ | |
# latexrun | ||
latex.out/ | ||
|
||
## Tikz externalize files | ||
*.makefile | ||
*.figlist | ||
*.auxlock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This tikz-cache folder is here to cache the tikz images. | ||
# It is needed by the \tikzpackage{external} library. | ||
# This folder is not automatically generated, so it's tracked in version control | ||
# to prevent new users from seeing cryptic compile errors. | ||
* | ||
!.gitignore |