After I read an article on latex-community.org I got intrigued: this sounded like a really comfortable way to automate my compiling process! So today I downloaded, installed and used Paolo Cereda‘s arara for the first time — and immediately fell in love with it. So now I’d like to tell you how I installed it on my linux machine, added an entry to my kile editor and how it works once you’ve set it up.

Installation

Since I am working with OpenSUSE as OS I tell you, what I did to get it working there. The first step is to download [cce inline=”true”]arara.jar[/cce]. Then I created the directory [cce inline=”true”]/opt/arara/[/cce] and placed the file in there. Now I created a bash script in the same directory named [cce inline=”true”]arara[/cce] containing the following two lines: [cce]#!/bin/bash java -jar “$(dirname “$0″)/arara.jar” $*[/cce] This file must be executable, so I run [cce inline=”true”]chmod 777 arara[/cce] on the command line. (I changed these rights to more restricted ones later. I was eager to start!) Next thing to do was making it accessable from everywhere. For this I added the following lines to the [cce inline=”true”].profile[/cce] file in my home directory: [cce]# arara PATH=/opt/arara:$PATH; export PATH[/cce] That’s it. Since I am a dedicated kile user I created a menu entry for [cce inline=”true”]arara[/cce] next. Simply go to [cce inline=”true”]Einstellungen > Kile einrichten > Werkzeuge > Erstellen[/cce] and add an entry [cce inline=”true”]arara[/cce] with options [cce inline=”true”]’–verbose %S'[/cce]. Now we’re good to go. Sorry for the menu entries being in German. The English ones must be something like [cce inline=”true”]Settings > Setup Kile > Tools > Built[/cce].

Setting it up

Next thing you need are rules for [cce inline=”true”]arara[/cce]. Otherwise it won’t do anything. But to get started you don’t need to dig too deep into it. I created the subdirectory [cce inline=”true”]/opt/arara/rules/plain/[/cce]. This directory now should contain the rules which are files with the extension [cce inline=”true”]yaml[/cce]. Paolo Cereda has a bunch of them ready to use. So for testing purposes I copied them into the directory and I was ready for testing. The names of the [cce inline=”true”]yaml[/cce] files now are the rules for [cce inline=”true”]arara[/cce]. Creating these rules on your own isn’t very difficult, though. The documentation explains several examples step by step. Actually I created own rules first before I realized there were ready ones.

Let the music begin: run arara

For testing purposes I created a file [cce inline=”true”]test.tex[/cce] containg these lines: [cce lang=”latex”]% arara: pdflatex % arara: makeindex: { style: test.ist } % arara: biber % arara: pdflatex % arara: pdflatex \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{filecontents} \usepackage{makeidx} \begin{filecontents}{\jobname.ist} heading_prefix “{\\bfseries ” heading_suffix “\\hfil}\\nopagebreak\n” headings_flag 1 delim_0 “\\dotfill ” delim_1 “\\dotfill ” delim_2 “\\dotfill ” delim_r “\\textendash” suffix_2p “\\nohyperpage{\\,f.}” suffix_3p “\\nohyperpage{\\,ff.}” \end{filecontents} \usepackage[backend=biber]{biblatex} \addbibresource{biblatex-examples.bib} \makeindex \begin{document} A citation\cite{companion} and an index entry\index{bla} and some arbitrary text. \printbibliography \printindex \end{document}[/cce] The first five lines [cce lang=”latex”]% arara: pdflatex % arara: makeindex: { style: test.ist } % arara: biber % arara: pdflatex % arara: pdflatex[/cce] tell [cce inline=”true”]arara[/cce] to run [cce inline=”true”]pdflatex[/cce], then [cce inline=”true”]makeindex[/cce] with a custom style file, then [cce inline=”true”]biber[/cce] for the bibliography and [cce inline=”true”]pdflatex[/cce] twice more. Hit the [cce inline=”true”]arara[/cce] button in kile and voila: everythings ready! With some effort that took less than an hour I made my life a lot easier! Thanks very much to Paolo for this awesome software!

2 thoughts on “arara – automate your LaTeX with birds music

  1. Wow, that’s a nice summary. Thank’s for the effort!

    1. cgnieder says:

      Thanks! You’re welcome 🙂

      I have posted this before arara v3.0 made it to CTAN. Now that it is part of TeX Live and has an installer installation is easier if even necessary, of course.

Leave a Reply

Your email address will not be published. Required fields are marked *