summaryrefslogtreecommitdiff
path: root/support/arara/scripts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/arara/scripts
Initial commit
Diffstat (limited to 'support/arara/scripts')
-rw-r--r--support/arara/scripts/arara.sh17
-rw-r--r--support/arara/scripts/rules/animate.yaml62
-rw-r--r--support/arara/scripts/rules/bib2gls.yaml224
-rw-r--r--support/arara/scripts/rules/biber.yaml28
-rw-r--r--support/arara/scripts/rules/bibtex.yaml28
-rw-r--r--support/arara/scripts/rules/bibtex8.yaml28
-rw-r--r--support/arara/scripts/rules/bibtexu.yaml28
-rw-r--r--support/arara/scripts/rules/clean.yaml51
-rw-r--r--support/arara/scripts/rules/csplain.yaml54
-rw-r--r--support/arara/scripts/rules/datatooltk.yaml191
-rw-r--r--support/arara/scripts/rules/dvipdfm.yaml39
-rw-r--r--support/arara/scripts/rules/dvipdfmx.yaml39
-rw-r--r--support/arara/scripts/rules/dvips.yaml39
-rw-r--r--support/arara/scripts/rules/dvipspdf.yaml56
-rw-r--r--support/arara/scripts/rules/dvisvgm.yaml28
-rw-r--r--support/arara/scripts/rules/etex.yaml45
-rw-r--r--support/arara/scripts/rules/frontespizio.yaml76
-rw-r--r--support/arara/scripts/rules/halt.yaml18
-rw-r--r--support/arara/scripts/rules/indent.yaml109
-rw-r--r--support/arara/scripts/rules/latex.yaml55
-rw-r--r--support/arara/scripts/rules/latexmk.yaml63
-rw-r--r--support/arara/scripts/rules/lualatex.yaml55
-rw-r--r--support/arara/scripts/rules/luatex.yaml55
-rw-r--r--support/arara/scripts/rules/make.yaml47
-rw-r--r--support/arara/scripts/rules/makeglossaries.yaml91
-rw-r--r--support/arara/scripts/rules/makeglossarieslite.yaml29
-rw-r--r--support/arara/scripts/rules/makeindex.yaml68
-rw-r--r--support/arara/scripts/rules/nomencl.yaml40
-rw-r--r--support/arara/scripts/rules/pdfcsplain.yaml54
-rw-r--r--support/arara/scripts/rules/pdflatex.yaml55
-rw-r--r--support/arara/scripts/rules/pdftex.yaml55
-rw-r--r--support/arara/scripts/rules/pdftk.yaml29
-rw-r--r--support/arara/scripts/rules/ps2pdf.yaml39
-rw-r--r--support/arara/scripts/rules/sketch.yaml29
-rw-r--r--support/arara/scripts/rules/songidx.yaml41
-rw-r--r--support/arara/scripts/rules/tex.yaml44
-rw-r--r--support/arara/scripts/rules/texindy.yaml91
-rw-r--r--support/arara/scripts/rules/tikzmake.yaml39
-rw-r--r--support/arara/scripts/rules/velocity.yaml41
-rw-r--r--support/arara/scripts/rules/xdvipdfmx.yaml39
-rw-r--r--support/arara/scripts/rules/xelatex.yaml50
-rw-r--r--support/arara/scripts/rules/xetex.yaml50
-rw-r--r--support/arara/scripts/rules/xindy.yaml91
43 files changed, 2410 insertions, 0 deletions
diff --git a/support/arara/scripts/arara.sh b/support/arara/scripts/arara.sh
new file mode 100644
index 0000000000..197228f491
--- /dev/null
+++ b/support/arara/scripts/arara.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
+# Note from Paulo: this script provides better Cygwin support than our original
+# approach, so the team decided to use it as a proper wrapper for arara as well.
+
+scriptname=`basename "$0"`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+ CYGWIN_ROOT=`cygpath -w /`
+ export CYGWIN_ROOT
+ jarpath=`cygpath -w "$jarpath"`
+fi
+
+exec java -jar "$jarpath" "$@"
diff --git a/support/arara/scripts/rules/animate.yaml b/support/arara/scripts/rules/animate.yaml
new file mode 100644
index 0000000000..ac6dc347bb
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/bib2gls.yaml b/support/arara/scripts/rules/bib2gls.yaml
new file mode 100644
index 0000000000..9a97920717
--- /dev/null
+++ b/support/arara/scripts/rules/bib2gls.yaml
@@ -0,0 +1,224 @@
+!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: >
+ @{
+ if (isNotEmpty(clean))
+ {
+ prefix = [];
+ if (isUnix()) {
+ prefix = [ 'rm', '-f', '-v' ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', 'del' ];
+ }
+
+ base = getBasename(file);
+ removals = [];
+
+ lines = readFromFile(base.concat('.').concat('aux'));
+
+ java.util.regex.Pattern resourcePattern =
+ java.util.regex.Pattern.compile(
+ "\\\\glsxtr@resource\\{.*\\}\\{([^\\}]+)\\}");
+
+ if (isNotEmpty(trans))
+ {
+ if (trans == getOriginalFile())
+ {
+ throwError('I cannot remove the main file reference.');
+ }
+
+ removals.add(getCommand(prefix, trans));
+ }
+ else
+ {
+ removals.add(getCommand(prefix, base.concat('.glg')));
+ }
+
+ foreach (line: lines)
+ {
+ matcher = resourcePattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ removals.add(getCommand(prefix, matcher.group(1).concat('.glstex')));
+ }
+ }
+
+ return removals;
+ }
+ else
+ {
+ 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: >
+ @{
+ if ([ 'tex', 'ltx', 'cls', 'sty', 'bib',
+ 'dtx', 'ins', 'def', 'ldf' ].contains(parameters.trans)) {
+ throwError('Forbidden transcript extension');
+ }
+
+ 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.');
+ }
+ }
+- identifier: clean
+ flag: >
+ @{
+ return isTrue(parameters.clean, 'true', '');
+ }
diff --git a/support/arara/scripts/rules/biber.yaml b/support/arara/scripts/rules/biber.yaml
new file mode 100644
index 0000000000..9ba02bc6b2
--- /dev/null
+++ b/support/arara/scripts/rules/biber.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: biber
+name: Biber
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The Biber reference management software
+ command: >
+ @{
+ return getCommand('biber', 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/support/arara/scripts/rules/bibtex.yaml b/support/arara/scripts/rules/bibtex.yaml
new file mode 100644
index 0000000000..5cbe5c1756
--- /dev/null
+++ b/support/arara/scripts/rules/bibtex.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: bibtex
+name: BibTeX
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: The BibTeX reference management software
+ command: >
+ @{
+ return getCommand('bibtex', 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/support/arara/scripts/rules/bibtex8.yaml b/support/arara/scripts/rules/bibtex8.yaml
new file mode 100644
index 0000000000..8a4631ff77
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/bibtexu.yaml b/support/arara/scripts/rules/bibtexu.yaml
new file mode 100644
index 0000000000..f580886d95
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/clean.yaml b/support/arara/scripts/rules/clean.yaml
new file mode 100644
index 0000000000..1a39ed3f27
--- /dev/null
+++ b/support/arara/scripts/rules/clean.yaml
@@ -0,0 +1,51 @@
+!config
+# 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: 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: extensions
+ flag: >
+ @{
+ if (isList(parameters.extensions)) {
+ return parameters.extensions;
+ }
+ else {
+ throwError('I was expecting a list of extensions.');
+ }
+ }
diff --git a/support/arara/scripts/rules/csplain.yaml b/support/arara/scripts/rules/csplain.yaml
new file mode 100644
index 0000000000..cfdcc95421
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/datatooltk.yaml b/support/arara/scripts/rules/datatooltk.yaml
new file mode 100644
index 0000000000..0b80d15e75
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/dvipdfm.yaml b/support/arara/scripts/rules/dvipdfm.yaml
new file mode 100644
index 0000000000..d2dca0db36
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/dvipdfmx.yaml b/support/arara/scripts/rules/dvipdfmx.yaml
new file mode 100644
index 0000000000..2feb9f0fe9
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/dvips.yaml b/support/arara/scripts/rules/dvips.yaml
new file mode 100644
index 0000000000..dd7a929bd0
--- /dev/null
+++ b/support/arara/scripts/rules/dvips.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: dvips
+name: DVIPS
+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: >
+ @{
+ 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/support/arara/scripts/rules/dvipspdf.yaml b/support/arara/scripts/rules/dvipspdf.yaml
new file mode 100644
index 0000000000..4190b1869c
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/dvisvgm.yaml b/support/arara/scripts/rules/dvisvgm.yaml
new file mode 100644
index 0000000000..0b5377f29d
--- /dev/null
+++ b/support/arara/scripts/rules/dvisvgm.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: dvisvgm
+name: DVISVGM
+authors:
+- samcarter
+commands:
+- name: The dvisvgm program
+ command: >
+ @{
+ base = getBasename(file).concat('.dvi');
+ return getCommand('dvisvgm', base, options);
+ }
+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/etex.yaml b/support/arara/scripts/rules/etex.yaml
new file mode 100644
index 0000000000..15f8bf5412
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/frontespizio.yaml b/support/arara/scripts/rules/frontespizio.yaml
new file mode 100644
index 0000000000..45f3a4bf4f
--- /dev/null
+++ b/support/arara/scripts/rules/frontespizio.yaml
@@ -0,0 +1,76 @@
+!config
+# 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:
+- 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: >
+ @{
+ if ([ 'pdflatex', 'latex', 'xelatex',
+ 'lualatex' ].contains(parameters.engine)) {
+ return parameters.engine;
+ }
+ else {
+ throwError('The provided engine is not valid');
+ }
+ }
+ default: pdflatex
+- 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/support/arara/scripts/rules/halt.yaml b/support/arara/scripts/rules/halt.yaml
new file mode 100644
index 0000000000..9d8aaa8aef
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/indent.yaml b/support/arara/scripts/rules/indent.yaml
new file mode 100644
index 0000000000..b1e182f0a7
--- /dev/null
+++ b/support/arara/scripts/rules/indent.yaml
@@ -0,0 +1,109 @@
+!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, screenlog,
+ settings, cruft, overwrite, output, file, modifylinebreaks,
+ replacement, 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: replacement
+ flag: >
+ @{
+ opts = [ 'full' : '-r', 'noverb' : '-rv', 'noindent' : '-rr' ];
+ if (opts.keySet().contains(parameters.replacement)) {
+ return opts[parameters.replacement];
+ }
+ else {
+ throwError('You provided an invalid value for replacement.');
+ }
+ }
+
+- 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/latex.yaml b/support/arara/scripts/rules/latex.yaml
new file mode 100644
index 0000000000..f1b9add4b3
--- /dev/null
+++ b/support/arara/scripts/rules/latex.yaml
@@ -0,0 +1,55 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LaTeX engine
+ command: >
+ @{
+ return getCommand('latex', 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/support/arara/scripts/rules/latexmk.yaml b/support/arara/scripts/rules/latexmk.yaml
new file mode 100644
index 0000000000..452b116a2f
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/lualatex.yaml b/support/arara/scripts/rules/lualatex.yaml
new file mode 100644
index 0000000000..4c4628d248
--- /dev/null
+++ b/support/arara/scripts/rules/lualatex.yaml
@@ -0,0 +1,55 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LuaLaTeX engine
+ command: >
+ @{
+ return getCommand('lualatex', 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/support/arara/scripts/rules/luatex.yaml b/support/arara/scripts/rules/luatex.yaml
new file mode 100644
index 0000000000..78840f6d96
--- /dev/null
+++ b/support/arara/scripts/rules/luatex.yaml
@@ -0,0 +1,55 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: LuaTeX engine
+ command: >
+ @{
+ return getCommand('luatex', 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/support/arara/scripts/rules/make.yaml b/support/arara/scripts/rules/make.yaml
new file mode 100644
index 0000000000..07e619aa2d
--- /dev/null
+++ b/support/arara/scripts/rules/make.yaml
@@ -0,0 +1,47 @@
+!config
+# 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
+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/support/arara/scripts/rules/makeglossaries.yaml b/support/arara/scripts/rules/makeglossaries.yaml
new file mode 100644
index 0000000000..562af6d149
--- /dev/null
+++ b/support/arara/scripts/rules/makeglossaries.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: makeglossaries
+name: MakeGlossaries
+authors:
+- Marco Daniel
+- Nicola Talbot
+- Paulo Cereda
+commands:
+- name: The MakeGlossaries software
+ command: >
+ @{
+ if (isEmpty(clean))
+ {
+ return getCommand('makeglossaries', options, getBasename(file));
+ }
+ else {
+ prefix = [];
+ if (isUnix()) {
+ prefix = [ 'rm', '-f' ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', 'del' ];
+ }
+
+ base = getBasename(file);
+ removals = [];
+
+ removals.add(getCommand(prefix, base.concat(".glsdefs")));
+
+ lines = readFromFile(base.concat('.').concat('aux'));
+
+ java.util.regex.Pattern glsPattern =
+ java.util.regex.Pattern.compile(
+ "\\\\@newglossary\\{.*\\}\\{(.*)\\}\\{(.*)\\}\\{(.*)\\}");
+
+ java.util.regex.Pattern istPattern =
+ (clean == 'partial' ? null :
+ java.util.regex.Pattern.compile("\\\\@istfilename\\{(.*)\\}"));
+
+ foreach (line: lines)
+ {
+ matcher = glsPattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ foreach(extension: [matcher.group(1), matcher.group(2), matcher.group(3)])
+ {
+ removals.add(getCommand(prefix, base.concat('.').concat(extension)));
+ }
+ }
+ else if (istPattern != null)
+ {
+ matcher = istPattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ removals.add(getCommand(prefix, matcher.group(1)));
+ istPattern = null;
+ }
+ }
+ }
+
+ return removals;
+ }
+ }
+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 parameters.clean;
+ }
+ else {
+ throwError('The provided clean value is not valid.');
+ }
+ }
diff --git a/support/arara/scripts/rules/makeglossarieslite.yaml b/support/arara/scripts/rules/makeglossarieslite.yaml
new file mode 100644
index 0000000000..fc48090c66
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/makeindex.yaml b/support/arara/scripts/rules/makeindex.yaml
new file mode 100644
index 0000000000..83f7e286d0
--- /dev/null
+++ b/support/arara/scripts/rules/makeindex.yaml
@@ -0,0 +1,68 @@
+!config
+# 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
+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: >
+ @{
+ 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: >
+ @{
+ 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
new file mode 100644
index 0000000000..2a563b6266
--- /dev/null
+++ b/support/arara/scripts/rules/nomencl.yaml
@@ -0,0 +1,40 @@
+!config
+# 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
+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: >
+ @{
+ [ '-s', parameters.style ]
+ }
+ default: >
+ @{
+ [ '-s', 'nomencl.ist' ]
+ }
+- 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
new file mode 100644
index 0000000000..db9bbdbec5
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/pdflatex.yaml b/support/arara/scripts/rules/pdflatex.yaml
new file mode 100644
index 0000000000..61b9b8d356
--- /dev/null
+++ b/support/arara/scripts/rules/pdflatex.yaml
@@ -0,0 +1,55 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: PDFLaTeX engine
+ command: >
+ @{
+ return getCommand('pdflatex', 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/support/arara/scripts/rules/pdftex.yaml b/support/arara/scripts/rules/pdftex.yaml
new file mode 100644
index 0000000000..2e3126bbfd
--- /dev/null
+++ b/support/arara/scripts/rules/pdftex.yaml
@@ -0,0 +1,55 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: PDFTeX engine
+ command: >
+ @{
+ return getCommand('pdftex', 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/support/arara/scripts/rules/pdftk.yaml b/support/arara/scripts/rules/pdftk.yaml
new file mode 100644
index 0000000000..9bd3f46060
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/ps2pdf.yaml b/support/arara/scripts/rules/ps2pdf.yaml
new file mode 100644
index 0000000000..656f7e22c3
--- /dev/null
+++ b/support/arara/scripts/rules/ps2pdf.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: ps2pdf
+name: PS2PDF
+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: >
+ @{
+ 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/support/arara/scripts/rules/sketch.yaml b/support/arara/scripts/rules/sketch.yaml
new file mode 100644
index 0000000000..a170aa20f2
--- /dev/null
+++ b/support/arara/scripts/rules/sketch.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: sketch
+name: Sketch
+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: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ }
+ else {
+ throwError('I was expecting a list of options.');
+ }
+ }
diff --git a/support/arara/scripts/rules/songidx.yaml b/support/arara/scripts/rules/songidx.yaml
new file mode 100644
index 0000000000..818c4333a7
--- /dev/null
+++ b/support/arara/scripts/rules/songidx.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: songidx
+name: SongIDX
+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: >
+ @{
+ 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/support/arara/scripts/rules/tex.yaml b/support/arara/scripts/rules/tex.yaml
new file mode 100644
index 0000000000..c0321b34dc
--- /dev/null
+++ b/support/arara/scripts/rules/tex.yaml
@@ -0,0 +1,44 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: TeX engine
+ command: >
+ @{
+ return getCommand('tex', 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/support/arara/scripts/rules/texindy.yaml b/support/arara/scripts/rules/texindy.yaml
new file mode 100644
index 0000000000..d527e0292d
--- /dev/null
+++ b/support/arara/scripts/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, 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/support/arara/scripts/rules/tikzmake.yaml b/support/arara/scripts/rules/tikzmake.yaml
new file mode 100644
index 0000000000..e6cb809a54
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/velocity.yaml b/support/arara/scripts/rules/velocity.yaml
new file mode 100644
index 0000000000..0fd62a9465
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/xdvipdfmx.yaml b/support/arara/scripts/rules/xdvipdfmx.yaml
new file mode 100644
index 0000000000..b9433f8a93
--- /dev/null
+++ b/support/arara/scripts/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/support/arara/scripts/rules/xelatex.yaml b/support/arara/scripts/rules/xelatex.yaml
new file mode 100644
index 0000000000..e248ae2fe8
--- /dev/null
+++ b/support/arara/scripts/rules/xelatex.yaml
@@ -0,0 +1,50 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: XeLaTeX engine
+ command: >
+ @{
+ return getCommand('xelatex', interaction, 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: 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/xetex.yaml b/support/arara/scripts/rules/xetex.yaml
new file mode 100644
index 0000000000..2a9369e0e8
--- /dev/null
+++ b/support/arara/scripts/rules/xetex.yaml
@@ -0,0 +1,50 @@
+!config
+# 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
+authors:
+- Marco Daniel
+- Paulo Cereda
+commands:
+- name: XeTeX engine
+ command: >
+ @{
+ return getCommand('xetex', interaction, 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: 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
new file mode 100644
index 0000000000..6daf807cc8
--- /dev/null
+++ b/support/arara/scripts/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, 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.');
+ }
+ }