# Tag Info

23

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, ...

22

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 ...

15

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 ...

12

Apparently, peer pressure works. :) I'm looking at you, Tom. :P Plan B, let's see if I get 800 votes: I'm a security engineer at Facebook and this is my fault. :) I should probably focus on how to optmize the code, but since I'm a hurry, I can't think of a direct approach right now. :) The error raised is, under the sea the hood, one of the caveats of ...

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( ...

11

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 ...

10

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> ...

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 ...

10

Lasciate ogne speranza, voi ch'intrate. (La Divina Commedia, Dante Alighieri) Time for one the most insane answers I ever came up with. :) You are right that arara does not allow wildcards, and the reason for this is a restriction of the underlying execution library. Wildcard usage might be understood as some sort of subshell expansion and there is no ...

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 ...

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 ...

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. ...

8

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, ...

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 ...

7

With the current version of arara which is available via CTAN, it's quite difficult. However Paulo provides a new arara version at GitHub which won't be uploaded to CTAN in a short time. The new version has some nice gimmicks which are well explained in the Wiki. If you are using arara 4RC3 you can use the following header: % arara: pdflatex: { shell: ...

7

LaTeX compiation tools such arara, latexmk, rubber, etc are not needed for ConTeXt. In LaTeX, the basic commands such as latex, pdflatex, luatatex just run the underlying TeX engine with LaTeX format pre-loaded. Features such as bibliography, index, glossary, etc are handled by external tools, and it is the responsibility of the user to run these tools. ...

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: ...

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

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 ...

6

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 ...

6

Following Nicola Talbot's comment, and the output from arara, we know that the makeglossaries rule is really just a short cut for: makeindex -s myfile.ist -t myfile.glg -o myfile.gls myfile.glo As such, we can make an arara do this for us by using @{getBasename(file)}. makeglossariesNP.yaml !config # Make glossaries *without perl* rule for arara # ...

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

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

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 ...

5

cmhughes's answer is best for general purposes, but you can also just use the makeindex directive however you need to explicitly write the file names. If your LaTeX file is called myDoc.tex then the following will work: % arara: makeindex: {style: myDoc.ist, options: "-t myDoc.glg -o myDoc.gls myDoc.glo"} (Avoid spaces in the file names.) That will just ...

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