summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/arara
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-10 21:10:18 +0000
committerKarl Berry <karl@freefriends.org>2018-07-10 21:10:18 +0000
commit275865ed49aaf567eb93f9405e4595a514483a4b (patch)
tree624fc2d2da441718e7529fd36c117b89bda86d38 /Master/texmf-dist/scripts/arara
parent33452f6039ba5535d9d9c6fcc58f7a9aad6ce91d (diff)
arara (10jul18)
git-svn-id: svn://tug.org/texlive/trunk@48183 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/arara')
-rw-r--r--Master/texmf-dist/scripts/arara/arara.jarbin2934702 -> 5119284 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/arara/arara.sh1
-rw-r--r--Master/texmf-dist/scripts/arara/rules/animate.yaml62
-rw-r--r--Master/texmf-dist/scripts/arara/rules/bib2gls.yaml166
-rw-r--r--Master/texmf-dist/scripts/arara/rules/biber.yaml30
-rw-r--r--Master/texmf-dist/scripts/arara/rules/bibtex.yaml30
-rw-r--r--Master/texmf-dist/scripts/arara/rules/bibtex8.yaml28
-rw-r--r--Master/texmf-dist/scripts/arara/rules/bibtexu.yaml28
-rw-r--r--Master/texmf-dist/scripts/arara/rules/clean.yaml56
-rw-r--r--Master/texmf-dist/scripts/arara/rules/csplain.yaml54
-rw-r--r--Master/texmf-dist/scripts/arara/rules/datatooltk.yaml191
-rw-r--r--Master/texmf-dist/scripts/arara/rules/dvipdfm.yaml39
-rw-r--r--Master/texmf-dist/scripts/arara/rules/dvipdfmx.yaml39
-rw-r--r--Master/texmf-dist/scripts/arara/rules/dvips.yaml40
-rw-r--r--Master/texmf-dist/scripts/arara/rules/dvipspdf.yaml56
-rw-r--r--Master/texmf-dist/scripts/arara/rules/etex.yaml45
-rw-r--r--Master/texmf-dist/scripts/arara/rules/frontespizio.yaml82
-rw-r--r--Master/texmf-dist/scripts/arara/rules/halt.yaml18
-rw-r--r--Master/texmf-dist/scripts/arara/rules/indent.yaml97
-rw-r--r--Master/texmf-dist/scripts/arara/rules/latex.yaml58
-rw-r--r--Master/texmf-dist/scripts/arara/rules/latexmk.yaml63
-rw-r--r--Master/texmf-dist/scripts/arara/rules/lmkclean.yaml11
-rw-r--r--Master/texmf-dist/scripts/arara/rules/lualatex.yaml58
-rw-r--r--Master/texmf-dist/scripts/arara/rules/lualatexmk.yaml19
-rw-r--r--Master/texmf-dist/scripts/arara/rules/luatex.yaml57
-rw-r--r--Master/texmf-dist/scripts/arara/rules/make.yaml53
-rw-r--r--Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml31
-rw-r--r--Master/texmf-dist/scripts/arara/rules/makeglossarieslite.yaml29
-rw-r--r--Master/texmf-dist/scripts/arara/rules/makeindex.yaml74
-rw-r--r--Master/texmf-dist/scripts/arara/rules/nomencl.yaml45
-rw-r--r--Master/texmf-dist/scripts/arara/rules/pdfcsplain.yaml54
-rw-r--r--Master/texmf-dist/scripts/arara/rules/pdflatex.yaml58
-rw-r--r--Master/texmf-dist/scripts/arara/rules/pdflatexmk.yaml18
-rw-r--r--Master/texmf-dist/scripts/arara/rules/pdftex.yaml58
-rw-r--r--Master/texmf-dist/scripts/arara/rules/pdftk.yaml29
-rw-r--r--Master/texmf-dist/scripts/arara/rules/ps2pdf.yaml41
-rw-r--r--Master/texmf-dist/scripts/arara/rules/sketch.yaml29
-rw-r--r--Master/texmf-dist/scripts/arara/rules/songidx.yaml44
-rw-r--r--Master/texmf-dist/scripts/arara/rules/tex.yaml48
-rw-r--r--Master/texmf-dist/scripts/arara/rules/texindy.yaml91
-rw-r--r--Master/texmf-dist/scripts/arara/rules/tikzmake.yaml39
-rw-r--r--Master/texmf-dist/scripts/arara/rules/velocity.yaml41
-rw-r--r--Master/texmf-dist/scripts/arara/rules/xdvipdfmx.yaml39
-rw-r--r--Master/texmf-dist/scripts/arara/rules/xelatex.yaml53
-rw-r--r--Master/texmf-dist/scripts/arara/rules/xelatexmk.yaml19
-rw-r--r--Master/texmf-dist/scripts/arara/rules/xetex.yaml52
-rw-r--r--Master/texmf-dist/scripts/arara/rules/xindy.yaml91
47 files changed, 2118 insertions, 246 deletions
diff --git a/Master/texmf-dist/scripts/arara/arara.jar b/Master/texmf-dist/scripts/arara/arara.jar
index 4303c351763..62fc8b58642 100644
--- a/Master/texmf-dist/scripts/arara/arara.jar
+++ b/Master/texmf-dist/scripts/arara/arara.jar
Binary files differ
diff --git a/Master/texmf-dist/scripts/arara/arara.sh b/Master/texmf-dist/scripts/arara/arara.sh
index d07f7e4bac4..e9a59c90b97 100755
--- a/Master/texmf-dist/scripts/arara/arara.sh
+++ b/Master/texmf-dist/scripts/arara/arara.sh
@@ -1,4 +1,3 @@
#!/bin/bash
jarpath=`kpsewhich --progname=arara --format=texmfscripts arara.jar`
java -jar "$jarpath" "$@"
-
diff --git a/Master/texmf-dist/scripts/arara/rules/animate.yaml b/Master/texmf-dist/scripts/arara/rules/animate.yaml
new file mode 100644
index 00000000000..ac6dc347bbe
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/animate.yaml
@@ -0,0 +1,62 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: animate
+name: Animate
+authors:
+- Chris Hughes
+- Paulo Cereda
+commands:
+- name: The Convert program
+ command: >
+ @{
+ prefix = [];
+ input = getBasename(file).concat('.pdf');
+ output = getBasename(file).concat('.gif');
+ if (isUnix()) {
+ prefix = [ program ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', program ];
+ }
+ return getCommand(prefix, '-delay', delay, '-loop',
+ loop, '-density', density, options, input, output);
+ }
+arguments:
+- identifier: delay
+ flag: >
+ @{
+ parameters.delay
+ }
+ default: 10
+- identifier: loop
+ flag: >
+ @{
+ parameters.loop
+ }
+ default: 0
+- identifier: density
+ flag: >
+ @{
+ parameters.density
+ }
+ default: 300
+- identifier: program
+ flag: >
+ @{
+ parameters.program
+ }
+ default: convert
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml
new file mode 100644
index 00000000000..254a362096e
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml
@@ -0,0 +1,166 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: bib2gls
+name: Bib2Gls
+authors:
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The Bib2Gls software
+ command: >
+ @{
+ return getCommand('bib2gls', dir, trans, group, interpret,
+ breakspace, trimfields, recordcount, recordcountunit,
+ cite, verbose, merge, locale, uniscript, packages,
+ ignore, custom, mapformats, options, getBasename(file));
+ }
+arguments:
+- identifier: dir
+ flag: >
+ @{
+ return ['--dir', parameters.dir]
+ }
+- identifier: trans
+ flag: >
+ @{
+ return ['--log-file', getBasename(file)+"."+parameters.trans]
+ }
+- identifier: locale
+ flag: >
+ @{
+ return ['--locale', parameters.locale]
+ }
+- identifier: group
+ flag: >
+ @{
+ isTrue(parameters.group, '--group', '--no-group')
+ }
+- identifier: interpret
+ flag: >
+ @{
+ isTrue(parameters.interpret, '--interpret', '--no-interpret')
+ }
+- identifier: breakspace
+ flag: >
+ @{
+ isTrue(parameters.breakspace, '--break-space', '--no-break-space')
+ }
+- identifier: trimfields
+ flag: >
+ @{
+ isTrue(parameters.trimfields, '--trim-fields', '--no-trim-fields')
+ }
+- identifier: recordcount
+ flag: >
+ @{
+ isTrue(parameters.recordcount, '--record-count', '--no-record-count')
+ }
+- identifier: recordcountunit
+ flag: >
+ @{
+ isTrue(parameters.recordcountunit, '--record-count-unit',
+ '--no-record-count-unit')
+ }
+- identifier: cite
+ flag: >
+ @{
+ isTrue(parameters.cite, '--cite-as-record', '--no-cite-as-record')
+ }
+- identifier: verbose
+ flag: >
+ @{
+ isTrue(parameters.verbose, '--verbose', '--no-verbose')
+ }
+- identifier: merge
+ flag: >
+ @{
+ isTrue(parameters.merge, '--merge-wrglossary-records',
+ '--no-merge-wrglossary-records')
+ }
+- identifier: uniscript
+ flag: >
+ @{
+ isTrue(parameters.uniscript, '--support-unicode-script',
+ '--no-support-unicode-script')
+ }
+- identifier: packages
+ flag: >
+ @{
+ if (isList(parameters.packages)) {
+ elements = [];
+ foreach (element : parameters.packages) {
+ elements.add('--packages');
+ elements.add(element);
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting a list of package names.');
+ }
+ }
+- identifier: ignore
+ flag: >
+ @{
+ if (isList(parameters.ignore)) {
+ elements = [];
+ foreach (element : parameters.ignore) {
+ elements.add('--ignore-packages');
+ elements.add(element);
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting a list of package names.');
+ }
+ }
+- identifier: custom
+ flag: >
+ @{
+ if (isList(parameters.custom)) {
+ elements = [];
+ foreach (element : parameters.custom) {
+ elements.add('--custom-packages');
+ elements.add(element);
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting a list of package names.');
+ }
+ }
+- identifier: mapformats
+ flag: >
+ @{
+ if (isList(parameters.mapformats)) {
+ elements = [];
+ foreach (element : parameters.mapformats) {
+ if (isList(element) && element.size() == 2) {
+ elements.add('--map-format');
+ elements.add(element.get(0) + ':' + element.get(1));
+ }
+ else {
+ throwError('I was expecting a map ' +
+ 'format list [<key>, <value>] ');
+ }
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting mapformats: [ [<key>, <value>], ' +
+ '..., [<key>, <value>] ].');
+ }
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/biber.yaml b/Master/texmf-dist/scripts/arara/rules/biber.yaml
index ad27377e8bf..9ba02bc6b20 100644
--- a/Master/texmf-dist/scripts/arara/rules/biber.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/biber.yaml
@@ -1,10 +1,28 @@
!config
-# Biber rule for arara
-# author: Marco Daniel
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: biber
name: Biber
-command: <arara> biber @{options} "@{getBasename(file)}"
-arguments:
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The Biber reference management software
+ command: >
+ @{
+ return getCommand('biber', options, getBasename(file));
+ }
+arguments:
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/bibtex.yaml b/Master/texmf-dist/scripts/arara/rules/bibtex.yaml
index 055b60d47ea..5cbe5c17562 100644
--- a/Master/texmf-dist/scripts/arara/rules/bibtex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/bibtex.yaml
@@ -1,10 +1,28 @@
!config
-# BibTeX rule for arara
-# author: Marco Daniel
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: bibtex
name: BibTeX
-command: <arara> bibtex @{options} "@{getBasename(file)}.aux"
-arguments:
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The BibTeX reference management software
+ command: >
+ @{
+ return getCommand('bibtex', options, getBasename(file))
+ }
+arguments:
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/bibtex8.yaml b/Master/texmf-dist/scripts/arara/rules/bibtex8.yaml
new file mode 100644
index 00000000000..8a4631ff779
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/bibtex8.yaml
@@ -0,0 +1,28 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: bibtex8
+name: BibTeX8
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: An 8-bit implementation of BibTeX 0.99 with a very large capacity
+ command: >
+ @{
+ return getCommand('bibtex8', options, getBasename(file));
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/bibtexu.yaml b/Master/texmf-dist/scripts/arara/rules/bibtexu.yaml
new file mode 100644
index 00000000000..f580886d95e
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/bibtexu.yaml
@@ -0,0 +1,28 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: bibtexu
+name: BibTeXu
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: An 8-bit implementation of BibTeX 0.99 with a very large capacity
+ command: >
+ @{
+ return getCommand('bibtexu', options, getBasename(file));
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/clean.yaml b/Master/texmf-dist/scripts/arara/rules/clean.yaml
index c9542f7979e..1a39ed3f27a 100644
--- a/Master/texmf-dist/scripts/arara/rules/clean.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/clean.yaml
@@ -1,11 +1,51 @@
!config
-# Clean rule for arara
-# author: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: clean
-name: CleaningTool
-command: <arara> @{remove}
+name: Clean
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: Cleaning feature
+ command: >
+ @{
+ prefix = [];
+ if (isUnix()) {
+ prefix = [ 'rm', '-f' ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', 'del' ];
+ }
+ if (extensions == '') {
+ if (getOriginalFile() == file) {
+ throwError('I cannot remove the main file reference.');
+ }
+ return getCommand(prefix, file);
+ }
+ else {
+ base = getBasename(file);
+ removals = [];
+ foreach(extension : extensions) {
+ if (base.concat('.').concat(extension) == getOriginalFile()) {
+ throwError('I cannot remove the main file reference.');
+ }
+ removals.add(getCommand(prefix, base.concat('.').concat(extension)));
+ }
+ return removals;
+ }
+ }
arguments:
-- identifier: remove
- default: <arara> @{isFalse(file == getOriginalFile(), isWindows("cmd /c del", "rm -f").concat(' "').concat(file).concat('"'))}
-
+- identifier: extensions
+ flag: >
+ @{
+ if (isList(parameters.extensions)) {
+ return parameters.extensions;
+ }
+ else {
+ throwError('I was expecting a list of extensions.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/csplain.yaml b/Master/texmf-dist/scripts/arara/rules/csplain.yaml
new file mode 100644
index 00000000000..cfdcc954212
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/csplain.yaml
@@ -0,0 +1,54 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: csplain
+name: CSplain
+authors:
+- Paulo Cereda
+commands:
+- name: CSplain engine
+ command: >
+ @{
+ return getCommand('csplain', interaction, draft,
+ shell, synctex, 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: 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/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml b/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml
new file mode 100644
index 00000000000..0b80d15e753
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml
@@ -0,0 +1,191 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: datatooltk
+name: DatatoolTk
+authors:
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The DatatoolTk software
+ command: >
+ @{
+ return getCommand('datatooltk', options, output, csv, sql, input,
+ sqldb, sqluser, name, probsoln, sort, sortlocale, sortcase,
+ seed, shuffle, sep, delim, csvheader, noconsole, debug,
+ owneronly, maptex, xls, ods, sheet, filterop, filters,
+ truncate);
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: output
+ flag: >
+ @{
+ [ '--output', parameters.output ]
+ }
+ required: true
+- identifier: csv
+ flag: >
+ @{
+ [ '--csv', parameters.csv ]
+ }
+- identifier: sep
+ flag: >
+ @{
+ [ '--sep', parameters.sep ]
+ }
+- identifier: delim
+ flag: >
+ @{
+ [ '--delim', parameters.delim ]
+ }
+- identifier: name
+ flag: >
+ @{
+ [ '--name', parameters.name ]
+ }
+- identifier: sql
+ flag: >
+ @{
+ [ '--sql', parameters.sql ]
+ }
+- identifier: sqldb
+ flag: >
+ @{
+ [ '--sqldb', parameters.sqldb ]
+ }
+- identifier: sqluser
+ flag: >
+ @{
+ [ '--sqluser', parameters.sqluser ]
+ }
+- identifier: noconsole
+ flag: >
+ @{
+ [ '--noconsole-action', parameters.noconsole ]
+ }
+ default: >
+ @{
+ [ '--noconsole-action', 'gui']
+ }
+- identifier: probsoln
+ flag: >
+ @{
+ [ '--probsoln', parameters.probsoln ]
+ }
+- identifier: input
+ flag: >
+ @{
+ [ '--in', parameters.input ]
+ }
+- identifier: sort
+ flag: >
+ @{
+ [ '--sort', parameters.sort ]
+ }
+- identifier: sortlocale
+ flag: >
+ @{
+ [ '--sort-locale', parameters.sortlocale ]
+ }
+- identifier: sortcase
+ flag: >
+ @{
+ isTrue(parameters.sortcase, '--sort-case-sensitive',
+ '--sort-case-insensitive')
+ }
+- identifier: seed
+ flag: >
+ @{
+ [ '--seed', parameters.seed ]
+ }
+- identifier: shuffle
+ flag: >
+ @{
+ isTrue(parameters.shuffle, '--shuffle', '--noshuffle')
+ }
+- identifier: csvheader
+ flag: >
+ @{
+ isTrue(parameters.csvheader, '--csvheader', '--nocsvheader')
+ }
+- identifier: debug
+ flag: >
+ @{
+ isTrue(parameters.debug, '--debug', '--nodebug')
+ }
+- identifier: owneronly
+ flag: >
+ @{
+ isTrue(parameters.owneronly, '--owner-only', '--noowner-only')
+ }
+- identifier: maptex
+ flag: >
+ @{
+ isTrue(parameters.maptex, '--map-tex-specials',
+ '--nomap-tex-specials')
+ }
+- identifier: xls
+ flag: >
+ @{
+ [ '--xls', parameters.xls ]
+ }
+- identifier: ods
+ flag: >
+ @{
+ [ '--ods', parameters.ods ]
+ }
+- identifier: sheet
+ flag: >
+ @{
+ [ '--sheet', parameters.sheet ]
+ }
+- identifier: filterop
+ flag: >
+ @{
+ if (['and', 'or'].contains(parameters.filterop)) {
+ return "--filter-" + parameters.filterop;
+ }
+ else {
+ throwError('The provided filterop value is not valid.');
+ }
+ }
+- identifier: filters
+ flag: >
+ @{
+ if (isList(parameters.filters)) {
+ elements = [];
+ foreach (element : parameters.filters) {
+ if (isList(element) && element.size() == 3) {
+ elements.add('--filter');
+ elements.add(element);
+ }
+ else {
+ throwError('I was expecting a filter ' +
+ 'list [<label>, <op>, <value>]');
+ }
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting filters: [ [<label>, <op>, <value>], ' +
+ '..., [<label>, <op>, <value>] ].');
+ }
+ }
+- identifier: truncate
+ flag: >
+ @{
+ [ '--truncate', parameters.truncate ]
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/dvipdfm.yaml b/Master/texmf-dist/scripts/arara/rules/dvipdfm.yaml
new file mode 100644
index 00000000000..d2dca0db363
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/dvipdfm.yaml
@@ -0,0 +1,39 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: dvipdfm
+name: DVIPDFM
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The DVIPDFM program
+ command: >
+ @{
+ base = getBasename(file).concat('.dvi');
+ out = getBasename(output).concat('.pdf');
+ return getCommand('dvipdfm', base, '-o', out, options);
+ }
+arguments:
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/dvipdfmx.yaml b/Master/texmf-dist/scripts/arara/rules/dvipdfmx.yaml
new file mode 100644
index 00000000000..2feb9f0fe91
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/dvipdfmx.yaml
@@ -0,0 +1,39 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: dvipdfmx
+name: DVIPDFMX
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The DVIPDFMX program
+ command: >
+ @{
+ base = getBasename(file).concat('.dvi');
+ out = getBasename(output).concat('.pdf');
+ return getCommand('dvipdfmx', base, '-o', out, options);
+ }
+arguments:
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/dvips.yaml b/Master/texmf-dist/scripts/arara/rules/dvips.yaml
index 48e9172e972..dd7a929bd0c 100644
--- a/Master/texmf-dist/scripts/arara/rules/dvips.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/dvips.yaml
@@ -1,13 +1,39 @@
!config
-# DVIPS rule for arara
-# author: Marco Daniel
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: dvips
name: DVIPS
-command: <arara> dvips "@{getBasename(file)}.dvi" -o "@{output}.ps" @{options}
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The DVIPS program
+ command: >
+ @{
+ base = getBasename(file).concat('.dvi');
+ out = getBasename(output).concat('.ps');
+ return getCommand('dvips', base, '-o', out, options);
+ }
arguments:
- identifier: output
- flag: <arara> @{parameters.output}
- default: <arara> @{getBasename(file)}
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/dvipspdf.yaml b/Master/texmf-dist/scripts/arara/rules/dvipspdf.yaml
new file mode 100644
index 00000000000..4190b1869c9
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/dvipspdf.yaml
@@ -0,0 +1,56 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: dvipspdf
+name: DVIPSPDF
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The DVIPS program
+ command: >
+ @{
+ base = getBasename(file).concat('.dvi');
+ out = getBasename(file).concat('.ps');
+ return getCommand('dvips', base, '-o', out, options1);
+ }
+- name: The PS2PDF program
+ command: >
+ @{
+ base = getBasename(file).concat('.ps');
+ out = getBasename(output).concat('.pdf');
+ return getCommand('ps2pdf', options2, base, '-o', out);
+ }
+arguments:
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
+- identifier: options1
+ flag: >
+ @{
+ if (isList(parameters.options1)) {
+ return parameters.options1;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: options2
+ flag: >
+ @{
+ if (isList(parameters.options2)) {
+ return parameters.options2;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/etex.yaml b/Master/texmf-dist/scripts/arara/rules/etex.yaml
new file mode 100644
index 00000000000..15f8bf54126
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/etex.yaml
@@ -0,0 +1,45 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: etex
+name: eTeX
+authors:
+- Marco Daniel
+- Paulo Cereda
+- Nicola Talbot
+commands:
+- name: Extended TeX engine
+ command: >
+ @{
+ return getCommand('etex', interaction, shell, 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: shell
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/frontespizio.yaml b/Master/texmf-dist/scripts/arara/rules/frontespizio.yaml
index 9387f32fa6d..45f3a4bf4f9 100644
--- a/Master/texmf-dist/scripts/arara/rules/frontespizio.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/frontespizio.yaml
@@ -1,18 +1,76 @@
!config
-# Frontespizio rule for arara
-# author: Francesco Endrici
-# author: Enrico Gregorio
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: frontespizio
name: Frontespizio
+authors:
+- Francesco Endrici
+- Enrico Gregorio
+- Paulo Cereda
commands:
-- <arara> @{engine} "@{getBasename(file)}"
-- <arara> @{engine} "@{getBasename(file)}-frn"
-- <arara> @{dvips}
-- <arara> @{engine} "@{getBasename(file)}"
-arguments:
+- name: The engine
+ command: >
+ @{
+ return getCommand(engine, interaction, shell, options, file)
+ }
+- name: The frontispiece
+ command: >
+ @{
+ base = getBasename(file).concat('-frn');
+ return getCommand(engine, interaction, shell, base);
+ }
+- name: The DVIPS program
+ command: >
+ @{
+ base = getBasename(file).concat('-frn');
+ eps = base.concat('.eps');
+ return isTrue(engine == 'latex', getCommand('dvips', '-o',
+ eps, base), '');
+ }
+- name: The engine
+ command: >
+ @{
+ return getCommand(engine, interaction, shell, options, file);
+ }
+arguments:
- identifier: engine
- flag: <arara> @{parameters.engine}
+ flag: >
+ @{
+ if ([ 'pdflatex', 'latex', 'xelatex',
+ 'lualatex' ].contains(parameters.engine)) {
+ return parameters.engine;
+ }
+ else {
+ throwError('The provided engine is not valid');
+ }
+ }
default: pdflatex
-- identifier: dvips
- default: <arara> @{ isTrue(parameters.engine == 'latex', 'dvips -o "' + getBasename(file) + '-frn.eps" "'+ getBasename(file) + '-frn"') }
+- identifier: shell
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- 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.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/halt.yaml b/Master/texmf-dist/scripts/arara/rules/halt.yaml
new file mode 100644
index 00000000000..9d8aaa8aef8
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/halt.yaml
@@ -0,0 +1,18 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: halt
+name: Halt
+authors:
+- Heiko Oberdiek
+- Paulo Cereda
+commands:
+- name: The halt trigger
+ command: >
+ @{
+ return getTrigger('halt');
+ }
+arguments: []
diff --git a/Master/texmf-dist/scripts/arara/rules/indent.yaml b/Master/texmf-dist/scripts/arara/rules/indent.yaml
new file mode 100644
index 00000000000..8390aa672e8
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/indent.yaml
@@ -0,0 +1,97 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: indent
+name: Indent
+authors:
+- Chris Hughes
+- Paulo Cereda
+commands:
+- name: The latexindent.pl script
+ command: >
+ @{
+ return getCommand('latexindent', silent, trace, ttrace, screenlog,
+ settings, cruft, overwrite, output, file, modifylinebreaks,
+ options, logfile);
+ }
+arguments:
+- identifier: silent
+ flag: >
+ @{
+ isTrue(parameters.silent, '-s')
+ }
+- identifier: overwrite
+ flag: >
+ @{
+ isTrue(parameters.overwrite, '-w')
+ }
+- identifier: trace
+ flag: >
+ @{
+ if ([ 'default', 'complete' ].contains(parameters.trace)) {
+ return isTrue(parameters.trace == 'default', '-t', '-tt');
+ }
+ else {
+ throwError('You provided an invalid value for trace.');
+ }
+ }
+- identifier: screenlog
+ flag: >
+ @{
+ isTrue(parameters.screenlog, '-sl')
+ }
+- identifier: modifylinebreaks
+ flag: >
+ @{
+ isTrue(parameters.modifylinebreaks, '-m')
+ }
+- identifier: settings
+ flag: >
+ @{
+ check = parameters.containsKey('where');
+ location = check ? parameters.where : '';
+ if ([ 'local', 'onlydefault' ].contains(parameters.settings)) {
+ return isTrue(parameters.settings == 'local', isTrue(check,
+ '-l='.concat(location), '-l'), '-d');
+ }
+ else {
+ throwError('You provided an invalid value for settings.');
+ }
+ }
+- identifier: cruft
+ flag: >
+ @{
+ '-c='.concat(parameters.cruft)
+ }
+- identifier: logfile
+ flag: >
+ @{
+ [ '-g', parameters.logfile ]
+ }
+- identifier: output
+ flag: >
+ @{
+ [ '-o', parameters.output ]
+ }
+- identifier: where
+ flag: >
+ @{
+ check = parameters.containsKey('settings');
+ setting = check ? parameters.settings : '';
+ if (setting != 'local') {
+ throwError('This key requires a local setting.');
+ }
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/latex.yaml b/Master/texmf-dist/scripts/arara/rules/latex.yaml
index 2a02cd5d41e..f1b9add4b33 100644
--- a/Master/texmf-dist/scripts/arara/rules/latex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/latex.yaml
@@ -1,19 +1,55 @@
!config
-# LaTeX rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: latex
name: LaTeX
-command: <arara> latex @{action} @{draft} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LaTeX engine
+ command: >
+ @{
+ return getCommand('latex', interaction, draft, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: draft
- flag: <arara> @{isTrue(parameters.draft,"--draftmode")}
+ flag: >
+ @{
+ isTrue(parameters.draft, '--draftmode')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/latexmk.yaml b/Master/texmf-dist/scripts/arara/rules/latexmk.yaml
new file mode 100644
index 00000000000..452b116a2fc
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/latexmk.yaml
@@ -0,0 +1,63 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: latexmk
+name: LaTeXmk
+authors:
+- Marco Daniel
+- Brent Longborough
+- Paulo Cereda
+commands:
+- name: Tool LaTeXmk
+ command: >
+ @{
+ if (isNotEmpty(clean)) {
+ return getCommand('latexmk', clean, options);
+ }
+ else {
+ return getCommand('latexmk', isEmpty(program, engine,
+ program), options, file);
+ }
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: clean
+ flag: >
+ @{
+ if ([ 'all', 'partial' ].contains(parameters.clean)) {
+ return isTrue(parameters.clean == 'all' , '-C', '-c');
+ }
+ else {
+ throwError('The provided clean value is not valid.');
+ }
+ }
+- identifier: engine
+ flag: >
+ @{
+ if ([ 'latex', 'pdflatex', 'xelatex',
+ 'lualatex' ].contains(parameters.engine)) {
+ flags = [ 'latex' : '-dvi', 'pdflatex' : '-pdf',
+ 'xelatex' : '-xelatex', 'lualatex' : '-lualatex' ];
+ return flags[parameters.engine];
+ }
+ else {
+ throwError('The provided engine value is not valid.');
+ }
+ }
+- identifier: program
+ flag: >
+ @{
+ return '-latex='.concat(parameters.program)
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/lmkclean.yaml b/Master/texmf-dist/scripts/arara/rules/lmkclean.yaml
deleted file mode 100644
index 0dda56496f6..00000000000
--- a/Master/texmf-dist/scripts/arara/rules/lmkclean.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-!config
-# Clean rule for arara, via latexmk
-# author: Brent Longborough
-# requires arara 3.0+
-identifier: lmkclean
-name: LaTeXmKCleaner
-command: <arara> latexmk @{include} "@{file}"
-arguments:
-- identifier: include
- flag: <arara> @{isTrue(parameters.include.toLowerCase() == "all", "-C", "-c") }
- default: <arara> -c
diff --git a/Master/texmf-dist/scripts/arara/rules/lualatex.yaml b/Master/texmf-dist/scripts/arara/rules/lualatex.yaml
index 06c7f60eef5..4c4628d2482 100644
--- a/Master/texmf-dist/scripts/arara/rules/lualatex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/lualatex.yaml
@@ -1,19 +1,55 @@
!config
-# LuaLaTeX rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: lualatex
name: LuaLaTeX
-command: <arara> lualatex @{action} @{draft} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LuaLaTeX engine
+ command: >
+ @{
+ return getCommand('lualatex', interaction, draft, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: draft
- flag: <arara> @{isTrue(parameters.draft,"--draftmode")}
+ flag: >
+ @{
+ isTrue(parameters.draft, '--draftmode')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/lualatexmk.yaml b/Master/texmf-dist/scripts/arara/rules/lualatexmk.yaml
deleted file mode 100644
index 1c82b83aa4d..00000000000
--- a/Master/texmf-dist/scripts/arara/rules/lualatexmk.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-!config
-# LaTeXmk with LuaLaTeX rule for arara
-# author: Brent Longborough
-# requires: arara 3.0+
-identifier: lualatexmk
-name: luaLaTeXmK
-command: <arara> latexmk -e '$pdflatex=q/lualatex%O%S/' @{action} @{synctex} @{shell} @{options} @{style} -pdf "@{file}"
-arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
-- identifier: shell
- flag: <arara> @{isTrue(parameters.shell,"--shell-escape"," --no-shell-escape")}
-- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=0","--synctex=1")}
-- identifier: options
- flag: <arara> @{parameters.options}
-- identifier: style
- flag: <arara> -e '$makeindex=q/makeindex %O -s @{parameters.style}.ist -o %D %S/'
-
diff --git a/Master/texmf-dist/scripts/arara/rules/luatex.yaml b/Master/texmf-dist/scripts/arara/rules/luatex.yaml
index 359781f1703..78840f6d96d 100644
--- a/Master/texmf-dist/scripts/arara/rules/luatex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/luatex.yaml
@@ -1,18 +1,55 @@
!config
-# LuaTeX rule for arara
-# author: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: luatex
name: LuaTeX
-command: <arara> luatex @{action} @{draft} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LuaTeX engine
+ command: >
+ @{
+ return getCommand('luatex', interaction, draft, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: draft
- flag: <arara> @{isTrue(parameters.draft,"--draftmode")}
+ flag: >
+ @{
+ isTrue(parameters.draft, '--draftmode')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/make.yaml b/Master/texmf-dist/scripts/arara/rules/make.yaml
index ad3e565a443..07e619aa2df 100644
--- a/Master/texmf-dist/scripts/arara/rules/make.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/make.yaml
@@ -1,12 +1,47 @@
!config
-# Make rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: make
name: Make
-command: <arara> make @{task}
-arguments:
-- identifier: task
- flag: <arara> @{parameters.task}
-
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The Make program
+ command: >
+ @{
+ if (isNotEmpty(targets)) {
+ tasks = [];
+ for (target : targets) {
+ tasks.add(getCommand('make', target, options));
+ }
+ return tasks;
+ }
+ else {
+ return getCommand('make', options);
+ }
+ }
+arguments:
+- identifier: targets
+ flag: >
+ @{
+ if (isList(parameters.targets)) {
+ return parameters.targets;
+ }
+ else {
+ throwError('I was expecting a list of targets.');
+ }
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml b/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
index 1d2cd053101..4dee1e1567b 100644
--- a/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
@@ -1,10 +1,29 @@
!config
-# MakeGlossaries rule for arara
-# author: Marco Daniel
-# requres arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: makeglossaries
name: MakeGlossaries
-command: <arara> makeglossaries @{options} "@{getBasename(file)}"
-arguments:
+authors:
+- Marco Daniel
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The MakeGlossaries software
+ command: >
+ @{
+ return getCommand('makeglossaries', options, getBasename(file));
+ }
+arguments:
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/makeglossarieslite.yaml b/Master/texmf-dist/scripts/arara/rules/makeglossarieslite.yaml
new file mode 100644
index 00000000000..fc48090c668
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/makeglossarieslite.yaml
@@ -0,0 +1,29 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: makeglossarieslite
+name: MakeGlossariesLite
+authors:
+- Marco Daniel
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The MakeGlossariesLite software
+ command: >
+ @{
+ return getCommand('makeglossaries-lite', options, getBasename(file));
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/makeindex.yaml b/Master/texmf-dist/scripts/arara/rules/makeindex.yaml
index 7cb1f5c6a2c..83f7e286d02 100644
--- a/Master/texmf-dist/scripts/arara/rules/makeindex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/makeindex.yaml
@@ -1,16 +1,68 @@
!config
-# MakeIndex rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: makeindex
name: MakeIndex
-command: <arara> makeindex @{german} @{style} @{options} "@{getBasename(file)}.idx"
-arguments:
-- identifier: style
- flag: <arara> -s @{parameters.style}
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The MakeIndex software
+ command: >
+ @{
+ base = getBasename(file);
+ infile = base.concat('.').concat(input);
+ outfile = [ '-o', base.concat('.').concat(output) ];
+ logfile = [ '-t', base.concat('.').concat(log) ];
+ return getCommand('makeindex', german, style, order, options,
+ logfile, infile, outfile);
+ }
+arguments:
+- identifier: input
+ flag: >
+ @{
+ parameters.input
+ }
+ default: idx
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: ind
+- identifier: log
+ flag: >
+ @{
+ parameters.log
+ }
+ default: ilg
- identifier: german
- flag: <arara> @{isTrue(parameters.german,"-g")}
+ flag: >
+ @{
+ isTrue(parameters.german, '-g')
+ }
+- identifier: order
+ flag: >
+ @{
+ if ([ 'letter', 'word' ].contains(parameters.order)) {
+ return isTrue(parameters.order == 'letter', '-l', '');
+ }
+ else {
+ throwError('The provided order is invalid.');
+ }
+ }
+- identifier: style
+ flag: "@{ [ '-s', parameters.style ] }"
- identifier: options
- flag: <arara> @{parameters.options}
-
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/nomencl.yaml b/Master/texmf-dist/scripts/arara/rules/nomencl.yaml
index ce939975d4d..2a563b62664 100644
--- a/Master/texmf-dist/scripts/arara/rules/nomencl.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/nomencl.yaml
@@ -1,15 +1,40 @@
!config
-# Nomencl rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: nomencl
name: Nomencl
-command: <arara> makeindex @{options} "@{getBasename(file)}.nlo" -s "@{style}.ist" -o "@{getBasename(file)}.nls"
-arguments:
+authors:
+- Marco Daniel
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The Nomenclature software
+ command: >
+ @{
+ nlo = getBasename(file).concat('.nlo');
+ nls = getBasename(file).concat('.nls');
+ return getCommand('makeindex', options, nlo, style, '-o', nls);
+ }
+arguments:
- identifier: style
- flag: <arara> @{parameters.style}
- default: nomencl
+ flag: >
+ @{
+ [ '-s', parameters.style ]
+ }
+ default: >
+ @{
+ [ '-s', 'nomencl.ist' ]
+ }
- identifier: options
- flag: <arara> @{parameters.options}
-
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/pdfcsplain.yaml b/Master/texmf-dist/scripts/arara/rules/pdfcsplain.yaml
new file mode 100644
index 00000000000..db9bbdbec50
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/pdfcsplain.yaml
@@ -0,0 +1,54 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: pdfcsplain
+name: PDFCSplain
+authors:
+- Paulo Cereda
+commands:
+- name: PDFCSplain engine
+ command: >
+ @{
+ return getCommand('pdfcsplain', interaction, draft, shell,
+ synctex, 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: 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/Master/texmf-dist/scripts/arara/rules/pdflatex.yaml b/Master/texmf-dist/scripts/arara/rules/pdflatex.yaml
index 90e28ec0945..61b9b8d3560 100644
--- a/Master/texmf-dist/scripts/arara/rules/pdflatex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/pdflatex.yaml
@@ -1,19 +1,55 @@
!config
-# PDFLaTeX rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: pdflatex
name: PDFLaTeX
-command: <arara> pdflatex @{action} @{draft} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: PDFLaTeX engine
+ command: >
+ @{
+ return getCommand('pdflatex', interaction, draft, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: draft
- flag: <arara> @{isTrue(parameters.draft,"--draftmode")}
+ flag: >
+ @{
+ isTrue(parameters.draft, '--draftmode')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/pdflatexmk.yaml b/Master/texmf-dist/scripts/arara/rules/pdflatexmk.yaml
deleted file mode 100644
index b3cadf62889..00000000000
--- a/Master/texmf-dist/scripts/arara/rules/pdflatexmk.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-!config
-# LaTeXmk with pdfLaTeX rule for arara
-# author: Brent Longborough
-# requires arara 3.0+
-identifier: pdflatexmk
-name: pdfLaTeXmK
-command: <arara> latexmk -e '$pdflatex=q/pdflatex%O%S/' @{action} @{synctex} @{shell} @{options}@{style} -pdf "@{file}"
-arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
-- identifier: shell
- flag: <arara> @{isTrue(parameters.shell,"--shell-escape"," --no-shell-escape")}
-- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=0","--synctex=1")}
-- identifier: options
- flag: <arara> @{parameters.options}
-- identifier: style
- flag: <arara> -e '$makeindex=q/makeindex %O -s @{parameters.style}.ist -o %D %S/'
diff --git a/Master/texmf-dist/scripts/arara/rules/pdftex.yaml b/Master/texmf-dist/scripts/arara/rules/pdftex.yaml
index db084597cbe..2e3126bbfdc 100644
--- a/Master/texmf-dist/scripts/arara/rules/pdftex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/pdftex.yaml
@@ -1,19 +1,55 @@
!config
-# PDFTeX rule for arara
-# author: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: pdftex
name: PDFTeX
-command: <arara> pdftex @{action} @{draft} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: PDFTeX engine
+ command: >
+ @{
+ return getCommand('pdftex', interaction, draft, shell,
+ synctex, options, file);
+ }
arguments:
-arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: draft
- flag: <arara> @{isTrue(parameters.draft,"--draftmode")}
+ flag: >
+ @{
+ isTrue(parameters.draft, '--draftmode')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/pdftk.yaml b/Master/texmf-dist/scripts/arara/rules/pdftk.yaml
new file mode 100644
index 00000000000..9bd3f460600
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/pdftk.yaml
@@ -0,0 +1,29 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: pdftk
+name: PDFtk
+authors:
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: PDFtk
+ command: >
+ @{
+ input = getBasename(file).concat('.pdf');
+ return getCommand('pdftk', input, options);
+ }
+arguments:
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/ps2pdf.yaml b/Master/texmf-dist/scripts/arara/rules/ps2pdf.yaml
index a5e82d545e5..656f7e22c31 100644
--- a/Master/texmf-dist/scripts/arara/rules/ps2pdf.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/ps2pdf.yaml
@@ -1,14 +1,39 @@
!config
-# PS2PDF rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: ps2pdf
name: PS2PDF
-command: <arara> ps2pdf @{options} "@{getBasename(file)}.ps" "@{output}.pdf"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The PS2PDF program
+ command: >
+ @{
+ infile = getBasename(file).concat('.ps');
+ outfile = getBasename(output).concat('.pdf');
+ return getCommand('ps2pdf', options, infile, outfile);
+ }
arguments:
- identifier: output
- flag: <arara> @{parameters.output}
- default: <arara> @{getBasename(file)}
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/sketch.yaml b/Master/texmf-dist/scripts/arara/rules/sketch.yaml
index 3f98518a319..a170aa20f2d 100644
--- a/Master/texmf-dist/scripts/arara/rules/sketch.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/sketch.yaml
@@ -1,10 +1,29 @@
!config
-# Sketch rule for arara
-# author: Sergey Ulyanov
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: sketch
name: Sketch
-command: <arara> sketch @{options} "@{file}" -o "@{getBasename(file)}.tex"
+authors:
+- Sergey Ulyanov
+- Paulo Cereda
+commands:
+- name: The Sketch software
+ command: >
+ @{
+ output = getBasename(file).concat('.tex');
+ return getCommand('sketch', options, file, '-o', output);
+ }
arguments:
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/songidx.yaml b/Master/texmf-dist/scripts/arara/rules/songidx.yaml
index faa64e70d20..818c4333a77 100644
--- a/Master/texmf-dist/scripts/arara/rules/songidx.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/songidx.yaml
@@ -1,11 +1,41 @@
- !config
-# songidx rule for arara
-# author: Francesco Endrici
-# requires arara 3.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: songidx
name: SongIDX
-command: <arara> songidx "@{input}.sxd"
+authors:
+- Francesco Endrici
+- Paulo Cereda
+commands:
+- name: The SongIDX Lua script
+ command: >
+ @{
+ infile = getBasename(input).concat('.sxd');
+ return getCommand('texlua', script, options, infile);
+ }
arguments:
- identifier: input
- flag: <arara> @{parameters.input}
-
+ flag: >
+ @{
+ parameters.input
+ }
+ required: true
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: script
+ flag: >
+ @{
+ parameters.script
+ }
+ default: songidx.lua
diff --git a/Master/texmf-dist/scripts/arara/rules/tex.yaml b/Master/texmf-dist/scripts/arara/rules/tex.yaml
index 49f7cf73074..c0321b34dce 100644
--- a/Master/texmf-dist/scripts/arara/rules/tex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/tex.yaml
@@ -1,16 +1,44 @@
!config
-# TeX rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: tex
name: TeX
-command: <arara> tex @{action} @{shell} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: TeX engine
+ command: >
+ @{
+ return getCommand('tex', interaction, shell, options, file);
+ }
arguments:
-arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/texindy.yaml b/Master/texmf-dist/scripts/arara/rules/texindy.yaml
new file mode 100644
index 00000000000..b0a9c93842e
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/texindy.yaml
@@ -0,0 +1,91 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: texindy
+name: TeXindy
+authors:
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The TeXindy software
+ command: >
+ @{
+ base = getBasename(file);
+ infile = base.concat('.').concat(input);
+ outfile = [ '-o', base.concat('.').concat(output) ];
+ logfile = [ '-t', base.concat('.').concat(log) ];
+ return getCommand('texindy', quiet, debug, markup, modules,
+ codepage, language, logfile, outfile, options, infile);
+ }
+arguments:
+- identifier: quiet
+ flag: >
+ @{
+ isTrue(parameters.quiet, '-q')
+ }
+- identifier: modules
+ flag: >
+ @{
+ elements = [];
+ if (isList(parameters.modules)) {
+ foreach (module : parameters.modules) {
+ elements.add('-M');
+ elements.add(module);
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: codepage
+ flag: >
+ @{
+ [ '-C', parameters.codepage ]
+ }
+- identifier: language
+ flag: >
+ @{
+ [ '-L', parameters.language ]
+ }
+- identifier: markup
+ flag: >
+ @{
+ if ([ 'latex', 'xelatex', 'omega' ].contains(parameters.markup)) {
+ return [ '-I', parameters.markup ];
+ }
+ else {
+ throwError('The provided markup is invalid.');
+ }
+ }
+- identifier: input
+ flag: >
+ @{
+ parameters.input
+ }
+ default: idx
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: ind
+- identifier: log
+ flag: >
+ @{
+ parameters.log
+ }
+ default: ilg
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/tikzmake.yaml b/Master/texmf-dist/scripts/arara/rules/tikzmake.yaml
new file mode 100644
index 00000000000..e6cb809a54e
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/tikzmake.yaml
@@ -0,0 +1,39 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: tikzmake
+name: TikZmake
+authors:
+- Robbie Smith
+- Paulo Cereda
+commands:
+- name: TikZ list-and-make engine
+ command: >
+ @{
+ makefile = getBasename(file).concat('.makefile');
+ return getCommand('make', force, jobs, options, '-f', makefile);
+ }
+arguments:
+- identifier: force
+ flag: >
+ @{
+ isTrue(parameters.force, '--always-make')
+ }
+- identifier: jobs
+ flag: >
+ @{
+ return '-j'.concat(parameters.jobs)
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/velocity.yaml b/Master/texmf-dist/scripts/arara/rules/velocity.yaml
new file mode 100644
index 00000000000..0fd62a94650
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/velocity.yaml
@@ -0,0 +1,41 @@
+!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/Master/texmf-dist/scripts/arara/rules/xdvipdfmx.yaml b/Master/texmf-dist/scripts/arara/rules/xdvipdfmx.yaml
new file mode 100644
index 00000000000..b9433f8a939
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/xdvipdfmx.yaml
@@ -0,0 +1,39 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: xdvipdfmx
+name: XDVIPDFMX
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The XDVIPDFMX program
+ command: >
+ @{
+ infile = getBasename(file).concat('.dvi');
+ outfile = getBasename(output).concat('.pdf');
+ return getCommand('xdvipdfmx', infile, '-o', outfile, options);
+ }
+arguments:
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: >
+ @{
+ file
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.')
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/xelatex.yaml b/Master/texmf-dist/scripts/arara/rules/xelatex.yaml
index 0321f612447..e248ae2fe87 100644
--- a/Master/texmf-dist/scripts/arara/rules/xelatex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/xelatex.yaml
@@ -1,17 +1,50 @@
!config
-# XeLaTeX rule for arara
-# author: Marco Daniel
-# last edited by: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: xelatex
name: XeLaTeX
-command: <arara> xelatex @{action} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: XeLaTeX engine
+ command: >
+ @{
+ return getCommand('xelatex', interaction, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/xelatexmk.yaml b/Master/texmf-dist/scripts/arara/rules/xelatexmk.yaml
deleted file mode 100644
index 149cf6cb860..00000000000
--- a/Master/texmf-dist/scripts/arara/rules/xelatexmk.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-!config
-# LaTeXmk with XeLaTeX rule for arara
-# author: Brent Longborough
-# requires arara 3.0+
-identifier: xelatexmk
-name: XeLaTeXmK
-command: <arara> latexmk -e '$pdflatex=q/xelatex%O%S/' @{action} @{synctex} @{shell} @{options} @{style} -pdf "@{file}"
-arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
-- identifier: shell
- flag: <arara> @{isTrue(parameters.shell,"--shell-escape"," --no-shell-escape")}
-- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=0","--synctex=1")}
-- identifier: options
- flag: <arara> @{parameters.options}
-- identifier: style
- flag: <arara> -e '$makeindex=q/makeindex %O -s @{parameters.style}.ist -o %D %S/'
-
diff --git a/Master/texmf-dist/scripts/arara/rules/xetex.yaml b/Master/texmf-dist/scripts/arara/rules/xetex.yaml
index 20cfca8511e..2a9369e0e87 100644
--- a/Master/texmf-dist/scripts/arara/rules/xetex.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/xetex.yaml
@@ -1,16 +1,50 @@
!config
-# XeLaTeX rule for arara
-# author: Paulo Cereda
-# requires arara 3.0+
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
identifier: xetex
name: XeTeX
-command: <arara> xetex @{action} @{shell} @{synctex} @{options} "@{file}"
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: XeTeX engine
+ command: >
+ @{
+ return getCommand('xetex', interaction, shell,
+ synctex, options, file);
+ }
arguments:
-- identifier: action
- flag: <arara> --interaction=@{parameters.action}
+- 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: <arara> @{isTrue(parameters.shell,"--shell-escape","--no-shell-escape")}
+ flag: >
+ @{
+ isTrue(parameters.shell, '--shell-escape', '--no-shell-escape')
+ }
- identifier: synctex
- flag: <arara> @{isTrue(parameters.synctex,"--synctex=1","--synctex=0")}
+ flag: >
+ @{
+ isTrue(parameters.synctex, '--synctex=1', '--synctex=0')
+ }
- identifier: options
- flag: <arara> @{parameters.options}
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/xindy.yaml b/Master/texmf-dist/scripts/arara/rules/xindy.yaml
new file mode 100644
index 00000000000..a44dbbfd08c
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/xindy.yaml
@@ -0,0 +1,91 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: xindy
+name: Xindy
+authors:
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The Xindy software
+ command: >
+ @{
+ base = getBasename(file);
+ infile = base.concat('.').concat(input);
+ outfile = [ '-o', base.concat('.').concat(output) ];
+ logfile = [ '-t', base.concat('.').concat(log) ];
+ return getCommand('xindy', quiet, debug, markup, modules,
+ codepage, language, logfile, outfile, options, infile);
+ }
+arguments:
+- identifier: quiet
+ flag: >
+ @{
+ isTrue(parameters.quiet, '-q')
+ }
+- identifier: modules
+ flag: >
+ @{
+ elements = [];
+ if (isList(parameters.modules)) {
+ foreach (module : parameters.modules) {
+ elements.add('-M');
+ elements.add(module);
+ }
+ return elements;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
+- identifier: codepage
+ flag: >
+ @{
+ [ '-C', parameters.codepage ]
+ }
+- identifier: language
+ flag: >
+ @{
+ [ '-L', parameters.language ]
+ }
+- identifier: markup
+ flag: >
+ @{
+ if ([ 'latex', 'xelatex', 'omega', 'xindy' ].contains(parameters.markup)) {
+ return [ '-I', parameters.markup ];
+ }
+ else {
+ throwError('The provided markup is invalid.');
+ }
+ }
+- identifier: input
+ flag: >
+ @{
+ parameters.input
+ }
+ default: idx
+- identifier: output
+ flag: >
+ @{
+ parameters.output
+ }
+ default: ind
+- identifier: log
+ flag: >
+ @{
+ parameters.log
+ }
+ default: ilg
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }