summaryrefslogtreecommitdiff
path: root/support/arara/scripts/rules/frontespizio.yaml
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/rules/frontespizio.yaml
Initial commit
Diffstat (limited to 'support/arara/scripts/rules/frontespizio.yaml')
-rw-r--r--support/arara/scripts/rules/frontespizio.yaml76
1 files changed, 76 insertions, 0 deletions
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.');
+ }
+ }