| 1 |
!config |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
identifier: context |
| 8 |
name: ConTeXt |
| 9 |
authors: |
| 10 |
- Island of TeX |
| 11 |
commands: |
| 12 |
- name: ConTeXt engine |
| 13 |
command: > |
| 14 |
@{ |
| 15 |
return getCommand('context', make, ctx, interface, autopdf, purge, |
| 16 |
modules, environments, mode, path, arguments, |
| 17 |
trackers, directives, silent, errors, interaction, |
| 18 |
synctex, options, reference.fileName); |
| 19 |
} |
| 20 |
arguments: |
| 21 |
- identifier: make |
| 22 |
flag: > |
| 23 |
@{ |
| 24 |
return isTrue(parameters.make, '--make'); |
| 25 |
} |
| 26 |
- identifier: ctx |
| 27 |
flag: > |
| 28 |
@{ |
| 29 |
return '--ctx='.concat(parameters.ctx); |
| 30 |
} |
| 31 |
- identifier: interface |
| 32 |
flag: > |
| 33 |
@{ |
| 34 |
return [ '--interface', parameters.interface ]; |
| 35 |
} |
| 36 |
- identifier: autopdf |
| 37 |
flag: > |
| 38 |
@{ |
| 39 |
return isTrue(parameters.autopdf, '--autopdf'); |
| 40 |
} |
| 41 |
- identifier: purge |
| 42 |
flag: > |
| 43 |
@{ |
| 44 |
p = [ 'partial' : '--purge', 'all' : '--purgeall', |
| 45 |
'result' : '--purgeresult' ]; |
| 46 |
if (p.keySet().contains(parameters.purge)) { |
| 47 |
return p.get(parameters.purge); |
| 48 |
} |
| 49 |
else { |
| 50 |
throwError('Invalid value, expected partial, result or all.'); |
| 51 |
} |
| 52 |
} |
| 53 |
- identifier: modules |
| 54 |
flag: > |
| 55 |
@{ |
| 56 |
if (isList(parameters.modules)) { |
| 57 |
return '--usemodule='.concat(String.join(',', parameters.modules)); |
| 58 |
} |
| 59 |
else { |
| 60 |
throwError('I was expecting a list.'); |
| 61 |
} |
| 62 |
} |
| 63 |
- identifier: environments |
| 64 |
flag: > |
| 65 |
@{ |
| 66 |
if (isList(parameters.environments)) { |
| 67 |
return '--environment='.concat(String.join(',', |
| 68 |
parameters.environments)); |
| 69 |
} |
| 70 |
else { |
| 71 |
throwError('I was expecting a list.'); |
| 72 |
} |
| 73 |
} |
| 74 |
- identifier: mode |
| 75 |
flag: > |
| 76 |
@{ |
| 77 |
if (isList(parameters.mode)) { |
| 78 |
return '--mode='.concat(String.join(',', parameters.mode)); |
| 79 |
} |
| 80 |
else { |
| 81 |
throwError('I was expecting a list.'); |
| 82 |
} |
| 83 |
} |
| 84 |
- identifier: path |
| 85 |
flag: > |
| 86 |
@{ |
| 87 |
if (isList(parameters.path)) { |
| 88 |
return '--path='.concat(String.join(',', parameters.path)); |
| 89 |
} |
| 90 |
else { |
| 91 |
throwError('I was expecting a list.'); |
| 92 |
} |
| 93 |
} |
| 94 |
- identifier: arguments |
| 95 |
flag: > |
| 96 |
@{ |
| 97 |
if (isList(parameters.arguments)) { |
| 98 |
return '--arguments='.concat(String.join(',', |
| 99 |
parameters.arguments)); |
| 100 |
} |
| 101 |
else { |
| 102 |
throwError('I was expecting a list.'); |
| 103 |
} |
| 104 |
} |
| 105 |
- identifier: trackers |
| 106 |
flag: > |
| 107 |
@{ |
| 108 |
if (isList(parameters.trackers)) { |
| 109 |
return '--trackers='.concat(String.join(',', parameters.trackers)); |
| 110 |
} |
| 111 |
else { |
| 112 |
throwError('I was expecting a list.'); |
| 113 |
} |
| 114 |
} |
| 115 |
- identifier: directives |
| 116 |
flag: > |
| 117 |
@{ |
| 118 |
if (isList(parameters.directives)) { |
| 119 |
return '--directives='.concat(String.join(',', |
| 120 |
parameters.directives)); |
| 121 |
} |
| 122 |
else { |
| 123 |
throwError('I was expecting a list.'); |
| 124 |
} |
| 125 |
} |
| 126 |
- identifier: silent |
| 127 |
flag: > |
| 128 |
@{ |
| 129 |
if (isList(parameters.modules)) { |
| 130 |
return '--silent='.concat(String.join(',', parameters.silent)); |
| 131 |
} |
| 132 |
else { |
| 133 |
throwError('I was expecting a list.'); |
| 134 |
} |
| 135 |
} |
| 136 |
- identifier: errors |
| 137 |
flag: > |
| 138 |
@{ |
| 139 |
if (isList(parameters.errors)) { |
| 140 |
return '--errors='.concat(String.join(',', parameters.errors)); |
| 141 |
} |
| 142 |
else { |
| 143 |
throwError('I was expecting a list.'); |
| 144 |
} |
| 145 |
} |
| 146 |
- identifier: interaction |
| 147 |
flag: > |
| 148 |
@{ |
| 149 |
if ([ 'batchmode', 'nonstopmode' ].contains(parameters.interaction)) { |
| 150 |
return '--'.concat(parameters.interaction); |
| 151 |
} |
| 152 |
else { |
| 153 |
throwError('The provided interaction value is not valid.'); |
| 154 |
} |
| 155 |
} |
| 156 |
- identifier: synctex |
| 157 |
flag: > |
| 158 |
@{ |
| 159 |
return isTrue(parameters.synctex, '--synctex', '--nosynctex'); |
| 160 |
} |
| 161 |
- identifier: options |
| 162 |
flag: > |
| 163 |
@{ |
| 164 |
if (isList(parameters.options)) { |
| 165 |
return parameters.options; |
| 166 |
} |
| 167 |
else { |
| 168 |
throwError('I was expecting a list of options.'); |
| 169 |
} |
| 170 |
} |