# Tag Info

21

shell escape will enable pdflatex to save, write, delete and call another program from the system. Some times this can be dangerous as malicious code may be called and executed, endangering the system. Arara, on the other hand, executes the directives, written by the user, inside the documents. Without a directive, nothing is executed. These directives, ...

21

I think my answer will be totally biased, but here it goes. :) It's quite subjective for me to afirm that arara is safe or secure. It's just a program with a specific purpose, just like most of the tools available out there. Maybe the best answer I can come up with is: it depends. arara per se simply expands directives into commands through rules that ...

14

Well, it depends on which distribution you use: 1) TeX Live 2012: Just update via Package Manager, arara is part of TeX Live 2012. 2) MikTeX: Under the assumption that MikTeX does not provide arara (I only use TeX Live) do a) Get the installer from https://github.com/cereda/arara (in the releases subdir) b) Run the installer. After the installation open ...

13

arara was recently included in TeX Live 2012, as seen in the output of \$ tlmgr info arara package: arara category: Package shortdesc: Automation of LaTeX compilation. ... installed: Yes revision: 29052 cat-version: 3.0 cat-date: 2013-02-06 08:25:13 +0100 cat-license: bsd collection: collection-binextra Did you update your TeX Live distro ...

11

With the new 3.x series, we can easily add a default value to the argument expansion. Here's the new echo rule: !config # test rule for arara # author: Andrew Stacey # requires arara 3.0+ identifier: echo name: Echo the value of the argument command: <arara> echo @{name} arguments: - identifier: name flag: <arara> @{ isTrue( isEmpty( ...

10

I want to provide a small solution. First I want to show your my yaml rule: !config # Mainfile rule for arara # author: Marco Daniel # requires arara 3.0+ identifier: mainfile name: Mainfile command: <arara> arara @{options} "@{rootfile}" arguments: - identifier: rootfile flag: <arara> @{parameters.rootfile} - identifier: options flag: ...

10

First of all, thank you very much for your kind words, Chris. :) I'm really impressed with Marco's answer suggesting an arara inception. :) Personally, I prefer a more spartan solution, presented as follows. As egreg suggested in the comments, if the editor provides % !TEX root = ..., arara will be executed with the file described in that directive. It's ...

10

I'll make a humble attempt. :) First, let's define which directive arguments we might use: silent: it holds a boolean value (in the arara context, it can be on/off, yes/no, true/false, and 0/1), which expands to -s if present and true. This is an independent argument. overwrite: it also holds a boolean value, which expands to -w if present and true. This ...

9

One has at least two options, defining a User command, or using Quick build. There is no difference between Windows and Linux (AFAIR, I'll check later), can't say about OS X. User command Go to User --> User commands --> Edit User commands. Edit one of the free commands, give it a reasonable name, and use arara %.tex as the command. % is a ...

9

Update below: The error occurs of two reasons The argument of latexmk doesn't like spaces. (This can be solved) You can't pass options to latexmk. I guess the perl interpreter can handle this. The author of arara mentioned that expansion is being done correctly by arara, the tricky part relies on the replacement code that is submitted to the Perl ...

9

Yes, this can certainly be done. Thanks to Paulo (arara creator) for his help on this one :) Let's say that your .bashrc contains the following function hello() { echo "Hello, \$0!" } export -f hello Note the use of export to make the hello function available from the command line. We can then make our arara rule to contain the line - <arara> ...

9

To allow convenient use of latexmk for making/building the project, put a file latexmkrc in the same directory is its primary source file main.tex. For the project described in the question, appropriate contents of latexmkrc are \$pdf_mode = 1; \$dvi_mode = \$postscript_mode = 0; \$pdflatex = 'lualatex %O %S'; @default_files = ( 'main.tex' ); The first two ...

8

The answer to your question also explain why I had to introduce <arara> in the first place. :) Let's see a quote from the manual itself (I'm quite shocked that I added this remark!): Sadly, we can't start values with @ because this symbol is reserved for future use in the YAML format. For example, foo: @bar is an invalid YAML format, so the correct ...

8

First of all, thanks for giving arara a try. :) We are working on the new 3.x series, which will hopefully be the best version ever. :) When you mark the View PDF after running option when configuring the tool, TeXworks will monitor the current file expecting for changes. If you run arara on foo.tex, TeXworks will wait for changes in that specific file. ...

7

The simple answer is "no". arara's core element are the rules and the specification of the rules inside your main document. If you want to compile your friend's file with arara you can provide your main testing file like: % arara: pdflatex \input{file-of-friend} However I think most editors allow the switching between different compilation steps very ...

7

