I am using arara to automatically compile some tikz images as standalone files. I have a bunch of these figures and they all have the same set of directives
% arara: clean: { extensions: [ aux, bbl, bcf, blg, out, run.xml ] }
% arara: pdflatex: { options: [ '-halt-on-error' ], interaction: batchmode }
% arara: biber: { options: [ '--validate_datamodel' ] }
% arara: pdflatex: { options: [ '-halt-on-error' ], interaction: batchmode }
% arara: --> until !found('log', 'Rerun to get cross-references right.')
% arara: --> && !found('log', 'There were undefined references.')
% arara: clean: { extensions: [ aux, bbl, bcf, blg, out, run.xml ] }
I end up copying these to each image file, but that is a lot of copy and paste and updating if I get something wrong. It is almost a perfect use case for a preamble
preambles:
mytikzimage: |
% arara: clean: { extensions: [ aux, bbl, bcf, blg, out, run.xml ] }
% arara: pdflatex: { options: [ '-halt-on-error' ], interaction: batchmode }
% arara: biber: { options: [ '--validate_datamodel' ] }
% arara: pdflatex: { options: [ '-halt-on-error' ], interaction: batchmode }
% arara: --> until !found('log', 'Rerun to get cross-references right.')
% arara: --> && !found('log', 'There were undefined references.')
% arara: clean: { extensions: [ aux, bbl, bcf, blg, out, run.xml ] }
and calling arara with a -p switch: arara -p mytikzimage, but I want to use a short cut key from my editor which is setup to just call arara. What I would like to be able to do is have something like
% arara: meta: mytikzimage
in the tex file itself that would somehow know about the preamble or some directive that calls all the other directives.