From 898048513951b471a492afa23e46112d14bcb236 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 5 Mar 2020 03:00:59 +0000 Subject: CTAN sync 202003050300 --- support/arara/scripts/rules/animate.yaml | 8 +-- support/arara/scripts/rules/asymptote.yaml | 62 ++++++++++++++++++++++ support/arara/scripts/rules/bib2gls.yaml | 11 ++-- support/arara/scripts/rules/biber.yaml | 21 ++++++-- support/arara/scripts/rules/bibtex.yaml | 7 ++- support/arara/scripts/rules/bibtex8.yaml | 7 ++- support/arara/scripts/rules/bibtexu.yaml | 7 ++- support/arara/scripts/rules/clean.yaml | 11 ++-- support/arara/scripts/rules/csplain.yaml | 6 +-- support/arara/scripts/rules/datatooltk.yaml | 5 +- support/arara/scripts/rules/dvipdfm.yaml | 9 ++-- support/arara/scripts/rules/dvipdfmx.yaml | 9 ++-- support/arara/scripts/rules/dvips.yaml | 9 ++-- support/arara/scripts/rules/dvipspdf.yaml | 13 +++-- support/arara/scripts/rules/dvisvgm.yaml | 4 +- support/arara/scripts/rules/etex.yaml | 8 ++- support/arara/scripts/rules/frontespizio.yaml | 12 ++--- support/arara/scripts/rules/halt.yaml | 7 +-- support/arara/scripts/rules/indent.yaml | 6 +-- support/arara/scripts/rules/knitr.yaml | 58 ++++++++++++++++++++ support/arara/scripts/rules/latex.yaml | 20 +++++-- support/arara/scripts/rules/latexmk.yaml | 8 ++- support/arara/scripts/rules/luahbtex.yaml | 54 +++++++++++++++++++ support/arara/scripts/rules/lualatex.yaml | 20 +++++-- support/arara/scripts/rules/luatex.yaml | 7 ++- support/arara/scripts/rules/make.yaml | 5 +- support/arara/scripts/rules/makeglossaries.yaml | 10 ++-- .../arara/scripts/rules/makeglossarieslite.yaml | 8 ++- support/arara/scripts/rules/makeindex.yaml | 7 ++- support/arara/scripts/rules/metapost.yaml | 50 +++++++++++++++++ support/arara/scripts/rules/nomencl.yaml | 10 ++-- support/arara/scripts/rules/pbibtex.yaml | 27 ++++++++++ support/arara/scripts/rules/pdfcsplain.yaml | 6 +-- support/arara/scripts/rules/pdflatex.yaml | 20 +++++-- support/arara/scripts/rules/pdftex.yaml | 7 ++- support/arara/scripts/rules/pdftk.yaml | 7 ++- support/arara/scripts/rules/platex.yaml | 60 +++++++++++++++++++++ support/arara/scripts/rules/ps2pdf.yaml | 9 ++-- support/arara/scripts/rules/ptex.yaml | 49 +++++++++++++++++ support/arara/scripts/rules/sketch.yaml | 8 +-- support/arara/scripts/rules/songidx.yaml | 4 +- support/arara/scripts/rules/tex.yaml | 7 ++- support/arara/scripts/rules/texindy.yaml | 7 ++- support/arara/scripts/rules/tikzmake.yaml | 6 +-- support/arara/scripts/rules/upbibtex.yaml | 27 ++++++++++ support/arara/scripts/rules/uplatex.yaml | 60 +++++++++++++++++++++ support/arara/scripts/rules/uptex.yaml | 49 +++++++++++++++++ support/arara/scripts/rules/velocity.yaml | 41 -------------- support/arara/scripts/rules/xdvipdfmx.yaml | 9 ++-- support/arara/scripts/rules/xelatex.yaml | 20 +++++-- support/arara/scripts/rules/xetex.yaml | 7 ++- support/arara/scripts/rules/xindex.yaml | 49 +++++++++++++++++ support/arara/scripts/rules/xindy.yaml | 7 ++- 53 files changed, 746 insertions(+), 219 deletions(-) create mode 100644 support/arara/scripts/rules/asymptote.yaml create mode 100644 support/arara/scripts/rules/knitr.yaml create mode 100644 support/arara/scripts/rules/luahbtex.yaml create mode 100644 support/arara/scripts/rules/metapost.yaml create mode 100644 support/arara/scripts/rules/pbibtex.yaml create mode 100644 support/arara/scripts/rules/platex.yaml create mode 100644 support/arara/scripts/rules/ptex.yaml create mode 100644 support/arara/scripts/rules/upbibtex.yaml create mode 100644 support/arara/scripts/rules/uplatex.yaml create mode 100644 support/arara/scripts/rules/uptex.yaml delete mode 100644 support/arara/scripts/rules/velocity.yaml create mode 100644 support/arara/scripts/rules/xindex.yaml (limited to 'support/arara/scripts/rules') diff --git a/support/arara/scripts/rules/animate.yaml b/support/arara/scripts/rules/animate.yaml index ac6dc347bb..d5baefa67d 100644 --- a/support/arara/scripts/rules/animate.yaml +++ b/support/arara/scripts/rules/animate.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,14 +8,14 @@ identifier: animate name: Animate authors: - Chris Hughes -- Paulo Cereda +- Island of TeX commands: - name: The Convert program command: > @{ prefix = []; - input = getBasename(file).concat('.pdf'); - output = getBasename(file).concat('.gif'); + input = getBasename(reference).concat('.pdf'); + output = getBasename(reference).concat('.gif'); if (isUnix()) { prefix = [ program ]; } diff --git a/support/arara/scripts/rules/asymptote.yaml b/support/arara/scripts/rules/asymptote.yaml new file mode 100644 index 0000000000..c58e7dd0e5 --- /dev/null +++ b/support/arara/scripts/rules/asymptote.yaml @@ -0,0 +1,62 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: asymptote +name: Asymptote +authors: +- Island of TeX +commands: +- name: Asymptote + command: > + @{ + return getCommand('asy', color, engine, twice, + format, output, options, file); + } +arguments: +- identifier: color + flag: > + @{ + if ([ 'bw', 'cmyk', 'rgb', 'gray' ].contains(parameters.color)) { + return '-' + parameters.color; + } else { + throwError('The provided color enforcement is not valid.'); + } + } +- identifier: engine + flag: > + @{ + if ([ 'latex', 'pdflatex' , 'xelatex', 'lualatex', 'tex', 'pdftex', + 'luatex', 'context', 'none' ].contains(parameters.engine)) { + return [ '-tex', parameters.engine ]; + } else { + throwError('The provided TeX engine is invalid.'); + } + } + default: latex +- identifier: twice + flag: > + @{ + return isTrue(parameters.twice, '-twice'); + } +- identifier: format + flag: > + @{ + return [ '-f', parameters.format ]; + } +- identifier: output + flag: > + @{ + return [ '-o', parameters.output ]; + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/bib2gls.yaml b/support/arara/scripts/rules/bib2gls.yaml index 9a97920717..a33744faec 100644 --- a/support/arara/scripts/rules/bib2gls.yaml +++ b/support/arara/scripts/rules/bib2gls.yaml @@ -1,14 +1,13 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: bib2gls name: Bib2Gls authors: -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The Bib2Gls software command: > @@ -23,7 +22,7 @@ commands: prefix = [ 'cmd', '/c', 'del' ]; } - base = getBasename(file); + base = getBasename(reference); removals = []; lines = readFromFile(base.concat('.').concat('aux')); @@ -63,7 +62,7 @@ commands: return getCommand('bib2gls', dir, trans, group, interpret, breakspace, trimfields, recordcount, recordcountunit, cite, verbose, merge, locale, uniscript, packages, - ignore, custom, mapformats, options, getBasename(file)); + ignore, custom, mapformats, options, getBasename(reference)); } } arguments: @@ -80,7 +79,7 @@ arguments: throwError('Forbidden transcript extension'); } - return ['--log-file', getBasename(file)+"."+parameters.trans] + return ['--log-file', getBasename(reference)+"."+parameters.trans] } - identifier: locale flag: > diff --git a/support/arara/scripts/rules/biber.yaml b/support/arara/scripts/rules/biber.yaml index 9ba02bc6b2..8cf9acb474 100644 --- a/support/arara/scripts/rules/biber.yaml +++ b/support/arara/scripts/rules/biber.yaml @@ -1,21 +1,34 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: biber name: Biber authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The Biber reference management software command: > @{ - return getCommand('biber', options, getBasename(file)); + if (tool) { + return getCommand('biber', '--tool', options); + } + else { + return getCommand('biber', options, getBasename(file)); + } } arguments: +- identifier: tool + flag: > + @{ + return isTrue(parameters.tool); + } + default: > + @{ + return false; + } - identifier: options flag: > @{ diff --git a/support/arara/scripts/rules/bibtex.yaml b/support/arara/scripts/rules/bibtex.yaml index 5cbe5c1756..55dd1f0fec 100644 --- a/support/arara/scripts/rules/bibtex.yaml +++ b/support/arara/scripts/rules/bibtex.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: bibtex name: BibTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The BibTeX reference management software command: > @{ - return getCommand('bibtex', options, getBasename(file)) + return getCommand('bibtex', options, getBasename(reference)) } arguments: - identifier: options diff --git a/support/arara/scripts/rules/bibtex8.yaml b/support/arara/scripts/rules/bibtex8.yaml index 8a4631ff77..3741a920ea 100644 --- a/support/arara/scripts/rules/bibtex8.yaml +++ b/support/arara/scripts/rules/bibtex8.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: bibtex8 name: BibTeX8 authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: An 8-bit implementation of BibTeX 0.99 with a very large capacity command: > @{ - return getCommand('bibtex8', options, getBasename(file)); + return getCommand('bibtex8', options, getBasename(reference)); } arguments: - identifier: options diff --git a/support/arara/scripts/rules/bibtexu.yaml b/support/arara/scripts/rules/bibtexu.yaml index f580886d95..b1e6d18165 100644 --- a/support/arara/scripts/rules/bibtexu.yaml +++ b/support/arara/scripts/rules/bibtexu.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: bibtexu name: BibTeXu authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: An 8-bit implementation of BibTeX 0.99 with a very large capacity command: > @{ - return getCommand('bibtexu', options, getBasename(file)); + return getCommand('bibtexu', options, getBasename(reference)); } arguments: - identifier: options diff --git a/support/arara/scripts/rules/clean.yaml b/support/arara/scripts/rules/clean.yaml index 1a39ed3f27..2a82eb3a87 100644 --- a/support/arara/scripts/rules/clean.yaml +++ b/support/arara/scripts/rules/clean.yaml @@ -1,14 +1,13 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: clean name: Clean authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: Cleaning feature command: > @@ -21,13 +20,13 @@ commands: prefix = [ 'cmd', '/c', 'del' ]; } if (extensions == '') { - if (getOriginalFile() == file) { + if (getOriginalReference() == reference) { throwError('I cannot remove the main file reference.'); } - return getCommand(prefix, file); + return getCommand(prefix, reference); } else { - base = getBasename(file); + base = getBasename(reference); removals = []; foreach(extension : extensions) { if (base.concat('.').concat(extension) == getOriginalFile()) { diff --git a/support/arara/scripts/rules/csplain.yaml b/support/arara/scripts/rules/csplain.yaml index cfdcc95421..33e13c1a93 100644 --- a/support/arara/scripts/rules/csplain.yaml +++ b/support/arara/scripts/rules/csplain.yaml @@ -1,19 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: csplain name: CSplain authors: -- Paulo Cereda +- Island of TeX commands: - name: CSplain engine command: > @{ return getCommand('csplain', interaction, draft, - shell, synctex, options, file); + shell, synctex, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/datatooltk.yaml b/support/arara/scripts/rules/datatooltk.yaml index 0b80d15e75..6fc08491c8 100644 --- a/support/arara/scripts/rules/datatooltk.yaml +++ b/support/arara/scripts/rules/datatooltk.yaml @@ -1,14 +1,13 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: datatooltk name: DatatoolTk authors: -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The DatatoolTk software command: > diff --git a/support/arara/scripts/rules/dvipdfm.yaml b/support/arara/scripts/rules/dvipdfm.yaml index d2dca0db36..e80fe5bf98 100644 --- a/support/arara/scripts/rules/dvipdfm.yaml +++ b/support/arara/scripts/rules/dvipdfm.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: dvipdfm name: DVIPDFM authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The DVIPDFM program command: > @{ - base = getBasename(file).concat('.dvi'); + base = getBasename(reference).concat('.dvi'); out = getBasename(output).concat('.pdf'); return getCommand('dvipdfm', base, '-o', out, options); } @@ -25,7 +24,7 @@ arguments: } default: > @{ - file + reference } - identifier: options flag: > diff --git a/support/arara/scripts/rules/dvipdfmx.yaml b/support/arara/scripts/rules/dvipdfmx.yaml index 2feb9f0fe9..e4af77204b 100644 --- a/support/arara/scripts/rules/dvipdfmx.yaml +++ b/support/arara/scripts/rules/dvipdfmx.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: dvipdfmx name: DVIPDFMX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The DVIPDFMX program command: > @{ - base = getBasename(file).concat('.dvi'); + base = getBasename(reference).concat('.dvi'); out = getBasename(output).concat('.pdf'); return getCommand('dvipdfmx', base, '-o', out, options); } @@ -25,7 +24,7 @@ arguments: } default: > @{ - file + reference } - identifier: options flag: > diff --git a/support/arara/scripts/rules/dvips.yaml b/support/arara/scripts/rules/dvips.yaml index dd7a929bd0..c110f19679 100644 --- a/support/arara/scripts/rules/dvips.yaml +++ b/support/arara/scripts/rules/dvips.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: dvips name: DVIPS authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The DVIPS program command: > @{ - base = getBasename(file).concat('.dvi'); + base = getBasename(reference).concat('.dvi'); out = getBasename(output).concat('.ps'); return getCommand('dvips', base, '-o', out, options); } @@ -25,7 +24,7 @@ arguments: } default: > @{ - file + reference } - identifier: options flag: > diff --git a/support/arara/scripts/rules/dvipspdf.yaml b/support/arara/scripts/rules/dvipspdf.yaml index 4190b1869c..52df9731df 100644 --- a/support/arara/scripts/rules/dvipspdf.yaml +++ b/support/arara/scripts/rules/dvipspdf.yaml @@ -1,26 +1,25 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: dvipspdf name: DVIPSPDF authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The DVIPS program command: > @{ - base = getBasename(file).concat('.dvi'); - out = getBasename(file).concat('.ps'); + base = getBasename(reference).concat('.dvi'); + out = getBasename(reference).concat('.ps'); return getCommand('dvips', base, '-o', out, options1); } - name: The PS2PDF program command: > @{ - base = getBasename(file).concat('.ps'); + base = getBasename(reference).concat('.ps'); out = getBasename(output).concat('.pdf'); return getCommand('ps2pdf', options2, base, '-o', out); } @@ -32,7 +31,7 @@ arguments: } default: > @{ - file + reference } - identifier: options1 flag: > diff --git a/support/arara/scripts/rules/dvisvgm.yaml b/support/arara/scripts/rules/dvisvgm.yaml index 0b5377f29d..34edc09c57 100644 --- a/support/arara/scripts/rules/dvisvgm.yaml +++ b/support/arara/scripts/rules/dvisvgm.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -12,7 +12,7 @@ commands: - name: The dvisvgm program command: > @{ - base = getBasename(file).concat('.dvi'); + base = getBasename(reference).concat('.dvi'); return getCommand('dvisvgm', base, options); } arguments: diff --git a/support/arara/scripts/rules/etex.yaml b/support/arara/scripts/rules/etex.yaml index 15f8bf5412..6145fad112 100644 --- a/support/arara/scripts/rules/etex.yaml +++ b/support/arara/scripts/rules/etex.yaml @@ -1,20 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: etex name: eTeX authors: -- Marco Daniel -- Paulo Cereda -- Nicola Talbot +- Island of TeX commands: - name: Extended TeX engine command: > @{ - return getCommand('etex', interaction, shell, options, file); + return getCommand('etex', interaction, shell, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/frontespizio.yaml b/support/arara/scripts/rules/frontespizio.yaml index 45f3a4bf4f..a4637ff9f8 100644 --- a/support/arara/scripts/rules/frontespizio.yaml +++ b/support/arara/scripts/rules/frontespizio.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -9,23 +9,23 @@ name: Frontespizio authors: - Francesco Endrici - Enrico Gregorio -- Paulo Cereda +- Island of TeX commands: - name: The engine command: > @{ - return getCommand(engine, interaction, shell, options, file) + return getCommand(engine, interaction, shell, options, reference) } - name: The frontispiece command: > @{ - base = getBasename(file).concat('-frn'); + base = getBasename(reference).concat('-frn'); return getCommand(engine, interaction, shell, base); } - name: The DVIPS program command: > @{ - base = getBasename(file).concat('-frn'); + base = getBasename(reference).concat('-frn'); eps = base.concat('.eps'); return isTrue(engine == 'latex', getCommand('dvips', '-o', eps, base), ''); @@ -33,7 +33,7 @@ commands: - name: The engine command: > @{ - return getCommand(engine, interaction, shell, options, file); + return getCommand(engine, interaction, shell, options, reference); } arguments: - identifier: engine diff --git a/support/arara/scripts/rules/halt.yaml b/support/arara/scripts/rules/halt.yaml index 9d8aaa8aef..1c14644bcb 100644 --- a/support/arara/scripts/rules/halt.yaml +++ b/support/arara/scripts/rules/halt.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,11 +8,12 @@ identifier: halt name: Halt authors: - Heiko Oberdiek -- Paulo Cereda +- Island of TeX commands: - name: The halt trigger command: > @{ - return getTrigger('halt'); + halt(0); + return true; } arguments: [] diff --git a/support/arara/scripts/rules/indent.yaml b/support/arara/scripts/rules/indent.yaml index b1e182f0a7..5ef623c5db 100644 --- a/support/arara/scripts/rules/indent.yaml +++ b/support/arara/scripts/rules/indent.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,13 +8,13 @@ identifier: indent name: Indent authors: - Chris Hughes -- Paulo Cereda +- Island of TeX commands: - name: The latexindent.pl script command: > @{ return getCommand('latexindent', silent, trace, screenlog, - settings, cruft, overwrite, output, file, modifylinebreaks, + settings, cruft, overwrite, output, reference, modifylinebreaks, replacement, options, logfile); } arguments: diff --git a/support/arara/scripts/rules/knitr.yaml b/support/arara/scripts/rules/knitr.yaml new file mode 100644 index 0000000000..da17289db2 --- /dev/null +++ b/support/arara/scripts/rules/knitr.yaml @@ -0,0 +1,58 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: knitr +name: knitr +authors: +- Adam Liter +- Island of TeX +commands: +- name: knitr + command: > + @{ + elements = []; + if (!isEmpty(tangle)) elements.add('tangle = ' + tangle); + if (!isEmpty(quiet)) elements.add('quiet = ' + quiet); + elements.add('envir = ' + envir); + elements.add('encoding = ' + encoding); + return getCommand('Rscript', '-e', + 'library(knitr); knit("' + file + '", ' + + 'output = ' + isEmpty(output, 'NULL', '"' + output + '"') + ', ' + + String.join(', ', elements) + ')'); + } +arguments: +- identifier: output + flag: > + @{ + return parameters.output; + } +- identifier: tangle + flag: > + @{ + if(isTrue(parameters.tangle) && !parameters.containsKey('output')) { + throwError('If you want to tangle the document, specify an output file.'); + } + else { + isTrue(parameters.tangle, 'TRUE', 'FALSE') + } + } +- identifier: quiet + flag: > + @{ + isTrue(parameters.quiet, 'TRUE', 'FALSE') + } +- identifier: envir + flag: > + @{ + return parameters.envir; + } + default: 'parent.frame()' +- identifier: encoding + flag: > + @{ + return parameters.encoding; + } + default: 'getOption("encoding")' diff --git a/support/arara/scripts/rules/latex.yaml b/support/arara/scripts/rules/latex.yaml index f1b9add4b3..b79c051c1d 100644 --- a/support/arara/scripts/rules/latex.yaml +++ b/support/arara/scripts/rules/latex.yaml @@ -1,22 +1,32 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: latex name: LaTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: LaTeX engine command: > @{ - return getCommand('latex', interaction, draft, shell, - synctex, options, file); + return getCommand(branch, interaction, draft, shell, + synctex, options, reference); } arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'latex', 'developer' : 'latex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'latex' - identifier: interaction flag: > @{ diff --git a/support/arara/scripts/rules/latexmk.yaml b/support/arara/scripts/rules/latexmk.yaml index 452b116a2f..61f0ff9d7b 100644 --- a/support/arara/scripts/rules/latexmk.yaml +++ b/support/arara/scripts/rules/latexmk.yaml @@ -1,15 +1,13 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: latexmk name: LaTeXmk authors: -- Marco Daniel -- Brent Longborough -- Paulo Cereda +- Island of TeX commands: - name: Tool LaTeXmk command: > @@ -19,7 +17,7 @@ commands: } else { return getCommand('latexmk', isEmpty(program, engine, - program), options, file); + program), options, reference); } } arguments: diff --git a/support/arara/scripts/rules/luahbtex.yaml b/support/arara/scripts/rules/luahbtex.yaml new file mode 100644 index 0000000000..3f851fad9e --- /dev/null +++ b/support/arara/scripts/rules/luahbtex.yaml @@ -0,0 +1,54 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: luahbtex +name: LuaHBTeX +authors: +- Island of TeX +commands: +- name: LuaHBTeX engine + command: > + @{ + return getCommand('luahbtex', interaction, draft, shell, + synctex, options, reference); + } +arguments: +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: draft + flag: > + @{ + isTrue(parameters.draft, '--draftmode') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/lualatex.yaml b/support/arara/scripts/rules/lualatex.yaml index 4c4628d248..d9870976d1 100644 --- a/support/arara/scripts/rules/lualatex.yaml +++ b/support/arara/scripts/rules/lualatex.yaml @@ -1,22 +1,32 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: lualatex name: LuaLaTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: LuaLaTeX engine command: > @{ - return getCommand('lualatex', interaction, draft, shell, - synctex, options, file); + return getCommand(branch, interaction, draft, shell, + synctex, options, reference); } arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'lualatex', 'developer' : 'lualatex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'lualatex' - identifier: interaction flag: > @{ diff --git a/support/arara/scripts/rules/luatex.yaml b/support/arara/scripts/rules/luatex.yaml index 78840f6d96..86c7556993 100644 --- a/support/arara/scripts/rules/luatex.yaml +++ b/support/arara/scripts/rules/luatex.yaml @@ -1,20 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: luatex name: LuaTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: LuaTeX engine command: > @{ return getCommand('luatex', interaction, draft, shell, - synctex, options, file); + synctex, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/make.yaml b/support/arara/scripts/rules/make.yaml index 07e619aa2d..0298ae95be 100644 --- a/support/arara/scripts/rules/make.yaml +++ b/support/arara/scripts/rules/make.yaml @@ -1,14 +1,13 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: make name: Make authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The Make program command: > diff --git a/support/arara/scripts/rules/makeglossaries.yaml b/support/arara/scripts/rules/makeglossaries.yaml index 562af6d149..34c1c07002 100644 --- a/support/arara/scripts/rules/makeglossaries.yaml +++ b/support/arara/scripts/rules/makeglossaries.yaml @@ -1,22 +1,20 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: makeglossaries name: MakeGlossaries authors: -- Marco Daniel -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The MakeGlossaries software command: > @{ if (isEmpty(clean)) { - return getCommand('makeglossaries', options, getBasename(file)); + return getCommand('makeglossaries', options, getBasename(reference)); } else { prefix = []; @@ -27,7 +25,7 @@ commands: prefix = [ 'cmd', '/c', 'del' ]; } - base = getBasename(file); + base = getBasename(reference); removals = []; removals.add(getCommand(prefix, base.concat(".glsdefs"))); diff --git a/support/arara/scripts/rules/makeglossarieslite.yaml b/support/arara/scripts/rules/makeglossarieslite.yaml index fc48090c66..d716e97b4a 100644 --- a/support/arara/scripts/rules/makeglossarieslite.yaml +++ b/support/arara/scripts/rules/makeglossarieslite.yaml @@ -1,20 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: makeglossarieslite name: MakeGlossariesLite authors: -- Marco Daniel -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The MakeGlossariesLite software command: > @{ - return getCommand('makeglossaries-lite', options, getBasename(file)); + return getCommand('makeglossaries-lite', options, getBasename(reference)); } arguments: - identifier: options diff --git a/support/arara/scripts/rules/makeindex.yaml b/support/arara/scripts/rules/makeindex.yaml index 83f7e286d0..795075bce2 100644 --- a/support/arara/scripts/rules/makeindex.yaml +++ b/support/arara/scripts/rules/makeindex.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: makeindex name: MakeIndex authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The MakeIndex software command: > @{ - base = getBasename(file); + base = getBasename(reference); infile = base.concat('.').concat(input); outfile = [ '-o', base.concat('.').concat(output) ]; logfile = [ '-t', base.concat('.').concat(log) ]; diff --git a/support/arara/scripts/rules/metapost.yaml b/support/arara/scripts/rules/metapost.yaml new file mode 100644 index 0000000000..390d08a140 --- /dev/null +++ b/support/arara/scripts/rules/metapost.yaml @@ -0,0 +1,50 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: metapost +name: Metapost +authors: +- Island of TeX +commands: +- name: Metapost + command: > + @{ + return getCommand('mpost', interaction, numbersystem, + options, file); + } +arguments: +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '-interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: numbersystem + flag: > + @{ + if ([ 'scaled', 'double', 'binary', + 'decimal' ].contains(parameters.numbersystem)) { + return '-numbersystem='.concat(parameters.numbersystem); + } + else { + throwError('The provided numbersystem value is not valid.'); + } + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/nomencl.yaml b/support/arara/scripts/rules/nomencl.yaml index 2a563b6266..a2c3acf468 100644 --- a/support/arara/scripts/rules/nomencl.yaml +++ b/support/arara/scripts/rules/nomencl.yaml @@ -1,21 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: nomencl name: Nomencl authors: -- Marco Daniel -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The Nomenclature software command: > @{ - nlo = getBasename(file).concat('.nlo'); - nls = getBasename(file).concat('.nls'); + nlo = getBasename(reference).concat('.nlo'); + nls = getBasename(reference).concat('.nls'); return getCommand('makeindex', options, nlo, style, '-o', nls); } arguments: diff --git a/support/arara/scripts/rules/pbibtex.yaml b/support/arara/scripts/rules/pbibtex.yaml new file mode 100644 index 0000000000..9b39451d4d --- /dev/null +++ b/support/arara/scripts/rules/pbibtex.yaml @@ -0,0 +1,27 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: pbibtex +name: pBibTeX +authors: +- Island of TeX +commands: +- name: The pBibTeX reference management software + command: > + @{ + return getCommand('pbibtex', options, getBasename(reference)) + } +arguments: +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/pdfcsplain.yaml b/support/arara/scripts/rules/pdfcsplain.yaml index db9bbdbec5..6dc6d287f4 100644 --- a/support/arara/scripts/rules/pdfcsplain.yaml +++ b/support/arara/scripts/rules/pdfcsplain.yaml @@ -1,19 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: pdfcsplain name: PDFCSplain authors: -- Paulo Cereda +- Island of TeX commands: - name: PDFCSplain engine command: > @{ return getCommand('pdfcsplain', interaction, draft, shell, - synctex, options, file); + synctex, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/pdflatex.yaml b/support/arara/scripts/rules/pdflatex.yaml index 61b9b8d356..3df1135dfa 100644 --- a/support/arara/scripts/rules/pdflatex.yaml +++ b/support/arara/scripts/rules/pdflatex.yaml @@ -1,22 +1,32 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: pdflatex name: PDFLaTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: PDFLaTeX engine command: > @{ - return getCommand('pdflatex', interaction, draft, shell, - synctex, options, file); + return getCommand(branch, interaction, draft, shell, + synctex, options, reference); } arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'pdflatex', 'developer' : 'pdflatex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'pdflatex' - identifier: interaction flag: > @{ diff --git a/support/arara/scripts/rules/pdftex.yaml b/support/arara/scripts/rules/pdftex.yaml index 2e3126bbfd..8b10bc02f5 100644 --- a/support/arara/scripts/rules/pdftex.yaml +++ b/support/arara/scripts/rules/pdftex.yaml @@ -1,20 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: pdftex name: PDFTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: PDFTeX engine command: > @{ return getCommand('pdftex', interaction, draft, shell, - synctex, options, file); + synctex, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/pdftk.yaml b/support/arara/scripts/rules/pdftk.yaml index 9bd3f46060..67e81f0bd4 100644 --- a/support/arara/scripts/rules/pdftk.yaml +++ b/support/arara/scripts/rules/pdftk.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: pdftk name: PDFtk authors: -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: PDFtk command: > @{ - input = getBasename(file).concat('.pdf'); + input = getBasename(reference).concat('.pdf'); return getCommand('pdftk', input, options); } arguments: diff --git a/support/arara/scripts/rules/platex.yaml b/support/arara/scripts/rules/platex.yaml new file mode 100644 index 0000000000..3a59268753 --- /dev/null +++ b/support/arara/scripts/rules/platex.yaml @@ -0,0 +1,60 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: platex +name: pLaTeX +authors: +- Island of TeX +commands: +- name: pLaTeX engine + command: > + @{ + return getCommand(branch, interaction, shell, + synctex, options, reference); + } +arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'platex', 'developer' : 'platex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'platex' +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/ps2pdf.yaml b/support/arara/scripts/rules/ps2pdf.yaml index 656f7e22c3..fe5684d1c2 100644 --- a/support/arara/scripts/rules/ps2pdf.yaml +++ b/support/arara/scripts/rules/ps2pdf.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: ps2pdf name: PS2PDF authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The PS2PDF program command: > @{ - infile = getBasename(file).concat('.ps'); + infile = getBasename(reference).concat('.ps'); outfile = getBasename(output).concat('.pdf'); return getCommand('ps2pdf', options, infile, outfile); } @@ -25,7 +24,7 @@ arguments: } default: > @{ - file + reference } - identifier: options flag: > diff --git a/support/arara/scripts/rules/ptex.yaml b/support/arara/scripts/rules/ptex.yaml new file mode 100644 index 0000000000..3771981e7f --- /dev/null +++ b/support/arara/scripts/rules/ptex.yaml @@ -0,0 +1,49 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: ptex +name: pTeX +authors: +- Island of TeX +commands: +- name: pTeX engine + command: > + @{ + return getCommand('ptex', interaction, shell, + synctex, options, reference); + } +arguments: +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/sketch.yaml b/support/arara/scripts/rules/sketch.yaml index a170aa20f2..ca3d22834a 100644 --- a/support/arara/scripts/rules/sketch.yaml +++ b/support/arara/scripts/rules/sketch.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,13 +8,13 @@ identifier: sketch name: Sketch authors: - Sergey Ulyanov -- Paulo Cereda +- Island of TeX commands: - name: The Sketch software command: > @{ - output = getBasename(file).concat('.tex'); - return getCommand('sketch', options, file, '-o', output); + output = getBasename(reference).concat('.tex'); + return getCommand('sketch', options, reference, '-o', output); } arguments: - identifier: options diff --git a/support/arara/scripts/rules/songidx.yaml b/support/arara/scripts/rules/songidx.yaml index 818c4333a7..ff4a27e6b8 100644 --- a/support/arara/scripts/rules/songidx.yaml +++ b/support/arara/scripts/rules/songidx.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,7 +8,7 @@ identifier: songidx name: SongIDX authors: - Francesco Endrici -- Paulo Cereda +- Island of TeX commands: - name: The SongIDX Lua script command: > diff --git a/support/arara/scripts/rules/tex.yaml b/support/arara/scripts/rules/tex.yaml index c0321b34dc..701d200096 100644 --- a/support/arara/scripts/rules/tex.yaml +++ b/support/arara/scripts/rules/tex.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: tex name: TeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: TeX engine command: > @{ - return getCommand('tex', interaction, shell, options, file); + return getCommand('tex', interaction, shell, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/texindy.yaml b/support/arara/scripts/rules/texindy.yaml index d527e0292d..54b468d42a 100644 --- a/support/arara/scripts/rules/texindy.yaml +++ b/support/arara/scripts/rules/texindy.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: texindy name: TeXindy authors: -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The TeXindy software command: > @{ - base = getBasename(file); + base = getBasename(reference); infile = base.concat('.').concat(input); outfile = [ '-o', base.concat('.').concat(output) ]; logfile = [ '-t', base.concat('.').concat(log) ]; diff --git a/support/arara/scripts/rules/tikzmake.yaml b/support/arara/scripts/rules/tikzmake.yaml index e6cb809a54..97942aaa3b 100644 --- a/support/arara/scripts/rules/tikzmake.yaml +++ b/support/arara/scripts/rules/tikzmake.yaml @@ -1,6 +1,6 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. @@ -8,12 +8,12 @@ identifier: tikzmake name: TikZmake authors: - Robbie Smith -- Paulo Cereda +- Island of TeX commands: - name: TikZ list-and-make engine command: > @{ - makefile = getBasename(file).concat('.makefile'); + makefile = getBasename(reference).concat('.makefile'); return getCommand('make', force, jobs, options, '-f', makefile); } arguments: diff --git a/support/arara/scripts/rules/upbibtex.yaml b/support/arara/scripts/rules/upbibtex.yaml new file mode 100644 index 0000000000..eb0f5fba9d --- /dev/null +++ b/support/arara/scripts/rules/upbibtex.yaml @@ -0,0 +1,27 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: upbibtex +name: upBibTeX +authors: +- Island of TeX +commands: +- name: The upBibTeX reference management software + command: > + @{ + return getCommand('upbibtex', options, getBasename(reference)) + } +arguments: +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/uplatex.yaml b/support/arara/scripts/rules/uplatex.yaml new file mode 100644 index 0000000000..0fd1d575f9 --- /dev/null +++ b/support/arara/scripts/rules/uplatex.yaml @@ -0,0 +1,60 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: uplatex +name: upLaTeX +authors: +- Island of TeX +commands: +- name: upLaTeX engine + command: > + @{ + return getCommand(branch, interaction, shell, + synctex, options, reference); + } +arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'uplatex', 'developer' : 'uplatex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'uplatex' +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/uptex.yaml b/support/arara/scripts/rules/uptex.yaml new file mode 100644 index 0000000000..b2c9c90fe7 --- /dev/null +++ b/support/arara/scripts/rules/uptex.yaml @@ -0,0 +1,49 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: uptex +name: upTeX +authors: +- Island of TeX +commands: +- name: upTeX engine + command: > + @{ + return getCommand('uptex', interaction, shell, + synctex, options, reference); + } +arguments: +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/velocity.yaml b/support/arara/scripts/rules/velocity.yaml deleted file mode 100644 index 0fd62a9465..0000000000 --- a/support/arara/scripts/rules/velocity.yaml +++ /dev/null @@ -1,41 +0,0 @@ -!config -# Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda -# All rights reserved. -# -# This rule is part of arara. -identifier: velocity -name: Velocity -authors: -- Paulo Cereda -commands: -- name: The Velocity engine - command: > - @{ - mergeVelocityTemplate(isEmpty(input, reference, toFile(input)), - toFile(output), context); - return true; - } -arguments: -- identifier: context - flag: > - @{ - if (isMap(parameters.context)) { - return parameters.context; - } - else { - throwError('I was expecting a context map.'); - } - } - required: true -- identifier: output - flag: > - @{ - return parameters.output; - } - required: true -- identifier: input - flag: > - @{ - return parameters.input; - } diff --git a/support/arara/scripts/rules/xdvipdfmx.yaml b/support/arara/scripts/rules/xdvipdfmx.yaml index b9433f8a93..bf67572fc3 100644 --- a/support/arara/scripts/rules/xdvipdfmx.yaml +++ b/support/arara/scripts/rules/xdvipdfmx.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: xdvipdfmx name: XDVIPDFMX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: The XDVIPDFMX program command: > @{ - infile = getBasename(file).concat('.dvi'); + infile = getBasename(reference).concat('.dvi'); outfile = getBasename(output).concat('.pdf'); return getCommand('xdvipdfmx', infile, '-o', outfile, options); } @@ -25,7 +24,7 @@ arguments: } default: > @{ - file + reference } - identifier: options flag: > diff --git a/support/arara/scripts/rules/xelatex.yaml b/support/arara/scripts/rules/xelatex.yaml index e248ae2fe8..ef1e1a8f0a 100644 --- a/support/arara/scripts/rules/xelatex.yaml +++ b/support/arara/scripts/rules/xelatex.yaml @@ -1,22 +1,32 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: xelatex name: XeLaTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: XeLaTeX engine command: > @{ - return getCommand('xelatex', interaction, shell, - synctex, options, file); + return getCommand(branch, interaction, shell, + synctex, options, reference); } arguments: +- identifier: branch + flag: > + @{ + engines = [ 'stable' : 'xelatex', 'developer' : 'xelatex-dev' ]; + if (engines.keySet().contains(parameters.branch)) { + return engines.get(parameters.branch); + } else { + throwError('The valid branch values are: ' + engines.keySet()); + } + } + default: 'xelatex' - identifier: interaction flag: > @{ diff --git a/support/arara/scripts/rules/xetex.yaml b/support/arara/scripts/rules/xetex.yaml index 2a9369e0e8..0d13768a28 100644 --- a/support/arara/scripts/rules/xetex.yaml +++ b/support/arara/scripts/rules/xetex.yaml @@ -1,20 +1,19 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: xetex name: XeTeX authors: -- Marco Daniel -- Paulo Cereda +- Island of TeX commands: - name: XeTeX engine command: > @{ return getCommand('xetex', interaction, shell, - synctex, options, file); + synctex, options, reference); } arguments: - identifier: interaction diff --git a/support/arara/scripts/rules/xindex.yaml b/support/arara/scripts/rules/xindex.yaml new file mode 100644 index 0000000000..8ec73cf068 --- /dev/null +++ b/support/arara/scripts/rules/xindex.yaml @@ -0,0 +1,49 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: xindex +name: xindex +authors: +- Island of TeX +commands: +- name: The xindex software + command: > + @{ + return getCommand('xindex', config, language, options, input); + } +arguments: +- identifier: input + flag: > + @{ + return parameters.input; + } +- identifier: config + flag: > + @{ + return [ '-c', parameters.config ]; + } + default: > + @{ + return [ '-c', 'cfg' ]; + } +- identifier: language + flag: > + @{ + return [ '-l', parameters.language ]; + } + default: > + @{ + return [ '-l', 'en' ]; + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } else { + throwError('I was expecting a list of options.'); + } + } diff --git a/support/arara/scripts/rules/xindy.yaml b/support/arara/scripts/rules/xindy.yaml index 6daf807cc8..2efc37daf5 100644 --- a/support/arara/scripts/rules/xindy.yaml +++ b/support/arara/scripts/rules/xindy.yaml @@ -1,19 +1,18 @@ !config # Arara, the cool TeX automation tool -# Copyright (c) 2018, Paulo Roberto Massa Cereda +# Copyright (c) 2020, Island of TeX # All rights reserved. # # This rule is part of arara. identifier: xindy name: Xindy authors: -- Nicola Talbot -- Paulo Cereda +- Island of TeX commands: - name: The Xindy software command: > @{ - base = getBasename(file); + base = getBasename(reference); infile = base.concat('.').concat(input); outfile = [ '-o', base.concat('.').concat(output) ]; logfile = [ '-t', base.concat('.').concat(log) ]; -- cgit v1.2.3