summaryrefslogtreecommitdiff
path: root/support/arara/scripts/rules/asymptote.yaml
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-05 03:00:59 +0000
committerNorbert Preining <norbert@preining.info>2020-03-05 03:00:59 +0000
commit898048513951b471a492afa23e46112d14bcb236 (patch)
tree8596afc705f55d2d07b324a756f7283ac0e2d21b /support/arara/scripts/rules/asymptote.yaml
parent19d25b8009801aa98ea2f46b45c37c257f990491 (diff)
CTAN sync 202003050300
Diffstat (limited to 'support/arara/scripts/rules/asymptote.yaml')
-rw-r--r--support/arara/scripts/rules/asymptote.yaml62
1 files changed, 62 insertions, 0 deletions
diff --git a/support/arara/scripts/rules/asymptote.yaml b/support/arara/scripts/rules/asymptote.yaml
new file mode 100644
index 0000000000..c58e7dd0e5
--- /dev/null
+++ b/support/arara/scripts/rules/asymptote.yaml
@@ -0,0 +1,62 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2020, Island of TeX
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: asymptote
+name: Asymptote
+authors:
+- Island of TeX
+commands:
+- name: Asymptote
+ command: >
+ @{
+ return getCommand('asy', color, engine, twice,
+ format, output, options, file);
+ }
+arguments:
+- identifier: color
+ flag: >
+ @{
+ if ([ 'bw', 'cmyk', 'rgb', 'gray' ].contains(parameters.color)) {
+ return '-' + parameters.color;
+ } else {
+ throwError('The provided color enforcement is not valid.');
+ }
+ }
+- identifier: engine
+ flag: >
+ @{
+ if ([ 'latex', 'pdflatex' , 'xelatex', 'lualatex', 'tex', 'pdftex',
+ 'luatex', 'context', 'none' ].contains(parameters.engine)) {
+ return [ '-tex', parameters.engine ];
+ } else {
+ throwError('The provided TeX engine is invalid.');
+ }
+ }
+ default: latex
+- identifier: twice
+ flag: >
+ @{
+ return isTrue(parameters.twice, '-twice');
+ }
+- identifier: format
+ flag: >
+ @{
+ return [ '-f', parameters.format ];
+ }
+- identifier: output
+ flag: >
+ @{
+ return [ '-o', parameters.output ];
+ }
+- identifier: options
+ flag: >
+ @{
+ if (isList(parameters.options)) {
+ return parameters.options;
+ } else {
+ throwError('I was expecting a list of options.');
+ }
+ }