This script automates the external compilation of tikz source files (TSF).
The script searches for TSF within its folder and in all the subfolders. The main tex file's preamble is used for the compilation of all the TSF. The used compiler is specified by the COMPILER variable.
The first time the script runs, all the TSF are compiled and the produced pdfs are moved at the same (sub)folder as the corresponding TSF. The pdfs have the same name as the TSF.
The names and the modification time of the TSF are stored in a pickled dictionary.
On subsequent runs, if there are new TSF or if the old TSF have been modified they are recompiled.
- No command line arguments. To change the input, you must edit the corresponding variables.
- The script must be placed on the same folder as the main tex file whose name is specified by the MAIN_FILE variable.
- The pickled dictionary is stored in a file whose name is specified by the PICKLE_FILE variable.
- All the TSF must have the extension specified by the EXT variable.
- If in order to compile the TSF you must use packages/options that are not included in the preamble of the main file, then you can specify them in the PREVIEW variable (e.g. the `preview` package).
- If there are major changes in the main tex files preamble (font changes etc) then in order to recompile all the TSF, just erase the PICKLE_FILE.