As always, egreg has a great alternative solution for my crazy idea (kept at the bottom of this update, for historical reasons). :) There's a tool named texloganalyser (gotta love the spelling!) which might help us. It's shipped in TeX Live, so a quick texdoc texloganalyser (which redirects us to a perldoc texloganalyser) gives us all the flags we need: ...

6

First of all, thanks very much for trying latexindent :) Your question is pretty much exactly the same idea as arara: making a rule to compile the main file from a chapter file and the trick is to tell arara which files you want to operate on. As such, the following works as you want. % arara: indent: { overwrite : yes, trace: yes, files: [ ...

6

About TEXINPUTS and arara, I recommend Setting environment variable with arara as starting point. As pointed out, arara runs commands on subshells, in a self-contained environment, so it might be tricky to keep persistence between executions. As Marco said in the comments, you can exploit the operating system's file operation commands in order to move, ...

6

The practical answer is given by Marco, I'll just complement with some excuse explanation. :) First of all, thank you very much for this case study. :) I'll surely take a deep look into this curious behaviour and try to get some answers. For now, I'll simply complement Marco's answer, which gives you a practical solution and it's indeed the right way to ...

5

Actually, arara can be called from TeXworks as well as from TeXnicCenter. To get a XeTeX + Biber workflow, you should have the following setup: Your mwe.tex, save as UTF-8: % arara: xelatex % arara: biber % arara: xelatex \documentclass[a4paper]{scrreprt} \usepackage[backend=biber,style=authoryear,isbn=false,dashed=true]{biblatex} \bibliography{mwe.bib} ...

5

Sadly, it's not possible to have a switch in the rule context. When using iterators like items/@{item} or files/@{file}, the rule is replicated to every item; the context is stateless, it has no previous memory of past expansions. One possible dirty hack is to compare the current @{item} to a variable supplied by the directive and execute one of the ...

5

There is no need to pass complicated options to MakeIndex in order to prepare glossaries defined through the glossaries package (including list of acronyms or symbols). The script makeglossaries automagically does all the work; if your main file is main.tex, running makeglossaries main will do. For arara, the directive % arara: makeglossaries is the ...

5

I learned a lot in chat. Even if texinputs.yaml could be made to set the TEXINPUTS environment variable, this will have no affect on subsequent calls to the pdflatex directive since each directive runs in a self contained environment. The problem with texinputs.yaml as constructed is that in Linux export is a special commands built into the Bash shell and ...

5

Now you make me feel really bad and regret my decision of not making the name field in the arara rule specification expandable. :) I'm deeply sorry, but this is not possible. When I defined the rule spec, back in version 1.0, I could not find out any real world example for providing variable expansion in the name field. As usual, time proved me wrong, and ...

4

gVim does use the console output to get warnings according to petobens' comment. Then the console output can then be suppressed using action: batchmode for the first runs. Also option draft: true would be useful, because it suppresses the not yet needed PDF output file (but the auxiliary files are written). And indeed option --halt-on-error stops at the ...

4

Here are a couple of options to get you started- of course, Paulo might provide better alternatives :) makepowerdot.yaml !config # Make chapter files rule for arara # author: Chris Hughes # last edited by: cmh, Dec 2nd 2013 # http://tex.stackexchange.com/questions/148095/using-arara-to-compile-powerdot-twice # requires arara 3.0+ identifier: makepowerdot ...

4

The answer is: it is not possible... but it is not arara's fault. Infact, the command line --aux-directory is implemented ONLY for a few tools in MiKTeX distribution (it doesn't even exists in TeX Live). If, from the command line, you run lualatex --help you will get The following regular options are understood: --8bit ...

4

In general, I think of pdflatex as being pretty safe since it can really only read and write files. I understand TeX is Turing complete and you can make it make toast, but I think it would take a lot of work to do something malicious. On the other hand, arara has full access to the command line and I think with relatively little work can be made to do bad ...

3

I apologize for not making my rule robust enough :) As noted in the comments, the problem with my original answer is that Windows might not get the path correct. You can fix it by using - <arara> @{ isWindows( "cmd /c convert", "convert" ) } -delay @{delay} -loop @{loop} -density @{density} "@{ getBasename(file) }.pdf" "@{ getBasename(file) }.gif" ...

3

In the next version of TeXlive there will be TrY, that is something similar to arara, but simpler. It uses simple bash commands into the TeX comments. The main use of TrY is to make explicit in the document the list of commands needed to compile it, something like this: % %\$ xetex -shell-escape filename.tex %\$ bibtex -min-crossref=3 filename.aux %\$ xetex ...

Only top voted, non community-wiki answers of a minimum length are eligible