1

I changed file to reference in my xelatx.yaml:

!config
identifier: xelatex
name: XeLaTeX
authors:
- Paulo
commands:
- name: XeLaTeX engine
  command: >
    @{
        if (isEmpty(directory)) {
            return getCommand('xelatex', interaction, shell,
                   synctex, options, reference);
        }
        else {
            return getCommandWithWorkingDirectory(directory, 'xelatex',
                   interaction, shell, synctex, options, reference);
        }
    }
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.');
        }
    }
- identifier: directory
  flag: >
    @{
        return parameters.directory;
    }

Header in my TeX file:

% arara: xelatex: { 
% arara: --> shell: yes, 
% arara: --> synctex: yes, 
% arara: --> directory: subdir, 
% arara: --> files: [ dok-ext-01.tex,dok-ext-01.tex,dok-ext-01.tex, 
% arara: --> dok-ext-02.tex, dok-ext-02.tex,dok-ext-02.tex, 
% arara: --> dok-ext-03.tex, dok-ext-03.tex, dok-ext-03.tex 
% arara: --> ] 
% arara: --> } 
% arara: xelatex: { 
% arara: --> shell: yes, 
% arara: --> synctex: yes, 
% arara: --> files: [maintex, main.tex, main.tex] } 

I got

XeLaTeX engine FAILURE

I can't resolve this problem.

0
3

Ah, path woes. :)

You were very close to a solution! Replace reference by reference.getName() and it should work again:

!config
identifier: xelatex
name: XeLaTeX
authors:
- Paulo
commands:
- name: XeLaTeX engine
  command: >
    @{
        if (isEmpty(directory)) {
            return getCommand('xelatex', interaction, shell,
                   synctex, options, reference.getName());
        }
        else {
            return getCommandWithWorkingDirectory(directory, 'xelatex',
                   interaction, shell, synctex, options, reference.getName());
        }
    }
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.');
        }
    }
- identifier: directory
  flag: >
    @{
        return parameters.directory;
    }

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.