Quantcast
Channel: How to create a meta directive in arara? - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

How to create a meta directive in arara?

$
0
0

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.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>