1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
!config
# Arara, the cool TeX automation tool
# Copyright (c) 2022, Island of TeX
# All rights reserved.
#
# This rule is part of arara.
identifier: ltx2any
name: LTX2any
authors:
- Island of TeX
commands:
- name: The automation tool
command: >
@{
return getCommand('ltx2any', clean, engine, parameters,
tikzimages, jobname, logname, logformat,
loglevel, frequency, directory, synctex,
options, reference.fileName);
}
arguments:
- identifier: clean
flag: >
@{
return isTrue(parameters.clean, '-c');
}
- identifier: engine
flag: >
@{
return [ '-e', parameters.engine ];
}
- identifier: parameters
flag: >
@{
if (isList(parameters.parameters)) {
return [ '-ep', String.join(' ',
parameters.parameters) ];
}
else {
throwError('I was execting a list of parameters.');
}
}
- identifier: tikzimages
flag: >
@{
if (isList(parameters.tikzimages)) {
return [ '-ir', String.join(':',
parameters.tikzimages) ];
}
else {
throwError('I was expecting a list of images.');
}
}
- identifier: jobname
flag: >
@{
return [ '-j', parameters.jobname ];
}
- identifier: logname
flag: >
@{
return [ '-l', parameters.logname ];
}
- identifier: logformat
flag: >
@{
fts = [ 'raw' : 'raw', 'markdown' : 'md',
'pdf' : 'pdf' ];
if (fts.keySet().contains(parameters.logformat)) {
return [ '-lf', fts.get(parameters.logformat) ];
}
else {
throw('Invalid log format.');
}
}
- identifier: loglevel
flag: >
@{
ll = [ 'error', 'warning', 'info' ];
if (ll.contains(parameters.loglevel)) {
return [ '-ll', parameters.loglevel ];
}
else {
throwError('Invalid log level.');
}
}
- identifier: frequency
flag: >
@{
return [ '-n', parameters.frequency ];
}
- identifier: directory
flag: >
@{
return [ '-t', parameters.directory ];
}
- identifier: synctex
flag: >
@{
return isTrue(parameters.synctex, '-synctex');
}
- identifier: options
flag: >
@{
if (isList(parameters.options)) {
return parameters.options;
}
else {
throwError('I was expecting a list of options.');
}
}
|