# Using Arara with a folder structure

To keep things short here is my folder structure of my project:

Main.tex
-> Subfolder1 %(images)
-> Subfolder 1.1 %(pgfplots)
pgfplot_standalone.tex %(Standalone_class)
->Subfolder(purecode)
pgfplot_code.tex %(just \begin tikz ... \end tikz for using with external software)
-> Subfolder2(text mainmatter)


When I finished editing/changing the code in pgfplot_code.tex I have to go upwards and compile the standalone to receive the .pdf.

I am using the automation tool Arara (CTAN and GitHub) and looking for a way to just hit compile when I am in 'pgfplot_code.tex' without switching to the standalone class and run PDFlatex there (I have to use these outsode calls mor often this one is only an example.)

I found this which describes a way of do what I meant to do using

% arara: pdflatex: { files: [ pgfplot_standalone.tex ] }


However, the files must be inside the same directory. Using something like

 % arara: pdflatex: { files: [ ../pgfplot_standalone.tex ] }


or using an abosulte path don't work as he just looking for the .tex inside the same directory.

I was maybe thinking of a command like

 % arara: arara: {  ../pgfplot_standalone.tex }


So when hitting the 'do-arara'-button in the current file he just should call arara on a specific file and runs the commands I defined there. Hopefully you understand what I am looking for :)

EDIT:

I found out using this rule and calling then

% arara: console: { command: arara -verbose /pathtofile/file.tex }


Did call the arara command of the target, however as there are multiple arara calls this approach takes double the time as before... So if anyone has an helpul idea this would be great

EDIT2:

Okay unfortunately it did not works as I expected. Using this command:

% arara: console: { command: cd../ && arara -verbose gm_statistik.tex }


Did not work and I receive the error:

DETAILS ---------------------------------------------------------
Could not execute [cd, ../&&, arara, -verbose, gm_statistik.tex].


So it seems he is putting a comma after each blank space? The pure code is working inside a normal command prompt. Maybe the arara rule has to be modified?

The rule look like this but i am not able to read it:

!config
# Console rule for arara
# author: Clemens Niederberger
# requires arara 3.0+
identifier: console
name: Console
commands:
- command: <arara> @{command}
arguments:
- identifier: command
flag: <arara> @{parameters.command}


EDIT 3:

Another rule also declares a root-file for using, however it also does not except a path but stillt the pure filename. For me it would be just enough to add there some kind of complete filepath and not just the filename:

!config
# Mainfile rule for arara
# author: Marco Daniel
# requires arara 3.0+
identifier: mainfilebigger
name: Mainfilebigger
commands:
- command: <arara> arara @{options} "@{rootfile}"
arguments:
- identifier: rootfile
flag: <arara> @{parameters.rootfile}
- identifier: options
flag: <arara> @{parameters.options}