4

Does anyone have a rule which allows to call Pythontex from Arara? I'd like to run the following set of commands for example:

%!TEX TS-program = Arara
% arara: pdflatex
% arara: pythontex
% arara: pdflatex
  • 3
    It's not that hard to create new arara rules modeled after the existing ones (which can be found in /usr/local/texlive/2016/texmf-dist/scripts/arara/rules in TeXLive). – Alan Munn Mar 10 '17 at 20:45
3

Based on an example from http://texwelt.de/wissen/fragen/4944/wie-kann-ich-arara-auf-das-nomentbl-paket-anwenden-um-ein-formelzeichenverzeichnis-zu-erstellen I managed to create a working version:

!config
# pythontex rule for arara
# author: Uwe Ziegenhagen
# requires arara 3.0+
identifier: pythontex
name: pythontex
command: <arara> pythontex @{options} "@{getBasename(file)}.pytxcode"
arguments: 
- identifier: style
  flag: <arara> @{parameters.style}
  default: pythontex
- identifier: options
  flag: <arara> @{parameters.options}

I have saved it under the name pythontex.yaml under <Drive>:\texlive\2016\texmf-dist\scripts\arara\rules, it seems to work as desired.

0

For Arara 4.x the following rule should work like the one given for Arara 3.x

!config
# pythontex rule for arara
# author: Uwe Ziegenhagen
# requires arara 4.0+
identifier: pythontex
name: pythontex
commands:
- command: <arara> pythontex @{options} "@{getBasename(file)}.pytxcode"
arguments: 
- identifier: style
  flag: <arara> @{parameters.style}
  default: pythontex
- identifier: options
  flag: <arara> @{parameters.options}

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.