summaryrefslogtreecommitdiff
path: root/support/arara/doc/chapters
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-05 03:00:59 +0000
committerNorbert Preining <norbert@preining.info>2020-03-05 03:00:59 +0000
commit898048513951b471a492afa23e46112d14bcb236 (patch)
tree8596afc705f55d2d07b324a756f7283ac0e2d21b /support/arara/doc/chapters
parent19d25b8009801aa98ea2f46b45c37c257f990491 (diff)
CTAN sync 202003050300
Diffstat (limited to 'support/arara/doc/chapters')
-rw-r--r--support/arara/doc/chapters/building.tex117
-rw-r--r--support/arara/doc/chapters/cli.tex154
-rw-r--r--support/arara/doc/chapters/concepts.tex305
-rw-r--r--support/arara/doc/chapters/configuration.tex28
-rw-r--r--support/arara/doc/chapters/deploying.tex96
-rw-r--r--support/arara/doc/chapters/foreword.tex22
-rw-r--r--support/arara/doc/chapters/introduction.tex25
-rw-r--r--support/arara/doc/chapters/license.tex2
-rw-r--r--support/arara/doc/chapters/logging.tex13
-rw-r--r--support/arara/doc/chapters/methods.tex171
-rw-r--r--support/arara/doc/chapters/mvel.tex36
-rw-r--r--support/arara/doc/chapters/prologue.tex27
-rw-r--r--support/arara/doc/chapters/rules.tex434
-rw-r--r--support/arara/doc/chapters/yaml.tex25
14 files changed, 767 insertions, 688 deletions
diff --git a/support/arara/doc/chapters/building.tex b/support/arara/doc/chapters/building.tex
index 8400a433dc..9c9b27c124 100644
--- a/support/arara/doc/chapters/building.tex
+++ b/support/arara/doc/chapters/building.tex
@@ -2,7 +2,7 @@
\chapter{Building from source}
\label{chap:buildingfromsource}
-\arara\ is a Java application licensed under the \href{http://www.opensource.org/licenses/bsd-license.php}{New BSD License}, a verified GPL-compatible free software license, and the source code is available in the project repository at \href{https://github.com/cereda/arara}{GitHub}. This chapter provides detailed instructions on how to build our tool from source.
+\arara\ is a Kotlin and Java application licensed under the \href{http://www.opensource.org/licenses/bsd-license.php}{New BSD License}, a verified GPL-compatible free software license, and the source code is available in the project repository at \href{https://gitlab.com/islandoftex/arara}{GitLab}. This chapter provides detailed instructions on how to build our tool from source.
\section{Requirements}
\label{sec:requirements}
@@ -10,7 +10,7 @@
In order to build our tool from source, we need to ensure that our development environment has the minimum requirements for a proper compilation. Make sure the following items are available:
\begin{itemize}[label={\cbyes{-2}}]
-\item On account of our project being hosted at \href{https://github.com}{GitHub}, an online source code repository, we highly recommend the installation of \rbox{git}, a version control system for tracking changes in computer files and coordinating work on those files among multiple people. Alternatively, you can directly obtain the source code by requesting a \href{https://github.com/cereda/arara/archive/master.zip}{source code download} in the repository. In order to check if \rbox{git} is available in your operating system, run the following command in the terminal (version numbers might vary):
+\item On account of our project being hosted at \href{https://gitlab.com/}{GitLab}, an online source code repository, we highly recommend the installation of \rbox{git}, a version control system for tracking changes in computer files and coordinating work on those files among multiple people. Alternatively, you can directly obtain the source code by requesting a \href{https://gitlab.com/islandoftex/arara/-/archive/master/arara-master.zip}{source code download} in the repository. In order to check if \rbox{git} is available in your operating system, run the following command in the terminal (version numbers might vary):
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ git --version
@@ -19,7 +19,7 @@ git version 2.17.1
Please refer to the \rbox{git} \href{https://git-scm.com/}{project website} in order to obtain specific installation instructions for your operating system. In general, most recent Unix systems have \rbox{git} installed out of the shelf.
-\item Our tool is written in the Java programming language, so we need a proper Java Development Kit, a collection of programming tools for the Java platform. Our source code is known to be compliant with several vendors, including Oracle, OpenJDK, and Azul Systems. In order to check if your operating system has the proper tools, run the following command in the terminal (version numbers might vary):
+\item Our tool is written in the Java programming language, so we need a proper Java Development Kit, a collection of programming tools for the Java platform. Our source code is known to be compliant with several vendors, including Oracle, OpenJDK, and Azul Systems. In order to check if your operating system has the proper tools, run the following command in the terminal (version numbers might vary):
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ javac -version
@@ -28,30 +28,34 @@ javac 1.8.0_171
The previous command, as the name suggests, refers to the \rbox{javac} tool, which is the Java compiler itself. The most common Java Development Kit out there is from \href{http://www.oracle.com/technetwork/java/javase/downloads/index.html}{Oracle}. However, several Linux distributions (as well as some developers, yours truly included) favour the OpenJDK vendor, so your mileage may vary. Please refer to the corresponding website of the vendor of your choice in order to obtain specific installation instructions for your operating system.
-\item As a means to provide a straightforward and simplified compilation workflow, \arara\ relies on Apache Maven, a software project management and comprehension tool. Based on the concept of a project object model, Maven can manage builds, reporting and documentation from a central piece of information. In order to check if \rbox{mvn}, the Maven binary, is available in your operating system, run the following command in the terminal (version numbers might vary):
+\item As a means to provide a straightforward and simplified compilation workflow, \arara\ relies on Gradle, a software project management and comprehension tool. Gradle is a build tool just like arara with a much more comprehensive build framework to provide support for the JVM ecosystem. In order to check if \rbox{gradle}, the Gradle binary, is available in your operating system, run the following command in the terminal (version numbers might vary):
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ mvn --version
-Apache Maven 3.5.2 (Red Hat 3.5.2-5)
-Maven home: /usr/share/maven
-Java version: 1.8.0_171, vendor: Oracle Corporation
-Java home: /usr/lib/jvm/java-1.8.0-openjdk-
- 1.8.0.171-4.b10.fc28.x86_64/jre
-Default locale: pt_BR, platform encoding: UTF-8
-OS name: "linux", version: "4.16.16-300.fc28.x86_64",
- arch: "amd64", family: "unix"
+$ gradle --version
+------------------------------------------------------------
+Gradle 6.0.1
+------------------------------------------------------------
+
+Build time: 2019-11-21 11:47:01 UTC
+Revision: <unknown>
+
+Kotlin: 1.3.50
+Groovy: 2.5.8
+Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
+JVM: 1.8.0_232 (Oracle Corporation 25.232-b09)
+OS: Linux 5.5.0-1-MANJARO amd64
\end{codebox}
-Please refer to the Maven \href{https://maven.apache.org/}{project website} in order to obtain specific installation instructions for your operating system. In general, most recent Linux distributions have the Maven binary, as well the proper associated dependencies, available in their corresponding repositories.
+Please refer to the Gradle \href{https://gradle.org}{project website} in order to obtain specific installation instructions for your operating system. In general, most recent Linux distributions have the Gradle binary, as well the proper associated dependencies, available in their corresponding repositories.
-\item For a proper repository cloning, as well as the first Maven build, an active Internet connection is required. In particular, Maven dynamically downloads Java libraries and plug-ins from one or more online repositories and stores them in a local cache. Be mindful that subsequent builds can occur offline, provided that the local Maven cache exists.
+\item For a proper repository cloning, as well as the first Gradle build, an active Internet connection is required. In particular, Gradle dynamically downloads Java libraries and plug-ins from one or more online repositories and stores them in a local cache. Be mindful that subsequent builds can occur offline, provided that the local Gradle cache exists.
\end{itemize}
\arara\ can be easily built from source, provided that the aforementioned requirements are available. The next section presents the compilation details, from repository cloning to a proper Java archive generation.
\begin{messagebox}{One tool to rule them all}{araracolour}{\icok}{white}
\setlength{\parskip}{1em}
-For the brave, there is the \href{https://sdkman.io/}{Software Development Kit Manager}, an interesting tool for managing parallel versions of multiple software development kits on most Unix based systems. In particular, this tool provides off the shelf support for several Java Development Kit vendors and versions, as well as most recent versions Apache Maven.
+For the brave, there is the \href{https://sdkman.io/}{Software Development Kit Manager}, an interesting tool for managing parallel versions of multiple software development kits on most Unix based systems. In particular, this tool provides off the shelf support for several Java Development Kit vendors and versions, as well as most recent versions of Gradle.
Personally, I prefer the packaged versions provided by my favourite Linux distribution (Fedora), but this tool is a very interesting alternative to set up a development environment with little to no effort.
\end{messagebox}
@@ -69,87 +73,82 @@ $ cd git-projects
Run the following command in the terminal to clone the \arara\ project:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ git clone https://github.com/cereda/arara
+$ git clone https://gitlab.com/islandoftex/arara.git
\end{codebox}
-Wait a couple of seconds (or minutes, depending on your Internet connection) while the previous command clones the project repository hosted at GitHub. Be mindful that this operation pulls down every version of every file for the history of the project. Fortunately, the version control system has the notion of a \emph{shallow clone}, which is a more succinctly meaningful way of describing a local repository with history truncated to a particular depth during the clone operation. If you want to get only the latest revision of everything in our repository, run the following command in the terminal:
+Wait a couple of seconds (or minutes, depending on your Internet connection) while the previous command clones the project repository hosted at GitLab. Be mindful that this operation pulls down every version of every file for the history of the project. Fortunately, the version control system has the notion of a \emph{shallow clone}, which is a more succinctly meaningful way of describing a local repository with history truncated to a particular depth during the clone operation. If you want to get only the latest revision of everything in our repository, run the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ git clone https://github.com/cereda/arara --depth 1
+$ git clone https://gitlab.com/islandoftex/arara.git --depth 1
\end{codebox}
-This operation is way faster than the previous one, for obvious reasons. Unix terminals typically start at \abox[araracolour]{USER\_HOME} as working directory, so, if you did not \rbox{cd} to another directory (as in the earlier example), the newly cloned \abox[araracolour]{arara/} directory is almost certain to be accessible from that level. Now, we need to navigate to a directory named \abox[araracolour]{application/} inside our project structure, where the source code and the corresponding build file are located. Run the following command in the terminal:
+This operation is way faster than the previous one, for obvious reasons. Unix terminals typically start at \abox[araracolour]{USER\_HOME} as working directory, so, if you did not \rbox{cd} to another directory (as in the earlier example), the newly cloned \abox[araracolour]{arara/} directory is almost certain to be accessible from that level. Now, we need to navigate to the directory named \abox[araracolour]{arara/}. Run the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ cd arara/application
+$ cd arara
\end{codebox}
-The previous command should take us inside the \abox[araracolour]{application/} directory of our project, where the source code and the corresponding build file are located. Let us make sure we are in the correct location by running the following command in the terminal:
+The previous command should take us inside the \abox[araracolour]{arara/} directory of our project, where the source code and the corresponding build file are located. Let us make sure we are in the correct location by running the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ ls
-pom.xml src
+$ ls build.gradle.kts
+build.gradle.kts
\end{codebox}
-Great, we are in the correct location! From the previous output, let us inspect the directory contents. The \abox[araracolour]{src/} directory, as the name suggests, contains the source code organized in an established package structure, whereas \rbox{pom.xml} is the corresponding build file written in the Project Object Model format, a special XML file that contains information about the project and configuration details used by Apache Maven to build the project. In order to build our tool, run the following command in the terminal:
+Great, we are in the correct location! From the previous output, let us inspect the directory contents. The \abox[araracolour]{application/} directory, as the name suggests, contains the source code of the main application organized in an established package structure, whereas \rbox{build.gradle.kts} is the corresponding Gradle build file written to efficiently compile the project. In order to build our tool, run the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ mvn compile assembly:single
+$ gradle build
\end{codebox}
-Apache Maven is based around the central concept of a build life cycle. The \rbox{compile} phase, as the name suggests, compiles the source code of the project using the underlying Java compiler. From the previous command, bound to this particular build phase, note that there is an \rbox{assembly:single} plug-in goal which aggregates the project output along with its dependencies and other files into a single distributable archive. An \emph{assembly} is a group of files, directories and dependencies that are assembled into an archive format and distributed. In our case, the resulting file will be a typical Java archive file, with the \rbox{jar} extension. The first Maven build will take a couple of seconds (or minutes, depending on your Internet connection), as the tool will download all dependencies and required plug-ins for proper compilation and packaging. Subsequent builds will be significantly faster. Finally, after some time, Maven will output the following message as result (please note that the entire compilation and packaging only took 10 seconds on my development machine due to an existing local cache):
+Gradle is based around the central concept of a build life cycle. The \rbox{compile} phase, as the name suggests, compiles the source code of the project using the underlying Java compiler. After compiling, the code can be packaged, tested and run. The \rbox{build} target actually compiles, tests and packages our tool. Afterwards, you will have a \abox[araracolour]{application/build/libs/} directory with multiple JAR files, one containing \rbox{with-deps}. That file is ready to run as it bundles all dependencies. Subsequent builds will be significantly faster than the first build because they do not fetch dependencies and rely on a build cache. Finally, after some time, Gradle will output the following message as result (please note that the entire compilation and packaging only took 4 seconds on my development machine due to an existing local cache):
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-[INFO] ---------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ---------------------------------------------------------
-[INFO] Total time: 10.371 s
-[INFO] Finished at: 2018-06-22T18:38:02-03:00
-[INFO] Final Memory: 39M/184M
-[INFO] ---------------------------------------------------------
+BUILD SUCCESSFUL in 4s
+15 actionable tasks: 15 up-to-date
\end{codebox}
-On account of a successful build in our previous interaction, there is now a newly created \abox[araracolour]{target/} directory containing compiled classes, a established package structure and, at last but not least, our assembly. Now, let us move the resulting Java archive file from that particular directory to \abox[araracolour]{application/} which is our current directory. It is important to note that the aforementioned assembly plug-in adds the \rbox{jar-with-dependencies} reference to the file name in order to differentiate a proper assembly from a typical Java archive file. Run the following command in the terminal (please note that the Java archive file was also renamed during the move operation):
+Now, let us move the resulting Java archive file from that particular directory to our current directory. Run the following command in the terminal (please note that the Java archive file was also renamed during the move operation):
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ mv target/arara-4.0-jar-with-dependencies.jar arara.jar
+$ mv application/build/libs/arara-with-deps-*.jar arara.jar
\end{codebox}
Now, our current directory contains the final \rbox{arara.jar} Java archive file properly built from source. This file can be safely distributed and deployed, as seen later on, in Chapter~\ref{chap:deployingthetool}, on page~\pageref{chap:deployingthetool}. You can also test the resulting file by running the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ java -jar arara.jar
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-arara 4.0 (revision 1)
-Copyright (c) 2012-2018, Paulo Roberto Massa Cereda
-All rights reserved
-
-usage: arara [file [--dry-run] [--log] [--verbose | --silent]
- [--timeout N] [--max-loops N] [--language L]
- [ --preamble P ] [--header] | --help | --version]
- -h,--help print the help message
- -H,--header extract directives only in the file header
- -l,--log generate a log output
- -L,--language <code> set the application language
- -m,--max-loops <number> set the maximum number of loops
- -n,--dry-run go through all the motions of running a
- command, but with no actual calls
- -p,--preamble <name> set the file preamble based on the
- configuration file
- -s,--silent hide the command output
- -t,--timeout <number> set the execution timeout (in milliseconds)
- -V,--version print the application version
- -v,--verbose print the command output
+Usage: arara [OPTIONS] [file]...
+
+Options:
+ -l, --log Generate a log output
+ -v, --verbose / -s, --silent Print the command output
+ -n, --dry-run Go through all the motions of running a
+ command, but with no actual calls
+ -H, --header Extract directives only in the file header
+ -t, --timeout INT Set the execution timeout (in milliseconds)
+ -L, --language TEXT Set the application language
+ -m, --max-loops INT Set the maximum number of loops (> 0)
+ -p, --preamble TEXT Set the file preamble based on the
+ configuration file
+ -d, --working-directory DIRECTORY
+ Set the working directory for all tools
+ -V, --version Show the version and exit
+ -h, --help Show this message and exit
+
+Arguments:
+ file The file(s) to evaluate and process
\end{codebox}
-The following optional Maven phase is used to handle the project cleaning, including the complete removal of the \abox[araracolour]{target/} directory. As a result, the project is then restored to the initial state without any generated Java bytecode. Run the following command in the terminal:
+The following optional Gradle phase is used to handle the project cleaning, including the complete removal of the \abox[araracolour]{build/} directory. As a result, the project is then restored to the initial state without any generated Java bytecode. Run the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ mvn clean
+$ gradle clean
\end{codebox}
This section covered the compilation details for building \arara\ from source. The aforementioned steps are straightforward and can be automated in order to generate snapshots and daily builds. If you run into any issue, please let us know. Happy compilation!
diff --git a/support/arara/doc/chapters/cli.tex b/support/arara/doc/chapters/cli.tex
index ddf318bc67..60678e88d5 100644
--- a/support/arara/doc/chapters/cli.tex
+++ b/support/arara/doc/chapters/cli.tex
@@ -7,30 +7,30 @@
\section{User interface design}
\label{sec:userinterfacedesign}
-The goal of a user interface design is to make the interaction as simple and efficient as possible. Good user interface design facilitates finishing the task at hand without drawing unnecessary attention to itself. For \arara\ 4.0, we redesigned the interface in order to look more pleasant to the eye, after all, we work with \TeX\ and friends:
+The goal of a user interface design is to make the interaction as simple and efficient as possible. Good user interface design facilitates finishing the task at hand without drawing unnecessary attention to itself. We redesigned the interface in order to look more pleasant to the eye, after all, we work with \TeX\ and friends:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc5.tex' (size: 307 bytes, last modified: 05/29/2018
-08:57:30), please wait.
+Processing 'doc5.tex' (size: 285 B, last modified: 03/01/2020
+19:25:40), please wait.
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(BibTeX) The BibTeX reference management software ....... SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
-Total: 1.45 seconds
+Total: 1.14 seconds
\end{codebox}
First of all, we have the nice application logo, displayed using ASCII art. The entire layout is based on monospaced font spacing, usually used in terminal prompts. Hopefully you follow the conventional use of a monospaced font in your terminal, otherwise the visual effect will not be so pleasant. First and foremost, \arara\ displays details about the file being processed, including size and modification status:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-Processing 'doc5.tex' (size: 307 bytes, last modified: 05/29/2018
-08:57:30), please wait.
+Processing 'doc5.tex' (size: 285 B, last modified: 03/01/2020
+19:25:40), please wait.
\end{codebox}
The list of tasks was also redesigned to be fully justified, and each entry displays both task and subtask names (the former being displayed enclosed in parentheses), besides of course the usual execution result:
@@ -51,7 +51,7 @@ As previously mentioned in Section~\ref{sec:rule}, on page~\pageref{sec:rule}, i
Also, observe that our tool displays the execution time before terminating, in seconds. The execution time has a very simple precision, as it is meant to be easily readable, and should not be considered for command profiling.
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-Total: 1.45 seconds
+Total: 1.14 seconds
\end{codebox}
The tool has two execution modes: \emph{silent}, which is the default, and \emph{verbose}, which prints as much information about tasks as possible. When in silent mode, \arara\ will simply display the task and subtask names, as well as the execution result. Nothing more is added to the output. For instance:
@@ -66,7 +66,7 @@ When executed in verbose mode, \arara\ will display the underlying system comman
-----------------------------------------------------------------
(BibTeX) The BibTeX reference management software
-----------------------------------------------------------------
-This is BibTeX, Version 0.99d (TeX Live 2017)
+This is BibTeX, Version 0.99d (TeX Live 2019)
The top-level auxiliary file: doc5.aux
The style file: plain.bst
Database file #1: mybib.bib
@@ -85,35 +85,57 @@ In order to run \arara\ on your \TeX\ file, the simplest possible way is to prov
$ arara doc6.tex
\end{codebox}
+From version 5.0 on, \arara\ may receive more than one file as parameter. It will compile them sequentially (starting with the leftmost). The process fails on the first failure of these executions. For the files to be flawlessly compiled by \TeX, they should be in the same working directory. If you process your files with other tools, this requirement could be lifted.
+
+\begin{codebox}{Terminal}{teal}{\icnote}{white}
+$ arara doc20.tex doc21.tex
+ __ _ _ __ __ _ _ __ __ _
+ / _` | '__/ _` | '__/ _` |
+| (_| | | | (_| | | | (_| |
+ \__,_|_| \__,_|_| \__,_|
+
+Processing 'doc20.tex' (size: 28 B, last modified: 02/28/2020
+07:15:02), please wait.
+
+(PDFTeX) PDFTeX engine .................................. SUCCESS
+
+Processing 'doc21.tex' (size: 28 B, last modified: 02/28/2020
+07:15:10), please wait.
+
+(PDFTeX) PDFTeX engine .................................. SUCCESS
+
+Total: 1.20 seconds
+\end{codebox}
+
The tool has a set of command line options (also known as flags or switches) that modify the underlying execution behaviour or enhance the execution workflow. If you do not provide any parameters, \arara\ will display the tool usage and the available options:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ arara
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-arara 4.0 (revision 1)
-Copyright (c) 2012-2017, Paulo Roberto Massa Cereda
-All rights reserved
-
-usage: arara [file [--dry-run] [--log] [--verbose | --silent]
- [--timeout N] [--max-loops N] [--language L]
- [ --preamble P ] [--header] | --help | --version]
- -h,--help print the help message
- -H,--header extract directives only in the file header
- -l,--log generate a log output
- -L,--language <code> set the application language
- -m,--max-loops <number> set the maximum number of loops
- -n,--dry-run go through all the motions of running a
- command, but with no actual calls
- -p,--preamble <name> set the file preamble based on the
- configuration file
- -s,--silent hide the command output
- -t,--timeout <number> set the execution timeout (in milliseconds)
- -V,--version print the application version
- -v,--verbose print the command output
+Usage: arara [OPTIONS] [file]...
+
+Options:
+ -l, --log Generate a log output
+ -v, --verbose / -s, --silent Print the command output
+ -n, --dry-run Go through all the motions of running a
+ command, but with no actual calls
+ -H, --header Extract directives only in the file header
+ -t, --timeout INT Set the execution timeout (in milliseconds)
+ -L, --language TEXT Set the application language
+ -m, --max-loops INT Set the maximum number of loops (> 0)
+ -p, --preamble TEXT Set the file preamble based on the
+ configuration file
+ -d, --working-directory DIRECTORY
+ Set the working directory for all tools
+ -V, --version Show the version and exit
+ -h, --help Show this message and exit
+
+Arguments:
+ file The file(s) to evaluate and process
\end{codebox}
The available options for our tool are detailed as follows. Each option contains short and long variations, which are denoted by \opbox{o} and \opbox{{-}option} in the command line, respectively. Additionally, when a parameter is required by the current option, it will be denoted by \prbox{parameter} in the description.
@@ -139,20 +161,20 @@ When running \arara\ without this option, two directives will be extracted (the
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ arara -L nl doc5.tex
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Verwerken van 'doc5.tex' (grootte: 307 bytes, laatst gewijzigd:
-05/29/2018 11:50:32), een ogenblik geduld.
+Verwerken van 'doc5.tex' (grootte: 285 B, laatst gewijzigd:
+03/01/2020 19:25:40), een ogenblik geduld.
-(PDFLaTeX) PDFLaTeX engine ............................ SUCCESVOL
-(BibTeX) The BibTeX reference management software ..... SUCCESVOL
-(PDFLaTeX) PDFLaTeX engine ............................ SUCCESVOL
-(PDFLaTeX) PDFLaTeX engine ............................ SUCCESVOL
+(PDFLaTeX) PDFLaTeX engine .............................. SUCCESVOL
+(BibTeX) The BibTeX reference management software ....... SUCCESVOL
+(PDFLaTeX) PDFLaTeX engine .............................. SUCCESVOL
+(PDFLaTeX) PDFLaTeX engine .............................. SUCCESVOL
-Totaal: 1,59 seconden
+Totaal: 1,07 seconden
\end{codebox}
\begin{messagebox}{Navis volitans mihi anguillis plena est}{araracolour}{\icok}{white}
@@ -174,7 +196,7 @@ At time of writing, \arara\ is able to speak English, German, Dutch, Italian and
\vspace{1.4em}
-Would you like to make \arara\ speak your own language? Splendid! We would love to have you in the team! Just send us an electronic mail, join our \href{https://gitter.im/cereda/arara}{dedicated chatroom} or \href{https://github.com/cereda/arara/issues}{open an issue} about it. The localization process is quite straightforward, we can help you. Any language is welcome!
+Would you like to make \arara\ speak your own language? Splendid! We would love to have you in the team! Just send us an electronic mail, join our \href{https://gitter.im/cereda/arara}{dedicated chatroom} or \href{https://gitlab.com/islandoftex/arara/issues}{open an issue} about it. The localization process is quite straightforward, we can help you. Any language is welcome!
\end{messagebox}
This option can also be specified in the configuration file (see Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). However, one can always override this setting by running the tool with an explicit \opbox{L} option.
@@ -194,7 +216,7 @@ $ arara -m 2 doc8.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc8.tex' (size: 45 bytes, last modified: 05/29/2018
+Processing 'doc8.tex' (size: 45 B, last modified: 05/29/2018
12:32:14), please wait.
(PDFTeX) PDFTeX engine .................................. SUCCESS
@@ -209,35 +231,35 @@ This option can also be specified in the configuration file (see Section~\ref{se
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ arara -n doc5.tex
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc5.tex' (size: 307 bytes, last modified: 05/29/2018
-11:50:32), please wait.
+Processing 'doc5.tex' (size: 285 B, last modified: 03/01/2020
+19:25:40), please wait.
[DR] (PDFLaTeX) PDFLaTeX engine
-----------------------------------------------------------------
-Authors: Marco Daniel, Paulo Cereda
-About to run: [ pdflatex, doc5.tex ]
+Author: Island of TeX
+About to run: [ pdflatex, /home/paulo/Downloads/doc5.tex ] @
[DR] (BibTeX) The BibTeX reference management software
-----------------------------------------------------------------
-Authors: Marco Daniel, Paulo Cereda
-About to run: [ bibtex, doc5 ]
+Author: Island of TeX
+About to run: [ bibtex, doc5 ] @
[DR] (PDFLaTeX) PDFLaTeX engine
-----------------------------------------------------------------
-Authors: Marco Daniel, Paulo Cereda
-About to run: [ pdflatex, doc5.tex ]
+Author: Island of TeX
+About to run: [ pdflatex, /home/paulo/Downloads/doc5.tex ] @
[DR] (PDFLaTeX) PDFLaTeX engine
-----------------------------------------------------------------
-Authors: Marco Daniel, Paulo Cereda
-About to run: [ pdflatex, doc5.tex ]
+Author: Island of TeX
+About to run: [ pdflatex, /home/paulo/Downloads/doc5.tex ] @
-Total: 0.27 seconds
+Total: 0.23 seconds
\end{codebox}
Note that the rule authors are displayed (so they can be blamed in case anything goes wrong), as well as the system command to be executed. It is an interesting approach to see everything that will happen to your document and in which order.
@@ -268,7 +290,7 @@ $ arara -p twopdftex doc9.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc9.tex' (size: 18 bytes, last modified: 05/29/2018
+Processing 'doc9.tex' (size: 18 B, last modified: 05/29/2018
14:39:21), please wait.
(PDFTeX) PDFTeX engine .................................. SUCCESS
@@ -295,7 +317,7 @@ $ arara --timeout 3000 doc9.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc10.tex' (size: 63 bytes, last modified: 05/29/2018
+Processing 'doc10.tex' (size: 63 B, last modified: 05/29/2018
15:24:06), please wait.
(PDFTeX) PDFTeX engine ................................. ERROR
@@ -314,6 +336,8 @@ Total: 3.37 seconds
If left unattended, this particular execution would never finish (and probably crash the engine at a certain point), as expected by the recursive calls without a proper fixed point. The \opbox{{-}timeout} option was set at 3000 milliseconds and the task was aborted when the time limit was reached. Note that the tool raised an error about it.
+\item[\describeop{d}{working-directory}] This option allows you to change the working directory. That is, the commands will run from a different directory than the directory you launched \arara\ in. This is especially useful when calling a \TeX\ engine as they resolve files against the working direcotry. For that reason, \arara\ will also resolve each file you pass to it that has no absolute path against the working directory. The working directory is fixed for the whole call; passing multiple files to \arara\ will resolve all of them against and execute all actions within that one working directory.
+
\item[\describeop{V}{version}] This option, as the name indicates, prints the current version. It also prints the current revision and a list of libraries with their corresponding licenses. Finally, it simply exits the application. Note that this option has the second highest priority over the others.
\item[\describeop{v}{verbose}] This option enables the verbose mode of \arara, as seen in Section~\ref{sec:userinterfacedesign}, on page~\pageref{sec:userinterfacedesign}. It also enables all streams to be flushed directly to the terminal, including potential user input interactions (the exact opposite of silent mode). This option can also be activated by default in the configuration file (see Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}).
@@ -360,7 +384,7 @@ $ arara doc11.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc11.tex' (size: 34 bytes, last modified: 05/29/2018
+Processing 'doc11.tex' (size: 34 B, last modified: 05/29/2018
19:40:35), please wait.
(PDFTeX) PDFTeX engine .................................. SUCCESS
@@ -377,7 +401,25 @@ $ arara doc11
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc11.tex' (size: 34 bytes, last modified: 05/29/2018
+Processing 'doc11.tex' (size: 34 B, last modified: 05/29/2018
+19:40:35), please wait.
+
+(PDFTeX) PDFTeX engine .................................. SUCCESS
+
+Total: 0.69 seconds
+\end{codebox}
+
+\item Many shells complete file names that have multiple extensions in the same directory, so that they end with a period. We try to
+resolve against them as well!
+
+\begin{codebox}{Terminal}{teal}{\icnote}{white}
+$ arara doc11.
+ __ _ _ __ __ _ _ __ __ _
+ / _` | '__/ _` | '__/ _` |
+| (_| | | | (_| | | | (_| |
+ \__,_|_| \__,_|_| \__,_|
+
+Processing 'doc11.tex' (size: 34 B, last modified: 05/29/2018
19:40:35), please wait.
(PDFTeX) PDFTeX engine .................................. SUCCESS
diff --git a/support/arara/doc/chapters/concepts.tex b/support/arara/doc/chapters/concepts.tex
index 0a8d168fe7..acd96f0fe1 100644
--- a/support/arara/doc/chapters/concepts.tex
+++ b/support/arara/doc/chapters/concepts.tex
@@ -15,7 +15,7 @@ A \emph{rule} is a formal description of how \arara\ handles a certain task. For
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'doc1.tex' (size: 83 bytes, last modified: 05/03/2018
+Processing 'doc1.tex' (size: 83 B, last modified: 05/03/2018
12:10:33), please wait.
I could not find a rule named 'foo' in the provided rule paths.
@@ -28,7 +28,11 @@ Total: 0.09 seconds
Once a rule is defined, \arara\ automatically provides an access layer to that rule through directives in the source code, a concept to be formally introduced later on, in Section~\ref{sec:directives}. Observe that a directive reflects a particular instance of a rule of the same name (i.e, a \rbox{foo} directive in a certain source code is an instance of the \rbox{foo} rule).
-In short, a rule is a plain text file written in the \gls{YAML} format, described in Chapter~\ref{chap:yaml}, on page~\pageref{chap:yaml}. I opted for this format because back then it was cleaner and more intuitive to use than other markup languages such as \gls{XML}, besides of course being a data serialization standard for programming languages.
+\begin{messagebox}{A note about rules}{attentioncolour}{\icattention}{black}
+For version 5.0, we kept the current YAML rule scheme. However, the names of the rules being public are marked as deprecated, as they might change in future versions.
+\end{messagebox}
+
+In short, a rule is a plain text file written in the YAML format, described in Chapter~\ref{chap:yaml}, on page~\pageref{chap:yaml}. I opted for this format because back then it was cleaner and more intuitive to use than other markup languages such as XML, besides of course being a data serialization standard for programming languages.
\begin{messagebox}{Animal jokes}{araracolour}{\icok}{white}
As a bonus, the acronym \emph{YAML} rhymes with the word \emph{camel}, so \arara\ is heavily environmentally friendly. Speaking of camels, there is the programming reference as well, since this amusing animal is usually associated with Perl and friends.
@@ -36,12 +40,12 @@ As a bonus, the acronym \emph{YAML} rhymes with the word \emph{camel}, so \arara
The default rules, i.e, the rules shipped with \arara, are placed inside a special subdirectory named \abox[araracolour]{rules/} inside another special directory named \abox[araracolour]{ARARA\_HOME} (the place where our tool is installed). We will learn later on, in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}, that we can add an arbitrary number of paths for storing our own rules, in order of priority, so do not worry too much about the location of the default rules, although it is important to understand and acknowledge their existence.
-The following list describes the basic structure of an \arara\ rule by presenting the proper elements (or keys, if we consider the proper \gls{YAML} nomenclature). Observe that elements marked as \rbox[araracolour]{M} are mandatory (i.e, the rule \emph{has} to have them in order to work). Similarly, elements marked as \rbox[araracolour]{O} are optional, so you can safely ignore them when writing a rule for our tool. A key preceded by \rbox{context$\rightarrow$} indicates a context and should be properly defined inside it.
+The following list describes the basic structure of an \arara\ rule by presenting the proper elements (or keys, if we consider the proper YAML nomenclature). Observe that elements marked as \rbox[araracolour]{M} are mandatory (i.e, the rule \emph{has} to have them in order to work). Similarly, elements marked as \rbox[araracolour]{O} are optional, so you can safely ignore them when writing a rule for our tool. A key preceded by \rbox{context$\rightarrow$} indicates a context and should be properly defined inside it.
\begin{description}
\item[\describe{M}{!config}] This keyword is mandatory and must be the first line of any \arara\ rule. It denotes the object mapping metadata to be internally used by the tool. Actually, the tool is not too demanding on using it (in fact, you could suppress it entirely and \arara\ will not complain), but it is considered good practice to start all rules with a \abox{!config} keyword regardless.
-\item[\describe{M}{identifier}] This key acts as a unique identifier for the rule (as expected). It is highly recommended to use lowercase letters without spaces, accents or punctuation symbols, as good practice (again). As a convention, if you have an identifier named \rbox{pdflatex}, the rule filename must be \rbox{pdflatex.yaml} (like our own instance). Please note that, although \rbox{yml} is known to be a valid \gls{YAML} extension as well, \arara\ only considers files ending with the \rbox{yaml} extension. This is a deliberate decision.
+\item[\describe{M}{identifier}] This key acts as a unique identifier for the rule (as expected). It is highly recommended to use lowercase letters without spaces, accents or punctuation symbols, as good practice (again). As a convention, if you have an identifier named \rbox{pdflatex}, the rule filename must be \rbox{pdflatex.yaml} (like our own instance). Please note that, although \rbox{yml} is known to be a valid YAML extension as well, \arara\ only considers files ending with the \rbox{yaml} extension. This is a deliberate decision.
\begin{codebox}{Example}{teal}{\icnote}{white}
identifier: pdflatex
@@ -61,29 +65,17 @@ authors:
- Paulo Cereda
\end{codebox}
-\item[\describe{M}{commands}] This key is introduced in version 4.0 of \arara\ and denotes a potential list of commands. From the user perspective, each command is called a \emph{subtask} within a task (rule and directive) context. A task may represent only a single command (a single subtask), as well as a sequence of commands (subtasks). For instance, the \rbox{frontespizio} rule requires at least two commands. So, as a means of normalizing the representation, a task composed of a single command (single subtask) is defined as the only element of the list, as opposed to previous versions of \arara, which had a specific key to hold just one command.
-
-\begin{messagebox}{Incompatibility with older versions}{attentioncolour}{\icerror}{black}
-Dear reader, note that rules from version 4.0 are incompatible with older versions of \arara. If you are migrating from old versions to version 4.0, we need to replace \abox{command} by \abox{commands} and specify a contextual element, as seen in the following descriptions. Please refer to Section~\ref{sec:migrationguide}, on page~\pageref{sec:migrationguide}, for a comprehensible migration guide.
-\end{messagebox}
+\item[\describe{M}{commands}] This key denotes a potential list of commands. From the user perspective, each command is called a \emph{subtask} within a task (rule and directive) context. A task may represent only a single command (a single subtask), as well as a sequence of commands (subtasks). For instance, the \rbox{frontespizio} rule requires at least two commands. So, as a means of normalizing the representation, a task composed of a single command (single subtask) is defined as the only element of the list, as opposed to previous versions of \arara, which had a specific key to hold just one command.
In order to properly set a subtask, the keys used in this specification are defined inside the \rbox{commands$\rightarrow$} context and presented as follows.
\begin{description}
\item[\describecontext{O}{commands}{name}] This key holds the name of the subtask as a plain string. When running \arara, this value will be displayed in the output. Subtask names are displayed after the main task name. By the way, did you notice that this key is entirely optional? That means that a subtask can simply be unnamed, if you decide so. However, such practice is not recommended, as it's always good to have a visual description of what \arara\ is running at the moment, so name your subtasks properly.
-\item[\describecontext{M}{commands}{command}] This key holds the action to be performed, typically a system command. In previous versions, \arara\ would rely solely on a string. For this version on, as a means to enhance the user experience (and also fix serious blockers when handling spaces in file names, as seen in \href{https://github.com/cereda/arara/issues}{previous issues} reported in the repository), the tool offers four types of returned values:
+\item[\describecontext{M}{commands}{command}] This key holds the action to be performed, typically a system command. The tool offers two types of returned values:
\begin{itemize}[label={--}]
-\item A plain string: this is the default (and only) behaviour in older versions of \arara. The plain string is processed as it is by the underlying execution engine. However, automatic argument parsing is problematic, so this approach, although supported, is not recommended any more.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-command: 'ls'
-\end{codebox}
-
-It is important to observe that you can use either a plain string directly or use an \gls{orb-tag} with an explicit \rbox{return} command (as seen in Section~\ref{sec:mvelbasicusage}, on page~\pageref{sec:mvelbasicusage}). Personally, I favour the explicit indication for a quick understanding.
-
-\item A \rbox{Command} object: \arara\ 4.0 features a new approach for handling system commands based on a high level structure with explicit argument parsing named \rbox{Command} (for our curious users, it is a plain Java object). In order to use this approach, we need to rely on \glspl{orb-tag} and use a helper method named \mtbox{getCommand} to obtain the desired result. We will detail this method later on, in Section~\ref{sec:commandsandtriggers}, on page~\pageref{sec:commandsandtriggers}. We highly recommend the adoption of this approach for rule writing instead of using plain strings.
+\item A \rbox{Command} object: \arara\ features an approach for handling system commands based on a high level structure with explicit argument parsing named \rbox{Command} (for our curious users, it is a plain Java object). In order to use this approach, we need to rely on orb tags and use a helper method named \mtbox{getCommand} to obtain the desired result. We will detail this method later on, in Section~\ref{sec:commands}, on page~\pageref{sec:commands}. We highly recommend the adoption of this approach for rule writing instead of using plain strings.
\begin{codebox}{Example}{teal}{\icnote}{white}
command: "@{ return getCommand('ls') }"
@@ -94,33 +86,27 @@ command: "@{ return getCommand('ls') }"
\begin{codebox}{Example}{teal}{\icnote}{white}
command: "@{ return 1 == 1 }"
\end{codebox}
-
-\item A \rbox{Trigger} object: this is surely the least common type of returned value and it is mentioned here just for documentation purposes. In simple terms, a \rbox{Trigger} object constitutes a special command that changes the internal workings of \arara\ at runtime. We have not worked much on this concept, so there is only one trigger available, seen in action in the official \rbox{halt} rule. In order to use this approach, we need to rely on \glspl{orb-tag} and use a helper method named \mtbox{getTrigger} to obtain the desired result.
\end{itemize}
-It is also worth mentioning that \arara\ also supports lists of commands represented as plain strings, \rbox{Command} or \rbox{Trigger} objects, boolean values or a mix of them. This is useful if your rule has to decide whether more actions are required in order to accomplish a task. In this case, our tool will take care of the list and execute each element in the specified order.
+It is also worth mentioning that \arara\ also supports lists of commands represented as \rbox{Command} objects, boolean values or a mix of them. This is useful if your rule has to decide whether more actions are required in order to accomplish a task. In this case, our tool will take care of the list and execute each element in the specified order.
\begin{codebox}{Example}{teal}{\icnote}{white}
-command: "@{ return [ 'ls', 'ls', 'ls' ] }"
+command: "@{ return [ getCommand('ls'), getCommand('ls') ] }"
\end{codebox}
As an example, please refer to the official \rbox{clean} rule for a real scenario where a list of commands is successfully employed: for each provided extension, the rule creates a new cleaning command and adds it to a list of removals to be processed later.
-\begin{messagebox}{Plain string is deprecated}{attentioncolour}{\icattention}{black}
-It took me a lot of effort to find out that handling plain strings and employing guesswork to parse arguments are the root of several issues reported by users. Therefore, this approach is being marked as \emph{deprecated} and will be removed in future versions.
-\end{messagebox}
-
-There are at least two variables available in the \abox{command} context and are described as follows (note that \gls{MVEL} variables and \glspl{orb-tag} are discussed in Chapter~\ref{chap:mvel}). A variable will be denoted by \varbox{variable} in this list. For each rule argument (defined later on), there will be a corresponding variable in the \abox{command} context, directly accessed through its unique identifier.
+There are at least two variables available in the \abox{command} context and are described as follows (note that MVEL variables and orb tags are discussed in Chapter~\ref{chap:mvel}). A variable will be denoted by \varbox{variable} in this list. For each rule argument (defined later on), there will be a corresponding variable in the \abox{command} context, directly accessed through its unique identifier.
\begin{description}
\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara.
-\item[\varbox{reference}] This variable is introduced in version 4.0 of \arara\ and holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
+\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
\end{description}
\begin{messagebox}{Quote handling}{araracolour}{\icinfo}{white}
\setlength{\parskip}{1em}
-The \gls{YAML} format disallows key values starting with \rbox{@} without proper quoting. This is the reason we had to use double quotes for the value and internally using single quotes for the command string. Also, we could use the other way around, or even using only one type and then escaping them when needed. This is excessively verbose but needed due to the format requirement. Thankfully, \arara\ offers two solutions for removing the quoting verbosity when writing commands.
+The YAML format disallows key values starting with \rbox{@} without proper quoting. This is the reason we had to use double quotes for the value and internally using single quotes for the command string. Also, we could use the other way around, or even using only one type and then escaping them when needed. This is excessively verbose but needed due to the format requirement. Thankfully, \arara\ offers two solutions for removing the quoting verbosity when writing commands.
The first solution is used in previous versions and it still works like a charm in modern days. We need to precede our command with a special keyword \rbox{<arara>} which will be removed afterwards. This solution works on virtually every key in the rule context, so it is a bonus. The new code will look like this:
@@ -128,7 +114,7 @@ The first solution is used in previous versions and it still works like a charm
command: <arara> @{ return getCommand('ls') }
\end{codebox}
-The second approach is more of a \gls{YAML} feature rather than a tool exclusive, although we have to do a couple of checks under the hood in order to ensure the correct execution. The idea here is to use the scalar content in folded style, as seen in Section~\ref{sec:yamlscalars}, on page~\pageref{sec:yamlscalars}. The new code will look like this:
+The second approach is more of a YAML feature rather than a tool exclusive, although we have to do a couple of checks under the hood in order to ensure the correct execution. The idea here is to use the scalar content in folded style, as seen in Section~\ref{sec:yamlscalars}, on page~\pageref{sec:yamlscalars}. The new code will look like this:
\begin{codebox}{Example}{teal}{\icnote}{white}
command: >
@@ -137,10 +123,10 @@ command: >
}
\end{codebox}
-Mind the indentation, as \gls{YAML} requires it to properly identify blocks. I personally recommend this approach for longer code, as it provides a better visual representation. You will see the second solution all around the default rules, but feel free to use the one you feel more comfortable with.
+Mind the indentation, as YAML requires it to properly identify blocks. Please keep in mind that the \rbox{<arara>} keyword is marked as deprecated in version 5.0 and will be removed in future versions of \arara, so it is highly recommended to favour this approach.
\end{messagebox}
-\item[\describecontext{O}{commands}{exit}] This key holds a special purpose in \arara\ 4.0, as it represents a custom exit status evaluation for the corresponding command. In general, a successful execution has zero as an exit status, but sometimes we end up with tools or situations where we need to override this check for whatever reason. For this purpose, simply write a \gls{MVEL} expression \emph{without \glspl{orb-tag}} as plain string and use the special variable \varbox{value} if you need the actual exit status returned by the command, available at runtime. For example, if the command returns a non-zero value indicating a successful execution, we can write this key as:
+\item[\describecontext{O}{commands}{exit}] This key holds a special purpose, as it represents a custom exit status evaluation for the corresponding command. In general, a successful execution has zero as an exit status, but sometimes we end up with tools or situations where we need to override this check for whatever reason. For this purpose, simply write a MVEL expression \emph{without orb tags} as plain string and use the special variable \varbox{value} if you need the actual exit status returned by the command, available at runtime. For example, if the command returns a non-zero value indicating a successful execution, we can write this key as:
\begin{codebox}{Example}{teal}{\icnote}{white}
exit: value > 0
@@ -199,10 +185,10 @@ There are three variables available in the \abox{flag} context, described as fol
\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara.
-\item[\varbox{reference}] This variable is introduced in version 4.0 of \arara\ and holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
+\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
\end{description}
-In the previous example, observe that the \gls{MVEL} expression defined in the \abox{flag} key checks if the user provided an affirmative value regarding shell escape, through comparing \varbox{parameters.shell} with a set of predefined affirmative values. In any case, the corresponding command flag is defined as result of such evaluation.
+In the previous example, observe that the MVEL expression defined in the \abox{flag} key checks if the user provided an affirmative value regarding shell escape, through comparing \varbox{parameters.shell} with a set of predefined affirmative values. In any case, the corresponding command flag is defined as result of such evaluation.
\item[\describecontext{O}{arguments}{default}] As default behaviour, if a parameter is not set in the directive context, the reference will be mapped to an empty string. This key exists for the exact purpose of overriding such behaviour.
@@ -217,7 +203,7 @@ There are three variables available in the \abox{default} context, described as
\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara.
-\item[\varbox{reference}] This variable is introduced in version 4.0 of \arara\ and holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
+\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class.
\end{description}
\item[\describecontext{O}{arguments}{required}] There might be certain scenarios in which a rule could make use of required arguments (for instance, a copy operation in which source and target must be provided). The \abox{required} key acts as a boolean switch to indicate whether the corresponding argument should be mandatory. In this case, set the key value to \rbox{true} and the argument becomes required. Later on at runtime, \arara\ will throw an error if a required parameter is missing in the directive.
@@ -249,21 +235,13 @@ arguments:
\end{codebox}
\end{description}
-This is the rule structure in the \gls{YAML} format used by \arara. Keep in mind that all subtasks in a rule are checked against their corresponding exit status. If an abnormal execution is detected, the tool will instantly halt and the rule will fail. Even \arara\ itself will return an exit code different than zero when this situation happens (detailed in Chapter~\ref{chap:commandline}, on page~\pageref{chap:commandline}).
+This is the rule structure in the YAML format used by \arara. Keep in mind that all subtasks in a rule are checked against their corresponding exit status. If an abnormal execution is detected, the tool will instantly halt and the rule will fail. Even \arara\ itself will return an exit code different than zero when this situation happens (detailed in Chapter~\ref{chap:commandline}, on page~\pageref{chap:commandline}).
\section{Directives}
\label{sec:directives}
A \emph{directive} is a special comment inserted in the source file in which you indicate how \arara\ should behave. You can insert as many directives as you want and in any position of the file. The tool will read the whole file and extract the directives.
-\begin{messagebox}{New features in version 4.0}{araracolour}{\icinfo}{white}
-\setlength{\parskip}{1em}
-\textbf{Partial directive extraction} -- From version 4.0 of \arara\ on, it is now possible to extract directives only available in the file preamble, i.e, all lines from the beginning that are comments until reaching the first line that is not a comment (excluding blank lines). To this end, a new command line flag is introduced in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}.
-
-\textbf{Predefined preambles} -- Common preambles can be predefined and used with files that require the same automation steps, then \arara\ can be invoked based on such specifications. This feature is covered in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}.
-\end{messagebox}
-
-
There are two types of directives in \arara\ which determine the way the corresponding rules will be instantiated. They are listed as follows. Note that directives are always preceded by the \rbox{arara:} pattern.
\begin{description}
@@ -273,7 +251,7 @@ There are two types of directives in \arara\ which determine the way the corresp
% arara: pdflatex
\end{codebox}
-\item[parametrized directive] This type of directive also has the rule name (which refers to the \abox{identifier} key from the rule of the same name), and also contains a map of parameters in order to provide additional information to the corresponding rule. This map is defined in the \gls{YAML} format, based on the inline style.
+\item[parametrized directive] This type of directive also has the rule name (which refers to the \abox{identifier} key from the rule of the same name), and also contains a map of parameters in order to provide additional information to the corresponding rule. This map is defined in the YAML format, based on the inline style.
\begin{codebox}{Parametrized directive}{teal}{\icnote}{white}
% arara: pdflatex: { shell: yes }
@@ -296,7 +274,7 @@ When handling parametrized directives, \arara\ always checks if directive parame
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'hello.tex' (size: 103 bytes, last modified:
+Processing 'hello.tex' (size: 103 B, last modified:
05/03/2018 15:40:16), please wait.
I have spotted an error in rule 'pdflatex' located at
@@ -309,11 +287,7 @@ Total: 0.21 seconds
As the message suggests, we need to remove the unknown parameter key from our directive or rewrite the rule in order to include it as an argument. The first option is, of course, easier.
-\begin{messagebox}{New feature in version 4.0}{araracolour}{\icinfo}{white}
-\textbf{Helpful messages} -- It is a staple of \arara\ to have friendly and helpful messages. From version 4.0 on, we decided to make messages even friendlier and include suggestions for correcting errors or improving usage. So, whenever possible, make sure to read all messages our tool provides, they will help you!
-\end{messagebox}
-
-Sometimes, directives can span several columns of a line, particularly the ones with several parameters. From \arara\ 4.0 on, we can split a directive into multiple lines by using the \rbox{arara: {-}{-}>} mark (also known as \emph{arrow notation} during development) to each line which should compose the directive. We call it a \emph{multiline directive}. Let us see an example:
+Sometimes, directives can span several columns of a line, particularly the ones with several parameters. We can split a directive into multiple lines by using the \rbox{arara: {-}{-}>} mark (also known as \emph{arrow notation} during development) to each line which should compose the directive. We call it a \emph{multiline directive}. Let us see an example:
\begin{codebox}{Multiline directive}{teal}{\icnote}{white}
% arara: pdflatex: {
@@ -328,28 +302,28 @@ It is important to observe that there is no need of them to be in contiguous lin
Although it is possible to spread lines of a multiline directive all over the code, it is considered good practice to keep them together for easier reading and editing. In any case, you can always see which lines compose a directive by inspecting the log file.
\end{messagebox}
-\arara\ 4.0 provides logical expressions, written in the \gls{MVEL} language, and special operators processed at runtime in order to determine whether and how a directive should be processed. This feature is named \emph{directive conditional}, or simply \emph{conditional} as an abbreviation. The following list describes all conditional operators available in the directive context.
+\arara\ provides logical expressions, written in the MVEL language, and special operators processed at runtime in order to determine whether and how a directive should be processed. This feature is named \emph{directive conditional}, or simply \emph{conditional} as an abbreviation. The following list describes all conditional operators available in the directive context.
\begin{description}
-\item[\describeconditional{a priori}{if}] The associated \gls{MVEL} expression is evaluated beforehand, and the directive is interpreted if, and only if, the result of such evaluation is true. This directive, when the conditional holds true, is executed at most once.
+\item[\describeconditional{a priori}{if}] The associated MVEL expression is evaluated beforehand, and the directive is interpreted if, and only if, the result of such evaluation is true. This directive, when the conditional holds true, is executed at most once.
\begin{codebox}{Conditional}{teal}{\icnote}{white}
% arara: pdflatex if missing('pdf') || changed('tex')
\end{codebox}
-\item[\describeconditional{a posteriori}{until}] The directive is interpreted the first time, then the associated \gls{MVEL} expression evaluation is done. While the result holds false, the directive is interpreted again and again. There are no guarantees of proper halting.
+\item[\describeconditional{a posteriori}{until}] The directive is interpreted the first time, then the associated MVEL expression evaluation is done. While the result holds false, the directive is interpreted again and again. There are no guarantees of proper halting.
\begin{codebox}{Conditional}{teal}{\icnote}{white}
% arara: pdflatex until !found('log', 'undefined references')
\end{codebox}
-\item[\describeconditional{a priori}{unless}] Technically an inverted \cdbox{if} conditional, the associated \gls{MVEL} expression is evaluated beforehand, and the directive is interpreted if, and only if, the result is false. This directive, when the conditional holds false, is executed at most once.
+\item[\describeconditional{a priori}{unless}] Technically an inverted \cdbox{if} conditional, the associated MVEL expression is evaluated beforehand, and the directive is interpreted if, and only if, the result is false. This directive, when the conditional holds false, is executed at most once.
\begin{codebox}{Conditional}{teal}{\icnote}{white}
% arara: pdflatex unless unchanged('tex') && exists('pdf')
\end{codebox}
-\item[\describeconditional{a priori}{while}] The associated \gls{MVEL} expression is evaluated beforehand, the directive is interpreted if, and only if, the result is true, and the process is repeated while the result still holds true. There are no guarantees of proper halting.
+\item[\describeconditional{a priori}{while}] The associated MVEL expression is evaluated beforehand, the directive is interpreted if, and only if, the result is true, and the process is repeated while the result still holds true. There are no guarantees of proper halting.
\begin{codebox}{Conditional}{teal}{\icnote}{white}
% arara: pdflatex while missing('pdf') ||
@@ -407,199 +381,98 @@ It is important to observe that, in this case, \rbox{doc3.tex} is a plain \TeX\
Even when a directive is interpreted with a file other than the one being processed by \arara\ (through the magic of the \abox{files} parameter), it is possible to use helper methods in the rule context to get access to the original file and reference. Such methods are detailed later on, in Section~\ref{sec:files}, on page~\pageref{sec:files}.
-\section{Migration guide}
+\section{Important changes in version 5.0}
\label{sec:migrationguide}
\begin{messagebox}{A note to users}{araracolour}{\icattention}{white}
If this is your first time using \arara\ or you do not have custom rules in the old format, you can safely ignore this section. All rules shipped with our tool are already written in the new format.
\end{messagebox}
-As previously discussed in Section~\ref{sec:rule}, on page~\pageref{sec:rule}, version 4.0 of \arara\ introduces a new rule format. As a result, user-defined rules in the old format are incompatible with the new version of our tool and thus have to be updated. In short, we need to replace \abox{command} by \abox{commands} and specify a contextual element. As an example, consider the following hypothetical rule \rbox{ls} written in the old format:
+\begin{messagebox}{Removal of triggers}{araracolour}{\icattention}{white}
+\arara\ previously had the concept of triggers which allowed to easily trigger events like halting \arara. As of version 5.0, support for triggers has been dropped due to the lack of use cases.
-\begin{codebox}{A rule in the old format}{teal}{\icnote}{white}
-!config
-identifier: ls
-name: LS
-command: ls @{details}
-arguments:
-- identifier: details
- flag: '@{ isTrue(parameters.details, "-l", "") }'
-\end{codebox}
+As the only pre-defined trigger has been \rbox{halt} we did not deprecate the ability to halt the application. However, the new mechanism uses the concept of session values (see \autoref{sec:others}).
+\end{messagebox}
-This rule does nothing too important, it simply runs the system command \rbox{ls} which lists the contents of the current directory. However, when we try to run \arara\ on a file which contains a directive referencing this rule, we get the following error in the terminal:
+\begin{messagebox}{Removal of Velocity support}{araracolour}{\icinfo}{white}
+\arara\ featured support for the Velocity Template Language. In version 5.0, this support has been removed. We decided in favour of this breaking change to achieve more independence from third-party modules and to avoid being stuck at version~1.7 for compatibility reasons.
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
- __ _ _ __ __ _ _ __ __ _
- / _` | '__/ _` | '__/ _` |
-| (_| | | | (_| | | | (_| |
- \__,_|_| \__,_|_| \__,_|
+Due to this change, \arara\ does not ship support for any templating language at the moment. If you are interested in getting a templating language on board, you are welcome to support our efforts to make the inclusion of JVM code on the user-side more pleasant.
+\end{messagebox}
-Processing 'doc4.tex' (size: 31 bytes, last modified: 05/27/2018
-21:05:57), please wait.
+\begin{messagebox}{Removal of string-based commands}{araracolour}{\icinfo}{white}
+Up to version 5.0 you could simply use
-I have spotted an error in rule 'ls' located at '/home/paulo'. I
-could not parse the rule, something bad happened. Apparently, the
-provided YAML file is invalid. I will do my best to help you in
-any way I can. There are more details available on this
-exception:
+\begin{codebox}{Return statement}{teal}{\icnote}{white}
+return "command";
+\end{codebox}
-DETAILS ---------------------------------------------------------
-Cannot create property=command for
-JavaBean=com.github.cereda.arara.model.Rule@29774679
- in
-'reader', line 1, column 1:
- !config
- ^
-Unable to find
-property 'command' on class: com.github.cereda.arara.model.Rule
+\noindent in your rules. This resulted in \arara\ implicitly constructing a command object. As this does not make clear that this command is actually run, we now enforce the usage of
-in 'reader', line 4, column 10:
- command: ls @{details}
-
- ^
+\vspace{1em}
+\mdbox{R}{getCommand(List<String> commands)}{Command}
-Total: 0.03 seconds
-\end{codebox}
+\vspace{1em}
-The above terminal output shows the usual error \arara\ raises when a rule in the old format is used, and thus the corresponding \gls{YAML} file is considered invalid. In order to fix the rule, we need to move the \abox{command} key inside a \rbox{commands$\rightarrow$} context as a list element, as seen as follows.
+\noindent in the \rbox{return} statement. Hence, the new way of doing the same is (with either single or double quote pairs):
-\begin{codebox}{A rule converted into the new format}{teal}{\icnote}{white}
-!config
-identifier: ls
-name: LS
-commands:
-- command: ls @{details}
-arguments:
-- identifier: details
- flag: '@{ isTrue(parameters.details, "-l", "") }'
+\begin{codebox}{Return statement}{teal}{\icnote}{white}
+return getCommand("command");
\end{codebox}
+\end{messagebox}
-Note that this fix is sufficient to make the rule valid in the new format. Also, it is interesting to observe that the subtask will be unnamed during the execution, as there is no corresponding \abox{name} key in the list element.
+\begin{messagebox}{Methods: removal and change of name}{araracolour}{\icinfo}{white}
+The following previously available methods (and repective overloaded variants) have been removed:
+
+\begin{itemize}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{addQuotes(String string)}{String}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{isAIX()}{boolean}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{isIrix()}{boolean}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{isOS2()}{boolean}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{isSolaris()}{boolean}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{getFullBasename(File file)}{String}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{\parbox{0.62\textwidth}{mergeVelocityTemplate(File input,\\\hspace*{1em} File output, Map<String, Object> map)}}{void}
+\end{itemize}
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
-(LS) Unnamed task ....................................... SUCCESS
-\end{codebox}
+The following methods have been renamed:
+\begin{itemize}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{(Session.)insert(String key, Object value)}{void}
-Now, let us consider an example containing a list of commands, also based on the old format. The \rbox{ls} rule was updated to include two runs of the system command of the same name in the current directory:
+\vspace{.5em}
-\begin{codebox}{A rule in the old format}{teal}{\icnote}{white}
-!config
-identifier: ls
-name: LS
-commands:
-- ls @{details}
-- ls @{details}
-arguments:
-- identifier: details
- flag: '@{ isTrue(parameters.details, "-l", "") }'
-\end{codebox}
+\hspace{2cm}\textcolor{teal}{\faArrowDown}
-Observe that the old format directly represents commands as a list of plain strings. When trying to run \arara\ on a file which contains a directive referencing the updated \rbox{ls} rule, we get the following error in the terminal:
+\item[\textcolor{okcolour}{\faCheck}]\mdbox{R}{(Session.)put(String key, Object value)}{void}
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
- __ _ _ __ __ _ _ __ __ _
- / _` | '__/ _` | '__/ _` |
-| (_| | | | (_| | | | (_| |
- \__,_|_| \__,_|_| \__,_|
+\vspace{1em}
-Processing 'doc4.tex' (size: 31 bytes, last modified: 05/27/2018
-21:05:57), please wait.
-
-I have spotted an error in rule 'ls' located at '/home/paulo'. I
-could not parse the rule, something bad happened. Apparently, the
-provided YAML file is invalid. I will do my best to help you in
-any way I can. There are more details available on this
-exception:
-
-DETAILS ---------------------------------------------------------
-Cannot create property=commands for
-JavaBean=com.github.cereda.arara.model.Rule@91161c7
- in 'reader',
-line 1, column 1:
- !config
- ^
-No single argument
-constructor found for class
-com.github.cereda.arara.model.RuleCommand
- in 'reader', line 5,
-column 1:
- - ls @{details}
- ^
-
-
-Total: 0.02 seconds
-\end{codebox}
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{(Session.)exists(String key)}{boolean}
-The above terminal output shows a slightly different message, but the error is practically the same to the one \arara\ raised before when a rule in the old format was used. The difference relies on the missing rule property being set at the moment, but the idea remains the same. In order to fix the rule, we need to precede every list element in the \rbox{commands$\rightarrow$} context with the \abox{command} key, as seen as follows.
+\vspace{.5em}
-\begin{codebox}{A rule converted into the new format}{teal}{\icnote}{white}
-!config
-identifier: ls
-name: LS
-commands:
-- command: ls @{details}
-- command: ls @{details}
-arguments:
-- identifier: details
- flag: '@{ isTrue(parameters.details, "-l", "") }'
-\end{codebox}
+\hspace{2cm}\textcolor{teal}{\faArrowDown}
-This fix is sufficient to make the rule valid in the new format. Also, as mentioned before, it is interesting to observe that the subtasks will be unnamed during the execution, as there are no corresponding \abox{name} keys in the list elements.
+\item[\textcolor{okcolour}{\faCheck}] \mdbox{R}{(Session.)contains(String key)}{boolean}
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
-(LS) Unnamed task ....................................... SUCCESS
-(LS) Unnamed task ....................................... SUCCESS
-\end{codebox}
+\vspace{1em}
-There is a helper tool available in the \href{https://github.com/cereda/arara/releases/tag/4.0}{release section} of our project repository that attempts to automatically convert rules in the old format to the new one. If you want to try it, download the \rbox{rc.jar} file from the repository and put it in the same directory where the old rules are located. You can also provide a full path instead. It is important to note that, although the tool might indicate a successful conversion, there are no guarantees that the resulting rule is fully compliant with the new format, due to potential changes in the internal workings of \arara, so your mileage may vary. In general, it should work. The rule converter is written in Java and requires a virtual machine to run. The tool has a straightforward workflow and takes just one parameter referring to the rule to be converted. The entire process should happen without intervention. When invoked without the file name, this is the expected output:
+\item[\textcolor{warningcolour}{\faClose}] \mdbox{R}{(Session.)obtain(String key)}{Object}
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ java -jar rc.jar
- _ _
- ___ _ _| |___ ___ ___ ___ _ _ ___ ___| |_ ___ ___
-| _| | | | -_| | _| . | | | | -_| _| _| -_| _|
-|_| |___|_|___| |___|___|_|_|\_/|___|_| |_| |___|_|
-
-version 1.0 (rules < 4.0)
-
-OH NO! -----------------------------------------------------
-This tool expects the YAML rule from previous versions of
-arara. Please, provide a proper YAML file containing the old
-rule as a parameter and try again. I will do my best to
-convert the rule to the new version 4.0 format.
-\end{codebox}
+\vspace{.5em}
-Let us invoke the tool with the first version of our hypothetical \rbox{ls} rule, still in the old format. The tool removes all comments from the original file, if any, and constructs a new file with a \rbox{\_v4} suffix attached to the name. The original file is preserved. Just keep in mind that the new rule must be renamed afterwards, as the base name and the corresponding \abox{identifier} key must match. The output is presented as follows.
+\hspace{2cm}\textcolor{teal}{\faArrowDown}
-\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ java -jar rc.jar ls.yaml
- _ _
- ___ _ _| |___ ___ ___ ___ _ _ ___ ___| |_ ___ ___
-| _| | | | -_| | _| . | | | | -_| _| _| -_| _|
-|_| |___|_|___| |___|___|_|_|\_/|___|_| |_| |___|_|
-
-version 1.0 (rules < 4.0)
-
-The provided YAML rule looks OK. I will try my best to
-convert it to the new version 4.0 format adopted by arara.
-The new rule name will be written in the same directory of
-the original one and will have a '_v4' suffix to it. Keep in
-mind that the base name must match the identifier!
-
-YAY! -------------------------------------------------------
-Good news, everybody! The provided YAML rule was updated
-successfully to the new version 4.0 format of arara! Of
-course, there are no guarantees this new rule will work out
-of the box, so fingers crossed! Take a closer look at the
-manual and update your rule to use the new enhancements of
-arara. Have a great time!
-\end{codebox}
+\item[\textcolor{okcolour}{\faCheck}]\mdbox{R}{(Session.)get(String key)}{Object}
+\end{itemize}
+\end{messagebox}
-The resulting rule is identical to the one manually converted in this section. Just note that, when creating the file, the resulting \gls{YAML} file might write the keys in alphabetical order. That means that, although both files semantically represent the same rule, the positions of the keys differ. However, that poses no issue at all, as long as the keys are correctly defined. Also, it is important to note that, due to a conversion policy of the underlying \gls{YAML} library, folded scalars in the old format are transcribed as literal scalars in the new format. We could force a folded style as default, but the resulting rule would be unnecessarily verbose, so we opted for the simpler, cleaner solution. As a direct consequence, we strongly recommend a subsequent verification and potential fix of existing literal scalars into folded ones, if any. Please refer to Section~\ref{sec:yamlscalars}, on page~\pageref{sec:yamlscalars}, for more details on scalars.
+\begin{messagebox}{Support for multiple files}{araracolour}{\icinfo}{white}
+From version 5.0 on, \arara\ is able to compile multiple files at once by providing multiple files as arguments. Please note that they should reside in the same working directory. Every other kind of compilation of multiple files is restricted by the mechanisms of the running programs. See \autoref{chap:commandline} for details.
+\end{messagebox}
-\begin{messagebox}{Replace plain strings in commands}{araracolour}{\icattention}{white}
-As plain strings are known to be problematic when defining commands, they are marked as deprecated in version 4.0 of \arara\ and will likely be removed in future releases. Since you are migrating from an old format to a new one, please consider replacing plain strings in command by proper \rbox{Command} objects. The helper methods available in the rule context, including the indispensable \mtbox{getCommand} method, for obvious reasons, are detailed in Section~\ref{sec:commandsandtriggers}, on page~\pageref{sec:commandsandtriggers}. It is highly advisable to update your rules on this regard, if applicable.
+\begin{messagebox}{Support for changing the working directory}{araracolour}{\icinfo}{white}
+A common problem when compiling \TeX\ files are specialties of \TeX\ engines looking for files. Usually, you should call an engine from the directory where the target file is located. \arara\ had the same restriction in that case. Now you can instruct \arara\ to operate from another directory lifting that constraint. See \autoref{chap:commandline} for details.
\end{messagebox}
-This section pretty much covered the basics for correctly migrating rules in the old format to the new one. Of course, it is highly advisable to make use of the new features available in \arara\ 4.0 for achieving better results. If you need any help, please do not hesitating in contacting us. See Section~\ref{sec:support}, on page~\pageref{sec:support}, for more details on how to get help.
+This section pretty much covered the basics of the changes to this version. Of course, it is highly advisable to make use of the new features available in \arara\ 5.0 for achieving better results. If you need any help, please do not hesitate to contact us. See Section~\ref{sec:support}, on page~\pageref{sec:support}, for more details on how to get help.
diff --git a/support/arara/doc/chapters/configuration.tex b/support/arara/doc/chapters/configuration.tex
index 35553378d2..e7aba4102b 100644
--- a/support/arara/doc/chapters/configuration.tex
+++ b/support/arara/doc/chapters/configuration.tex
@@ -26,7 +26,7 @@ Our tool looks for the presence of at least one of four very specific files befo
\vspace{1.4em}
-From version 4.0 on, \arara\ provides two approaches regarding the location of a configuration file. They dictate how the execution should behave and happen from a user perspective, and are described as follows.
+\arara\ provides two approaches regarding the location of a configuration file. They dictate how the execution should behave and happen from a user perspective, and are described as follows.
\begin{description}
\item[global configuration file] For this approach, the configuration file should be located at \abox[araracolour]{USER\_HOME} which is the home directory of the current user. All subsequent executions of \arara\ will read this configuration file and apply the specified settings accordingly. However, it is important to note that this approach has the lowest lookup priority, which means that a local configuration, presented as follows, will always supersede a global counterpart.
@@ -43,7 +43,7 @@ If the logging feature is properly enabled, \arara\ will indicate in the corresp
\section{Basic structure}
\label{sec:basicstructure}
-The following list describes the basic structure of an \arara\ configuration file by presenting the proper elements (or keys, if we consider the proper \gls{YAML} nomenclature). Observe that elements marked as \rbox[araracolour]{M} are mandatory (i.e, the configuration file \emph{has} to have them in order to work). Similarly, elements marked as \rbox[araracolour]{O} are optional, so you can safely ignore them when writing a configuration file for our tool.
+The following list describes the basic structure of an \arara\ configuration file by presenting the proper elements (or keys, if we consider the proper YAML nomenclature). Observe that elements marked as \rbox[araracolour]{M} are mandatory (i.e, the configuration file \emph{has} to have them in order to work). Similarly, elements marked as \rbox[araracolour]{O} are optional, so you can safely ignore them when writing a configuration file for our tool.
\begin{description}
\item[\describe{M}{!config}] This keyword is mandatory and must be the first line of a configuration file. It denotes the object mapping metadata to be internally used by the tool. Actually, the tool is not too demanding on using it (in fact, you could suppress it entirely and \arara\ will not complain), but it is considered good practice to start a configuration file with a \abox{!config} keyword regardless.
@@ -56,7 +56,7 @@ paths:
- '/opt/paulo/rules'
\end{codebox}
-There are three variables available in the \abox{paths} context and are described as follows (note that \gls{MVEL} variables and \glspl{orb-tag} are discussed in Chapter~\ref{sec:mvelbasicusage}). A variable will be denoted by \varbox{variable} in this list.
+There are three variables available in the \abox{paths} context and are described as follows (note that MVEL variables and orb tags are discussed in Chapter~\ref{sec:mvelbasicusage}). A variable will be denoted by \varbox{variable} in this list.
\begin{description}
\item[\varbox{user.home}] This variable, as the name implies, holds the value of the absolute, canonical path of \abox[araracolour]{USER\_HOME} which is the home directory of the current user, as plain string. Note that the specifics of the home directory (such as name and location) are defined by the operating system involved.
@@ -66,25 +66,25 @@ paths:
- '@{user.home}/rules'
\end{codebox}
-\item[\varbox{user.dir}] This variable, as the name implies, holds the value of the absolute, canonical path of \abox[araracolour]{USER\_DIR} which is the working directory associated with the current execution, as plain string. Note that the working directory approach requires a user execution strategy to ensure the correct path value.
+\item[\varbox{user.name}] This variable, as the name implies, holds the value of the current user account name, as plain string. On certain operating systems, this value is used to build the home directory structure.
\begin{codebox}{Example}{teal}{\icnote}{white}
paths:
-- '@{user.dir}/rules'
+- '/home/@{user.name}/rules'
\end{codebox}
-\item[\varbox{user.name}] This variable, as the name implies, holds the value of the current user account name, as plain string. On certain operating systems, this value is used to build the home directory structure.
-\end{description}
+\item[\varbox{application.workingDirectory}] This variable, as the name implies, holds the value of the absolute, canonical path of the working directory associated with the current execution, as plain string.
\begin{codebox}{Example}{teal}{\icnote}{white}
paths:
-- '/home/@{user.name}/rules'
+- '@{application.workingDirectory}/rules'
\end{codebox}
+\end{description}
-Observe that the \varbox{user} variable actually holds a map containing three keys (resulting in a map within a map). However, for didactic purposes, it is easier to use the property navigation feature of \gls{MVEL}, detailed in Section~\ref{sec:propertynavigation}, on page~\pageref{sec:propertynavigation}, and consider the map references as three independent variables. You can use property navigation styles interchangeably. Note that you can also precede the path with the special keyword \rbox{<arara>} and save some quotes (see Section~\ref{sec:rule}, on page~\pageref{sec:rule}). In this specific scenario, the special keyword will be automatically removed afterwards.
+Observe that the \varbox{user} variable actually holds a map containing two keys (resulting in a map within a map). However, for didactic purposes, it is easier to use the property navigation feature of MVEL, detailed in Section~\ref{sec:propertynavigation}, on page~\pageref{sec:propertynavigation}, and consider the map references as three independent variables. You can use property navigation styles interchangeably. Note that you can also precede the path with the special keyword \rbox{<arara>} and save some quotes (see Section~\ref{sec:rule}, on page~\pageref{sec:rule}, but keep in mind that this special keyword is marked as deprecated and will be removed in future versions). In this specific scenario, the special keyword will be automatically removed afterwards.
\begin{messagebox}{Avoid folded and literal styles for scalars in a path}{attentioncolour}{\icattention}{black}
-Do not use folded or literal styles for scalars in a path! The \gls{orb-tag} resolution for a path in plain string should be kept as simple as possible, so \emph{always} use the inline style.
+Do not use folded or literal styles for scalars in a path! The orb tag resolution for a path in plain string should be kept as simple as possible, so \emph{always} use the inline style.
\end{messagebox}
\item[\describecf{O}{string}{language}{en}] This key sets the language of all subsequent executions of \arara\ according to the provided language code value, as plain string. The default language is set to English. Also, it is very important to observe that the \opbox{{-}language} command line option can override this setting.
@@ -117,19 +117,19 @@ logging: true
header: false
\end{codebox}
-\item[\describecf{O}{string}{logname}{arara}] This key modifies the default log file name, according to the associated plain string value, plus the \rbox{log} extension. The value cannot be empty or contain invalid characters. There is no \gls{orb-tag} evaluation in this specific context, only a plain string value. The log file will be written by our tool if, and only if, the \opbox{{-}log} command line option is used.
+\item[\describecf{O}{string}{logname}{arara}] This key modifies the default log file name, according to the associated plain string value, plus the \rbox{log} extension. The value cannot be empty or contain invalid characters. There is no orb tag evaluation in this specific context, only a plain string value. The log file will be written by our tool if, and only if, the \opbox{{-}log} command line option is used.
\begin{codebox}{Example}{teal}{\icnote}{white}
logname: mylog
\end{codebox}
-\item[\describecf{O}{string}{dbname}{arara}] This key modifies the default \gls{XML} database file name, according to the associated plain string value, plus the \rbox{xml} extension. The value cannot be empty or contain invalid characters. There is no \gls{orb-tag} evaluation in this specific context, only a plain string value. This database is used by file hashing operations, detailed in Section~\ref{sec:files}, on page~\pageref{sec:files}.
+\item[\describecf{O}{string}{dbname}{arara}] This key modifies the default YAML database file name, according to the associated plain string value, plus the \rbox{yaml} extension. The value cannot be empty or contain invalid characters. There is no orb tag evaluation in this specific context, only a plain string value. This database is used by file hashing operations, detailed in Section~\ref{sec:files}, on page~\pageref{sec:files}.
\begin{codebox}{Example}{teal}{\icnote}{white}
dbname: mydb
\end{codebox}
-\item[\describecf{O}{string}{laf}{none}] This key modifies the default look and feel class reference, i.e, the appearance of \gls{GUI} widgets provided by our tool, according to the associated plain string value. The value cannot be empty or contain invalid characters. There is no \gls{orb-tag} evaluation in this specific context, only a plain string value. This look and feel setting is used by UI methods, detailed in Section~\ref{sec:dialogboxes}, on page~\pageref{sec:dialogboxes}. Note that this value is used by the underlying Java runtime environment, so a full qualified class name is expected.
+\item[\describecf{O}{string}{laf}{none}] This key modifies the default look and feel class reference, i.e, the appearance of GUI widgets provided by our tool, according to the associated plain string value. The value cannot be empty or contain invalid characters. There is no orb tag evaluation in this specific context, only a plain string value. This look and feel setting is used by UI methods, detailed in Section~\ref{sec:dialogboxes}, on page~\pageref{sec:dialogboxes}. Note that this value is used by the underlying Java runtime environment, so a full qualified class name is expected.
\begin{codebox}{Example}{teal}{\icnote}{white}
laf: 'javax.swing.plaf.nimbus.NimbusLookAndFeel'
@@ -244,7 +244,7 @@ filetypes:
\begin{messagebox}{Do not escape backslashes}{attentioncolour}{\icattention}{black}
\setlength{\parskip}{1em}
-When writing a file type pattern, there is no need for escaping backslashes as one does for strings in a typical programming language (including \gls{MVEL} expressions). In this specific scenario, key values are represented as plain, literal strings.
+When writing a file type pattern, there is no need for escaping backslashes as one does for strings in a typical programming language (including MVEL expressions). In this specific scenario, key values are represented as plain, literal strings.
However, please note that character escaping might be required by the underlying regular expression in some scenarios (i.e, a literal dot in the pattern). It is highly recommended to consult a proper regular expression documentation for a comprehensive overview.
\end{messagebox}
diff --git a/support/arara/doc/chapters/deploying.tex b/support/arara/doc/chapters/deploying.tex
index 533b883ee2..2dfc68141c 100644
--- a/support/arara/doc/chapters/deploying.tex
+++ b/support/arara/doc/chapters/deploying.tex
@@ -4,14 +4,10 @@
As previously mentioned, \arara\ runs on top of a Java virtual machine, available on all major operating systems -- in some cases, you might need to install the proper virtual machine. This chapter provides detailed instructions on how to properly deploy the tool in your computer from either the official package available in our project repository or a personal build generated from source (as seen in Section~\ref{sec:compilingthetool}, on page~\pageref{sec:compilingthetool}).
-\begin{messagebox}{No more installers}{araracolour}{\icok}{white}
-Be mindful that, from version 4.0 on, the team decided to not release cross-platform installers any more. Our tool is available off the shelf on all major \TeX\ distributions, including \TeX\ Live and MiK\TeX, which makes manual installation unnecessary given the significant coverage of such distributions. Chances are you already have \arara\ in your system!
-\end{messagebox}
-
\section{Directory structure}
\label{sec:directorystructure}
-From the early development stages, our tool employs a very straightforward directory structure. In short, we provide the \abox[araracolour]{ARARA\_HOME} alias to the directory path in which the \rbox[araracolour]{arara.jar} Java archive file is located. This particular file is the heart and soul of our tool and dictates the default rule search path, which is a special directory named \abox[araracolour]{rules/} available from the same level. This directory contains all rules specified in the \gls{YAML} format, as seen in Section~\ref{sec:rule}, on page~\pageref{sec:rule}. The structure overview is presented as follows.
+From the early development stages, our tool employs a very straightforward directory structure. In short, we provide the \abox[araracolour]{ARARA\_HOME} alias to the directory path in which the \rbox[araracolour]{arara.jar} Java archive file is located. This particular file is the heart and soul of our tool and dictates the default rule search path, which is a special directory named \abox[araracolour]{rules/} available from the same level. This directory contains all rules specified in the YAML format, as seen in Section~\ref{sec:rule}, on page~\pageref{sec:rule}. The structure overview is presented as follows.
\vspace{1em}
@@ -36,15 +32,15 @@ forked edges,
\vspace{1.4em}
-Provided that this specific directory structure is honoured, the tool is ready for use off the shelf. In fact, the official \arara\ package available in the \href{https://github.com/cereda/arara/releases}{release section} of our project repository, as well as the \href{https://bintray.com/cereda/arara}{Bintray} software distribution service, exactly mirrors this structure. Once the package is properly downloaded, we simply need to extract it into a proper \abox[araracolour]{ARARA\_HOME} location.
+Provided that this specific directory structure is honoured, the tool is ready for use off the shelf. In fact, the official \arara\ package available in the \href{https://gitlab.com/islandoftex/arara/-/releases}{release section} of our project repository. Once the package is properly downloaded, we simply need to extract it into a proper \abox[araracolour]{ARARA\_HOME} location.
\section{Defining a location}
\label{sec:definingalocation}
-First and foremost, we need to obtain \rbox{arara-4.0.zip} from either our project repository at GitHub or at the Bintray service mirror. As the name indicates, this is a compressed file format, so we need to extract it into a proper location. Run the following command in the terminal:
+First and foremost, we need to obtain \rbox{arara-5.0.zip} from either our project repository at GitLab. As the name indicates, this is a compressed file format, so we need to extract it into a proper location. Run the following command in the terminal:
\begin{codebox}{Terminal}{teal}{\icnote}{white}
-$ unzip arara-4.0.zip
+$ unzip arara-5.0.zip
\end{codebox}
As a result of the previous command, we obtained a directory named \abox[araracolour]{arara} with the exact structure presented in Section~\ref{sec:directorystructure} in our working directory. Now we need to decide where \arara\ should reside in our system. For example, I usually deploy my tools inside the \abox[araracolour]{/opt/paulo} path, so I need to run the following command in the terminal (please note that my personal directory already has the proper permissions, so I do not need superuser privileges):
@@ -96,31 +92,31 @@ If the tool was built from source (as indicated in Section~\ref{sec:compilingthe
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ java -jar /opt/paulo/arara/arara.jar
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-arara 4.0 (revision 1)
-Copyright (c) 2012-2018, Paulo Roberto Massa Cereda
-All rights reserved
-
-usage: arara [file [--dry-run] [--log] [--verbose | --silent]
- [--timeout N] [--max-loops N] [--language L]
- [ --preamble P ] [--header] | --help | --version]
- -h,--help print the help message
- -H,--header extract directives only in the file header
- -l,--log generate a log output
- -L,--language <code> set the application language
- -m,--max-loops <number> set the maximum number of loops
- -n,--dry-run go through all the motions of running a
- command, but with no actual calls
- -p,--preamble <name> set the file preamble based on the
- configuration file
- -s,--silent hide the command output
- -t,--timeout <number> set the execution timeout (in milliseconds)
- -V,--version print the application version
- -v,--verbose print the command output
+Usage: arara [OPTIONS] [file]...
+
+Options:
+ -l, --log Generate a log output
+ -v, --verbose / -s, --silent Print the command output
+ -n, --dry-run Go through all the motions of running a
+ command, but with no actual calls
+ -H, --header Extract directives only in the file header
+ -t, --timeout INT Set the execution timeout (in milliseconds)
+ -L, --language TEXT Set the application language
+ -m, --max-loops INT Set the maximum number of loops (> 0)
+ -p, --preamble TEXT Set the file preamble based on the
+ configuration file
+ -d, --working-directory DIRECTORY
+ Set the working directory for all tools
+ -V, --version Show the version and exit
+ -h, --help Show this message and exit
+
+Arguments:
+ file The file(s) to evaluate and process
\end{codebox}
Please observe that, provided that the underlying operating system has an appropriate Java virtual machine installed, \arara\ can be used as a portable, standalone application. Portable applications can be stored on any data storage device, including external devices such as USB drives and floppy disks.
@@ -186,31 +182,31 @@ Regardless of the adopted approach, there should be an \rbox{arara} wrapper avai
\begin{codebox}{Terminal}{teal}{\icnote}{white}
$ arara
- __ _ _ __ __ _ _ __ __ _
+ __ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-arara 4.0 (revision 1)
-Copyright (c) 2012-2018, Paulo Roberto Massa Cereda
-All rights reserved
-
-usage: arara [file [--dry-run] [--log] [--verbose | --silent]
- [--timeout N] [--max-loops N] [--language L]
- [ --preamble P ] [--header] | --help | --version]
- -h,--help print the help message
- -H,--header extract directives only in the file header
- -l,--log generate a log output
- -L,--language <code> set the application language
- -m,--max-loops <number> set the maximum number of loops
- -n,--dry-run go through all the motions of running a
- command, but with no actual calls
- -p,--preamble <name> set the file preamble based on the
- configuration file
- -s,--silent hide the command output
- -t,--timeout <number> set the execution timeout (in milliseconds)
- -V,--version print the application version
- -v,--verbose print the command output
+Usage: arara [OPTIONS] [file]...
+
+Options:
+ -l, --log Generate a log output
+ -v, --verbose / -s, --silent Print the command output
+ -n, --dry-run Go through all the motions of running a
+ command, but with no actual calls
+ -H, --header Extract directives only in the file header
+ -t, --timeout INT Set the execution timeout (in milliseconds)
+ -L, --language TEXT Set the application language
+ -m, --max-loops INT Set the maximum number of loops (> 0)
+ -p, --preamble TEXT Set the file preamble based on the
+ configuration file
+ -d, --working-directory DIRECTORY
+ Set the working directory for all tools
+ -V, --version Show the version and exit
+ -h, --help Show this message and exit
+
+Arguments:
+ file The file(s) to evaluate and process
\end{codebox}
It is important to observe that the wrapper initiative presented in this section might cause a potential name clash with existing \TeX\ Live or MiK\TeX\ binaries and symbolic links. In this particular scenario, make sure to inspect the command location as a means to ensure a correct execution. To this end, run the following command in the terminal:
diff --git a/support/arara/doc/chapters/foreword.tex b/support/arara/doc/chapters/foreword.tex
deleted file mode 100644
index bbf5073c8a..0000000000
--- a/support/arara/doc/chapters/foreword.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-% !TeX root = ../arara-manual.tex
-\chapter*{Foreword}
-\label{chap:foreword}
-
-\epigraph{That deserves no less than a ``Holy guacamole!''.}{\textsc{Gonzalo Medina}}
-
-{\setlength{\parskip}{1em}
-Creating a PDF from \LaTeX\ code can be quite tiresome. Suppose I am using \TeX works and I have a document that has a bibliography, glossary and index, then I need to select the \rbox{pdflatex} tool and click on the typeset button, then select the \rbox{bibtex} tool and click on the typeset button, then select the \rbox{makeindex} tool and click on the typeset button, then select the \rbox{makeglossaries} tool (which I may need to add first) and click on the typeset button, then select the \rbox{pdflatex} tool and click on the typeset button, and once more to ensure all the cross-references are up to date. Then I edit the document and have to go through that whole process all over again!
-
-Automation makes life so much simpler. Instead of all those tools that I need to keep selecting, I just need one tool, in this case \arara, which will do all the necessary work for me behind the scenes.
-
-Some automation tools try to be clever, but there are invariably exceptions that trip them up. \arara\ does not try to be clever; it just does what it is told to do. The instructions are provided as special comments in the source code that \TeX\ ignores, but they are human-readable and can also provide a hint to non-\arara\ co-authors as to what tools are required in order to complete the document build.
-
-The new improved \arara\ version 4.0 now comes with some exciting features, such as the ability to use conditionals, and it definitely ranks as my favourite automation tool for document creation. Paulo has done a great job, and I would like to take this opportunity to thank
-him for his patience in dealing with my many feature requests!}
-
-\vfill
-
-\begin{flushright}
-Nicola Louise Cecilia Talbot\\
-\emph{on behalf of the \arara\ team}
-\end{flushright}
diff --git a/support/arara/doc/chapters/introduction.tex b/support/arara/doc/chapters/introduction.tex
index f064774c9a..11410ff6d3 100644
--- a/support/arara/doc/chapters/introduction.tex
+++ b/support/arara/doc/chapters/introduction.tex
@@ -33,7 +33,7 @@ $ arara hello.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'hello.tex' (size: 86 bytes, last modified: 05/03/2018
+Processing 'hello.tex' (size: 86 B, last modified: 05/03/2018
07:28:30), please wait.
It looks like no directives were found in the provided file. Make
@@ -68,7 +68,7 @@ $ arara hello.tex
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
-Processing 'hello.tex' (size: 86 bytes, last modified: 05/03/2018
+Processing 'hello.tex' (size: 86 B, last modified: 05/03/2018
07:28:30), please wait.
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
@@ -84,8 +84,7 @@ Hurrah, we finally got our document properly compiled with a \TeX\ engine by the
When adding a directive in our source code, we are explicitly telling the tool what we want it to do, but I am afraid that is not sufficient at all. So far, \arara\ knows \emph{what} to do, but now it needs to know \emph{how} the task should be done. If we want \arara\ to run \rbox{pdflatex} on \rbox{hello.tex}, we need to have instructions telling our tool how to run that specific application. This particular sequence of instructions is referred as a \emph{rule} in our context.
\begin{messagebox}{Note on rules}{attentioncolour}{\icattention}{black}
-Although the core team provides a lot of rules shipped with \arara\ out of the box, with the possibility of extending the set by adding more rules, some users might find this decision rather annoying, since other tools have most of their rules hard-coded, making the automation process even more transparent. However, since \arara\ does not rely on a specific automation or compilation scheme, it becomes more extensible. The use of directives in the source code make the automation steps more fluent, which allows the specification of complex workflows very easy.
-% "very easy" -> "much easier" perhaps?
+Although the core team provides a lot of rules shipped with \arara\ out of the box, with the possibility of extending the set by adding more rules, some users might find this decision rather annoying, since other tools have most of their rules hard-coded, making the automation process even more transparent. However, since \arara\ does not rely on a specific automation or compilation scheme, it becomes more extensible. The use of directives in the source code make the automation steps more fluent, which allows the specification of complex workflows much easier.
\end{messagebox}
Despite the inherited verbosity of automation steps not being suitable for small documents, \arara\ really shines when you have a document which needs full control of the automation process (for instance, a thesis or a manual). Complex workflows are easily tackled by our tool.
@@ -120,28 +119,18 @@ An \arara\ directive is usually defined in a line of its own, started with a com
Our example has one directive, referencing \rbox{pdflatex}. It is important to observe that the \rbox{pdflatex} identifier \emph{does not represent the command to be executed}, but \emph{the name of the rule associated with that directive}.
-\begin{messagebox}{New feature in version 4.0}{araracolour}{\icinfo}{white}
-\textbf{Multiline directives} -- Later on, in Section~\ref{sec:directives}, on page~\pageref{sec:directives}, we will discover that a directive can also span several lines in order to provide a better code organization. For now, let us assume a typical directive occupies only one line.
-\end{messagebox}
-
-Once \arara\ finds a directive, it will look for the associated \emph{rule}. In our example, it will look for a rule named \rbox{pdflatex} which will evidently run the \rbox{pdflatex} command line application. Rules are \gls{YAML} files named according to their identifiers followed by the \rbox{yaml} extension and follow a strict structure. This concept is covered in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
-
-\begin{messagebox}{New feature in version 4.0}{araracolour}{\icattention}{white}
-\textbf{\gls{REPL} workflow} -- \arara\ now employs a \gls{REPL} workflow for rules and directives. In previous versions, directives were extracted, their corresponding rules were analyzed, commands were built and added to a queue before any proper execution or evaluation. I decided to change this workflow, so now \arara\ evaluates each rule on demand, i.e, there is no \emph{a priori} checking. A rule will \emph{always} reflect the current state, including potential side effects from previous executed rules.
-\end{messagebox}
+Once \arara\ finds a directive, it will look for the associated \emph{rule}. In our example, it will look for a rule named \rbox{pdflatex} which will evidently run the \rbox{pdflatex} command line application. Rules are YAML files named according to their identifiers followed by the \rbox{yaml} extension and follow a strict structure. This concept is covered in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
Now, we have a queue of pairs $(\textit{directive}, \textit{rule})$ to process. For each pair, \arara\ will map the directive to its corresponding rule, evaluate it and run the proper command. The execution chain requires that command $i$ was successfully executed to then proceed to command $i+1$, and so forth. This is also by design: \arara\ will halt the execution if any of the commands in the queue had raised an error. How does one know if a command was successfully executed? \arara\ checks the corresponding \emph{exit status} available after a command execution. In general, a successful execution yields 0 as its exit status.
-\begin{messagebox}{New feature in version 4.0}{araracolour}{\icinfo}{white}
-\textbf{Custom exit status checking} -- In previous versions, there was no way of customizing the exit status checking of a command. A command was successful if, and only if, its resulting exit status was 0 and no other value. From now on, we can define any value, or even forget about it and make it always return a valid status regardless of execution (for instance, in a rule that always is successful -- see, for instance, the \rbox{clean} rule).
-\end{messagebox}
+In order to decide whether a command execution is successful, \arara\ relies on exit status checking. Typically, a command is successful if, and only if, its resulting exit status is 0 and no other value. However, we can define any value, or even forget about it and make it always return a valid status regardless of execution (for instance, in a rule that always is successful -- see, for instance, the \rbox{clean} rule).
That is pretty much how \arara\ works: directives in the source code are mapped to rules. These pairs are added to a queue. The queue is then executed and the status is reported. More details about the expansion process are presented in Chapter~\ref{chap:importantconcepts}, on page~\pageref{chap:importantconcepts}. In short, we teach \arara\ to do a task by providing a rule, and tell it to execute it through directives in the source code.
\section{Operating system remarks}
\label{sec:operatingsystemremarks}
-The application is written using the Java language, so \arara\ runs on top of a Java virtual machine, available on all the major operating systems~--~in some cases, you might need to install the proper virtual machine. We tried very hard to keep both code and libraries compatible with older virtual machines or from other vendors. Currently, \arara\ is known to run on Oracle's Java 5 to 10, and OpenJDK 5 to 10. We also have reports of users successfully using the tool with virtual machines provided by Azul Systems, so your mileage might vary greatly.
+The application is written using the Kotlin language (and some pieces of Java), so \arara\ runs on top of a Java virtual machine, available on all the major operating systems~--~in some cases, you might need to install the proper virtual machine. We tried very hard to keep both code and libraries compatible with older virtual machines or from other vendors. Currently, \arara\ is known to run on Oracle's Java 8 to 13, OpenJDK 8 to 13 and ZuluFX 8 and 11.
\begin{messagebox}{Outdated Java virtual machines}{attentioncolour}{\icerror}{black}
Dear reader, beware of outdated software, mainly Java virtual machines! Although \arara\ offers support for older virtual machines, try your best to keep your software updated as frequently as possible. The legacy support exists only for historical reasons, and also due to the sheer fact that we know some people that still runs \arara\ on very old hardware. If you are not in this particular scenario, get the latest virtual machine.
@@ -152,6 +141,6 @@ In Chapter~\ref{chap:buildingfromsource}, on page~\pageref{chap:buildingfromsour
\section{Support}
\label{sec:support}
-If you run into any issue with \arara, please let us know. We all have very active profiles in the \href{https://tex.stackexchange.com/}{\TeX\ community at StackExchange}, so just use the \rbox[araracolour]{arara} tag in your question and we will help you the best we can (also, take a look at their \href{https://tex.meta.stackexchange.com/q/1436}{starter guide}). We also have a \href{https://gitter.im/cereda/arara}{Gitter chat room}, in which we occasionally hang out. Also, if you think the report is worthy of an issue, open one in our \href{https://github.com/cereda/arara/issues}{GitHub repository}. And last, but not least, feel free to poke us by good old electronic mail (please try the other approaches first).
+If you run into any issue with \arara, please let us know. We all have very active profiles in the \href{https://tex.stackexchange.com/}{\TeX\ community at StackExchange}, so just use the \rbox[araracolour]{arara} tag in your question and we will help you the best we can (also, take a look at their \href{https://tex.meta.stackexchange.com/q/1436}{starter guide}). We also have a \href{https://gitter.im/cereda/arara}{Gitter chat room}, in which we occasionally hang out. Also, if you think the report is worthy of an issue, open one in our \href{https://gitlab.com/islandoftex/arara/issues}{GitLab repository}.
We really hope you like our humble contribution to the \TeX\ community. Let \arara\ enhance your \TeX\ experience, it will help you when you will need it the most. Enjoy the manual.
diff --git a/support/arara/doc/chapters/license.tex b/support/arara/doc/chapters/license.tex
index 94d8a50819..aab456ebe2 100644
--- a/support/arara/doc/chapters/license.tex
+++ b/support/arara/doc/chapters/license.tex
@@ -12,7 +12,7 @@
\footnotesize
\includegraphics[scale=0.25]{logos/logo1.pdf}
-Copyright \textcopyright\ 2012--2018, Paulo Roberto Massa Cereda\\
+Copyright \textcopyright\ 2012--2020, Island of \TeX\\
All rights reserved.
\vspace{1em}
diff --git a/support/arara/doc/chapters/logging.tex b/support/arara/doc/chapters/logging.tex
index e13c6e314c..5309cee318 100644
--- a/support/arara/doc/chapters/logging.tex
+++ b/support/arara/doc/chapters/logging.tex
@@ -16,12 +16,14 @@ When running our tool on the previous example with the \opbox{{-}log} command li
\section{System information}
\label{sec:systeminformation}
-The very first entry to appear in the log file is the current version of \arara\ followed by a revision number. The revision number acts as a counter for the last review on the major version. The counter starts at 1 to denote the first release in the version 4.0 series. The revision number is also important to indicate possible new features introduced later on, in the application.
+The very first entry to appear in the log file is the current version of \arara.
\begin{codebox}{Log file}{teal}{\icnote}{white}
-Welcome to arara 4.0 (revision 1)!
+Welcome to arara 5.0.0!
\end{codebox}
+% TODO: review what will be output in the future
+
The following entries in the log file are the absolute path of the current deployment of \arara\ (line 1), details about the current Java virtual machine (namely, vendor and absolute path, in lines 2 and 3, respectively), the underlying operating system information (namely, system name, architecture and eventually the kernel version, in line 4), home and working directories (lines 5 and 6, respectively), and the absolute path of the applied configuration file, if any (line 7). This block is very important to help with tracking possible issues related to the underlying operating system and the tool configuration itself.
\begin{codebox}{Log file}{teal}{\icnote}{white}
@@ -30,13 +32,12 @@ The following entries in the log file are the absolute path of the current deplo
::: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-4.b10.fc28.x86_64/jre
::: Linux, amd64, 4.16.12-300.fc28.x86_64
::: user.home @ /home/paulo
-::: user.dir @ /home/paulo/Documents
::: CF @ [none]
\end{codebox}
\begin{messagebox}{A privacy note}{araracolour}{\icok}{white}
\setlength{\parskip}{1em}
-I understand that the previous entries containing information about the underlying operating system might pose as a privacy threat to some users. However, it is worth noting that \arara\ does not share any sensitive information about your system, as entries are listed in the log file for debugging purposes only, locally in your computer.
+We understand that the previous entries containing information about the underlying operating system might pose as a privacy threat to some users. However, it is worth noting that \arara\ does not share any sensitive information about your system, as entries are listed in the log file for debugging purposes only, locally in your computer.
From experience, these entries greatly help our users to track down errors in the execution, as well as learning more about the underlying operating system. However, be mindful of sharing your log file! Since the log file contains structured blocks, it is highly advisable to selectively choose the ones relevant to the current discussion.
\end{messagebox}
@@ -49,7 +50,7 @@ It is important to observe that localized messages are also applied to the log f
The following block in the log file refers to file information and directive extraction. First, as with the terminal output counterpart, the tool will display details about the file being processed, including size and modification status:
\begin{codebox}{Log file}{teal}{\icnote}{white}
-Processing 'doc12.tex' (size: 74 bytes, last modified:
+Processing 'doc12.tex' (size: 74 B, last modified:
06/02/2018 05:36:40), please wait.
\end{codebox}
@@ -98,7 +99,7 @@ Note, however, that potential errors in directive conditionals, as well as simil
\section{Rule interpretation}
\label{sec:ruleinterpretation}
-Once all directives are normalized, \arara\ proceeds to interpret the potential conditionals, if any, and the corresponding rules. Note that, when available, the conditional type dictates whether the rule should be interpreted first or not. For each rule, the tool informs the identifier and the absolute path of the corresponding \gls{YAML} file. In this specific scenario, the rule is part of the default rule pack released with our tool:
+Once all directives are normalized, \arara\ proceeds to interpret the potential conditionals, if any, and the corresponding rules. Note that, when available, the conditional type dictates whether the rule should be interpreted first or not. For each rule, the tool informs the identifier and the absolute path of the corresponding YAML file. In this specific scenario, the rule is part of the default rule pack released with our tool:
\begin{codebox}{Log file}{teal}{\icnote}{white}
I am ready to interpret rule 'pdftex'.
diff --git a/support/arara/doc/chapters/methods.tex b/support/arara/doc/chapters/methods.tex
index b8cca6a5f3..dd6da67902 100644
--- a/support/arara/doc/chapters/methods.tex
+++ b/support/arara/doc/chapters/methods.tex
@@ -2,10 +2,10 @@
\chapter{Methods}
\label{chap:methods}
-\arara\ features several helper methods available in directive conditional and rule contexts which provide interesting features for enhancing the user experience, as well as improving the automation itself. This chapter provides a list of such methods. It is important to observe that virtually all classes from the Java runtime environment can be used within \gls{MVEL} expressions, so your mileage might vary.
+\arara\ features several helper methods available in directive conditional and rule contexts which provide interesting features for enhancing the user experience, as well as improving the automation itself. This chapter provides a list of such methods. It is important to observe that virtually all classes from the Java runtime environment can be used within MVEL expressions, so your mileage might vary.
\begin{messagebox}{A note on writing code}{araracolour}{\icok}{white}
-As seen in Chapter~\ref{chap:mvel}, on page~\pageref{chap:mvel}, Java and \gls{MVEL} code be used interchangeably within expressions and \glspl{orb-tag}, including instantiation of classes into objects and invocation of methods. However, be mindful of explicitly importing Java packages and classes through the classic \rbox{import} statement, as \gls{MVEL} does not automatically handle imports, or an exception will surely be raised. Alternatively, you can provide the full qualified name to classes as well.
+As seen in Chapter~\ref{chap:mvel}, on page~\pageref{chap:mvel}, Java and MVEL code be used interchangeably within expressions and orb tags, including instantiation of classes into objects and invocation of methods. However, be mindful of explicitly importing Java packages and classes through the classic \rbox{import} statement, as MVEL does not automatically handle imports, or an exception will surely be raised. Alternatively, you can provide the full qualified name to classes as well.
\end{messagebox}
Methods are listed with their complete signatures, including potential parameters and corresponding types. Also, the return type of a method is denoted by \rrbox{type} and refers to a typical Java data type (either class or primitive). Do not worry too much, as there are illustrative examples. A method available in the directive conditional context will be marked by \ctbox{C} next to the corresponding signature. Similarly, an entry marked by \ctbox{R} denotes that the corresponding method is available in the rule context.
@@ -34,7 +34,7 @@ if (reference.equals(getOriginalFile())) {
}
\end{codebox}
-\item[\mddbox{C}{R}{currentFile()}{File}] This method returns the file reference, as a \rbox{File} object, for the current directive. It is important to observe that, from version 4.0 on, \arara\ replicates the directive when the special \abox{files} parameter is detected amongst the parameters, so each instance will have a different reference.
+\item[\mddbox{C}{R}{currentFile()}{File}] This method returns the file reference, as a \rbox{File} object, for the current directive. It is important to observe that \arara\ replicates the directive when the special \abox{files} parameter is detected amongst the parameters, so each instance will have a different reference.
\begin{codebox}{Example}{teal}{\icnote}{white}
% arara: pdflatex if currentFile().getName() == 'thesis.tex'
@@ -46,30 +46,18 @@ if (reference.equals(getOriginalFile())) {
f = toFile('thesis.tex');
\end{codebox}
-\item[\mdbox{R}{getBasename(File file)}{String}] This method returns the base name (i.e, the name without the associated extension) of the provided \rbox{File} reference, as a string. Observe that this method ignores a potential path reference when extracting the base name. For a complete base name extraction with full path support, please refer to the \mtbox{getFullBasename} methods. Also, this method will throw an exception if the provided reference is not a proper file.
+\item[\mdbox{R}{getBasename(File file)}{String}] This method returns the base name (i.e, the name without the associated extension) of the provided \rbox{File} reference, as a string. Observe that this method ignores a potential path reference when extracting the base name. Also, this method will throw an exception if the provided reference is not a proper file.
\begin{codebox}{Example}{teal}{\icnote}{white}
basename = getBasename(toFile('thesis.tex'));
\end{codebox}
-\item[\mdbox{R}{getBasename(String reference)}{String}] This method returns the base name (i.e, the name without the associated extension) of the provided \rbox{String} reference, as a string. Observe that this method ignores a potential path reference when extracting the base name. For a complete base name extraction with full path support, please refer to the \mtbox{getFullBasename} methods.
+\item[\mdbox{R}{getBasename(String reference)}{String}] This method returns the base name (i.e, the name without the associated extension) of the provided \rbox{String} reference, as a string. Observe that this method ignores a potential path reference when extracting the base name.
\begin{codebox}{Example}{teal}{\icnote}{white}
basename = getBasename('thesis.tex');
\end{codebox}
-\item[\mdbox{R}{getFullBasename(File file)}{String}] This method returns the full base name (i.e, the name without the associated extension, as well as the potential path reference) of the provided \rbox{File} reference, as a string. This method will throw an exception if the provided reference is not a proper file.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-basename = getFullBasename(toFile('/home/paulo/thesis.tex'));
-\end{codebox}
-
-\item[\mdbox{R}{getFullBasename(String reference)}{String}] This method returns the full base name (i.e, the name without the associated extension, as well as the potential path reference) of the provided \rbox{String} reference, as a string. As the path discovery requires an underlying file conversion, this method will throw an exception if the provided reference is not a proper file.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-basename = getFullBasename('/home/paulo/thesis.tex');
-\end{codebox}
-
\item[\mdbox{R}{getFiletype(File file)}{String}] This method returns the file type (i.e, the associated extension specified as a suffix to the name, typically delimited with a full stop) of the provided \rbox{File} reference, as a string. This method will throw an exception if the provided reference is not a proper file. An empty string is returned if, and only if, the provided file name has no associated extension.
\begin{codebox}{Example}{teal}{\icnote}{white}
@@ -106,7 +94,7 @@ extension = getFiletype('thesis.pdf');
% arara: pdftex if missing('pdf')
\end{codebox}
-\item[\mddbox{C}{R}{changed(File file)}{boolean}] This method returns a boolean value according to whether the provided \rbox{File} reference has changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a \gls{XML} database file named \rbox{arara.xml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
+\item[\mddbox{C}{R}{changed(File file)}{boolean}] This method returns a boolean value according to whether the provided \rbox{File} reference has changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a YAML database file named \rbox{arara.yaml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
\vspace{1em}
@@ -135,14 +123,14 @@ It is important to observe that this method \emph{always} performs a database op
\end{codebox}
\begin{messagebox}{Short-circuit evaluation}{araracolour}{\icok}{white}
-According to the \href{https://en.wikipedia.org/wiki/Short-circuit_evaluation}{Wikipedia entry}, a \emph{short-circuit evaluation} is the semantics of some boolean operators in some programming languages in which the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression. In Java (and consequently \gls{MVEL}), both short-circuit and standard boolean operators are available.
+According to the \href{https://en.wikipedia.org/wiki/Short-circuit_evaluation}{Wikipedia entry}, a \emph{short-circuit evaluation} is the semantics of some boolean operators in some programming languages in which the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression. In Java (and consequently MVEL), both short-circuit and standard boolean operators are available.
\end{messagebox}
\begin{messagebox}{CRC as a hashing algorithm}{attentioncolour}{\icattention}{black}
\arara\ internally relies on a CRC32 implementation for file hashing. This particular choice, although not designed for hashing, offers an interesting trade-off between speed and quality. Besides, since it is not computationally expensive as strong algorithms such as MD5 and SHA1, CRC32 can be used for hashing typical \TeX\ documents and plain text files with little to no collisions.
\end{messagebox}
-\item[\mddbox{C}{R}{changed(String extension)}{boolean}] This method returns a boolean value according to whether the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the provided \rbox{String} extension has changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a \gls{XML} database file named \rbox{arara.xml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
+\item[\mddbox{C}{R}{changed(String extension)}{boolean}] This method returns a boolean value according to whether the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the provided \rbox{String} extension has changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a YAML database file named \rbox{arara.yaml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
\vspace{1em}
@@ -170,7 +158,7 @@ It is important to observe that this method \emph{always} performs a database op
% arara: pdflatex if changed('tex')
\end{codebox}
-\item[\mddbox{C}{R}{unchanged(File file)}{boolean}] This method returns a boolean value according to whether the provided \rbox{File} reference has not changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a \gls{XML} database file named \rbox{arara.xml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
+\item[\mddbox{C}{R}{unchanged(File file)}{boolean}] This method returns a boolean value according to whether the provided \rbox{File} reference has not changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a YAML database file named \rbox{arara.yaml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
\vspace{1em}
@@ -198,7 +186,7 @@ It is important to observe that this method \emph{always} performs a database op
% arara: pdflatex if !unchanged(toFile('thesis.tex'))
\end{codebox}
-\item[\mddbox{C}{R}{unchanged(String extension)}{boolean}] This method returns a boolean value according to whether the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the provided \rbox{String} extension has not changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a \gls{XML} database file named \rbox{arara.xml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
+\item[\mddbox{C}{R}{unchanged(String extension)}{boolean}] This method returns a boolean value according to whether the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the provided \rbox{String} extension has not changed since last verification, based on a traditional cyclic redundancy check. The file reference, as well as the associated hash, is stored in a YAML database file named \rbox{arara.yaml} located in the same directory as the current file (the database name can be overridden in the configuration file, as discussed in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}). The method semantics (including the return values) is presented as follows.
\vspace{1em}
@@ -333,7 +321,7 @@ This section introduces methods related to conditional flow based on \emph{natur
\vspace{1.4em}
-All elements from the provided set of natural boolean values can be used interchangeably in directive parameters. It is important to observe that, from version 4.0 on, \arara\ throws an exception if a value absent from the set is provided to the methods described in this section.
+All elements from the provided set of natural boolean values can be used interchangeably in directive parameters. It is important to observe that \arara\ throws an exception if a value absent from the set is provided to the methods described in this section.
\begin{description}
\item[\mdbox{R}{isTrue(String string)}{boolean}] This method returns a boolean value according to whether the provided \rbox{String} value is contained in the sub-set of natural true boolean values. It is worth mentioning that the verification is case insensitive, i.e, upper case and lower case symbols are treated as equivalent. If the provided value is an empty string, the method returns false.
@@ -465,12 +453,6 @@ result = buildString('a', 'b', 'c', 'd');
result = trimSpaces(' hello world ');
\end{codebox}
-\item[\mdbox{R}{addQuotes(String string)}{String}] This method returns the provided parameter enclosed in double quotes, as a plain string. It is important to observe that there is no automatic quote handling.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-result = addQuotes('to be or not to be');
-\end{codebox}
-
\item[\mdbox{R}{replicatePattern(String pattern, List<Object> values)}{List<Object>}] This method replicates the provided pattern to each element of the second parameter and returns the resulting list. The pattern must contain exactly one placeholder. For instance, \rbox{\%s} denotes a string representation of the provided argument. Please refer to the \rbox{Formatter} class reference in the \href{https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html}{Java documentation} for more information on placeholders. This method raises an exception if an invalid pattern is applied.
\begin{codebox}{Example}{teal}{\icnote}{white}
@@ -523,30 +505,6 @@ if (isMac()) { System.out.println('Running Mac OS.'); }
if (isUnix()) { System.out.println('Running Unix.'); }
\end{codebox}
-\item[\mdbox{R}{isAIX()}{boolean}] This method returns a boolean value according to whether the underlying operating system vendor is IBM AIX.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-if (isAIX()) { System.out.println('Running AIX.'); }
-\end{codebox}
-
-\item[\mdbox{R}{isIrix()}{boolean}] This method returns a boolean value according to whether the underlying operating system vendor is Silicon Graphics Irix.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-if (isIrix()) { System.out.println('Running Irix.'); }
-\end{codebox}
-
-\item[\mdbox{R}{isOS2()}{boolean}] This method returns a boolean value according to whether the underlying operating system vendor is IBM OS/2 Warp.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-if (isOS2()) { System.out.println('Running OS/2 Warp.'); }
-\end{codebox}
-
-\item[\mdbox{R}{isSolaris()}{boolean}] This method returns a boolean value according to whether the underlying operating system vendor is Oracle Solaris.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-if (isSolaris()) { System.out.println('Running Solaris.'); }
-\end{codebox}
-
\item[\mdbox{R}{isCygwin()}{boolean}] This method returns a boolean value according to whether the underlying operating system vendor is Microsoft Windows and \arara\ is being executed inside a Cygwin environment.
\begin{codebox}{Example}{teal}{\icnote}{white}
@@ -577,30 +535,6 @@ command = isMac('ls', 'dir');
command = isUnix('tree', 'dir');
\end{codebox}
-\item[\mdbox{R}{isAIX(Object yes, Object no)}{Object}] This method checks if the underlying operating system vendor is IBM AIX. If the result holds true, the first parameter is returned. Otherwise, the second parameter is returned.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-command = isAIX('pwd', 'ls');
-\end{codebox}
-
-\item[\mdbox{R}{isIrix(Object yes, Object no)}{Object}] This method checks if the underlying operating system vendor is Silicon Graphics Irix. If the result holds true, the first parameter is returned. Otherwise, the second parameter is returned.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-command = isIrix('ls', 'pwd');
-\end{codebox}
-
-\item[\mdbox{R}{isOS2(Object yes, Object no)}{Object}] This method checks if the underlying operating system vendor is IBM OS/2 Warp. If the result holds true, the first parameter is returned. Otherwise, the second parameter is returned.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-command = isOS2('ls', 'cd');
-\end{codebox}
-
-\item[\mdbox{R}{isSolaris(Object yes, Object no)}{Object}] This method checks if the underlying operating system vendor is Oracle Solaris. If the result holds true, the first parameter is returned. Otherwise, the second parameter is returned.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-command = isSolaris('ls', 'cat');
-\end{codebox}
-
\item[\mdbox{R}{isCygwin(Object yes, Object no)}{Object}] This method checks if the underlying operating system vendor is Microsoft Windows and if \arara\ is being executed inside a Cygwin environment. If the result holds true, the first parameter is returned. Otherwise, the second parameter is returned.
\begin{codebox}{Example}{teal}{\icnote}{white}
@@ -652,15 +586,15 @@ The methods presented in this section cover the most common types used in direct
\section{Classes and objects}
\label{sec:classesandobjects}
-From version 4.0 on, \arara\ can be extended at runtime with code from \gls{JVM} languages, such as Groovy, Scala, Clojure and Kotlin. The tool can load classes from \rbox{class} and \rbox{jar} files and even instantiate them. This section introduces methods related to class loading and object instantiation.
+\arara\ can be extended at runtime with code from JVM languages, such as Groovy, Scala, Clojure and Kotlin. The tool can load classes from \rbox{class} and \rbox{jar} files and even instantiate them. This section introduces methods related to class loading and object instantiation.
\begin{messagebox}{Ordered pairs}{araracolour}{\icok}{white}
According to the \href{https://en.wikipedia.org/wiki/Ordered_pair}{Wikipedia entry}, in mathematics, an \emph{ordered pair} $(a, b)$ is a pair of objects. The order in which the objects appear in the pair is significant: the ordered pair $(a, b)$ is different from the ordered pair $(b, a)$ unless $a = b$. In the ordered pair $(a, b)$, the object $a$ is called the \emph{first} entry, and the object $b$ the \emph{second} entry of the pair. \arara\ relies on this concept with the helper \rbox{Pair<A, B>} class, in which \rbox{A} and \rbox{B} denote the component classes, i.e, the types associated to the pair elements. In order to access the pair entries, the class provides two methods:
\begin{description}
-\item[\mtbox{first()}\hfill\rrbox{A}] This method, as the name implies, returns the first entry of the ordered pair, as an \rbox{A} object. It is important to observe that, from the \gls{MVEL} context, as the method constitutes a property accessor (namely, a getter), the parentheses can be safely omitted.
+\item[\mtbox{first()}\hfill\rrbox{A}] This method, as the name implies, returns the first entry of the ordered pair, as an \rbox{A} object. It is important to observe that, from the MVEL context, as the method constitutes a property accessor (namely, a getter), the parentheses can be safely omitted.
-\item[\mtbox{second()}\hfill\rrbox{B}] This method, as the name implies, returns the second entry of the ordered pair, as a \rbox{B} object. It is important to observe that, from the \gls{MVEL} context, as the method constitutes a property accessor (namely, a getter), the parentheses can be safely omitted.
+\item[\mtbox{second()}\hfill\rrbox{B}] This method, as the name implies, returns the second entry of the ordered pair, as a \rbox{B} object. It is important to observe that, from the MVEL context, as the method constitutes a property accessor (namely, a getter), the parentheses can be safely omitted.
\end{description}
Keep in mind that the entries in the \rbox{Pair} class, once defined, cannot be modified to other values. The initial values are set during instantiation and, therefore, only entry getters are available to the user during the object life cycle.
@@ -827,7 +761,7 @@ This method shows a dialog box according to the provided parameters, including o
\end{codebox}
\begin{messagebox}{Swing toolkit}{araracolour}{\icok}{white}
-According to the \href{https://en.wikipedia.org/wiki/Swing_(Java)}{Wikipedia entry}, the Swing toolkit was developed to provide a more sophisticated set of \gls{GUI} components than the earlier AWT widget system. Swing provides a look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform. It has more powerful and flexible components than AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides several advanced components, such as scroll panes, trees, tables, and lists.
+According to the \href{https://en.wikipedia.org/wiki/Swing_(Java)}{Wikipedia entry}, the Swing toolkit was developed to provide a more sophisticated set of GUI components than the earlier AWT widget system. Swing provides a look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform. It has more powerful and flexible components than AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides several advanced components, such as scroll panes, trees, tables, and lists.
\end{messagebox}
\item[\mddbox{C}{R}{showInput(int width, int icon, String title, String text)}{String}]\uimethod{inputbox1}
@@ -851,10 +785,10 @@ This method shows an input dialog box according to the provided parameters. The
The UI methods presented in this section can be used for writing \TeX\ tutorials and assisted compilation workflows based on user interactions, including visual input and feedback through dialog boxes.
-\section{Commands and triggers}
-\label{sec:commandsandtriggers}
+\section{Commands}
+\label{sec:commands}
-From version 4.0 on, \arara\ features the \rbox{Command} object, a new approach for handling system commands based on a high level structure with explicit argument parsing. Similarly, there is also the mystical \rbox{Trigger} object that constitutes a very special command that changes the inner workings of our tool at runtime. This section introduces methods for generating such objects.
+\arara\ features the \rbox{Command} object, a new approach for handling system commands based on a high level structure with explicit argument parsing.
\begin{messagebox}{The anatomy of a command}{araracolour}{\icok}{white}
\setlength{\parskip}{1em}
@@ -894,28 +828,6 @@ Note that the above list of integers contains nested lists. When applying list f
List flattening and string mapping confer expressiveness and flexibility to the \rbox{Command} object construction, as users can virtually use any data type to describe the underlying rule logic and yet obtain a consistent representation.
-\begin{messagebox}{The anatomy of a trigger}{araracolour}{\icok}{white}
-\setlength{\parskip}{1em}
-A \rbox{Trigger} object constitutes a special command that changes the internal workings of \arara\ at runtime. It is a highly experimental feature. A trigger is basically a function call defined in terms of a \rbox{String} reference representing the actual function name followed by an optional list of \rbox{Object} arguments. For instance, consider this hypothetical trigger that multiplies an arbitrary number of integer terms:
-
-{\centering
-\setlength\tabcolsep{0.2em}
-\begin{tabular}{cccc}
-{\footnotesize\em name} &
-\multicolumn{3}{c}{\footnotesize\em list of arguments} \\
-\rbox[cyan]{multiply} &
-\rbox[araracolour]{\hphantom{w}12\hphantom{w}} &
-\rbox[araracolour]{\hphantom{w}34\hphantom{w}} &
-\rbox[araracolour]{\hphantom{w}65\hphantom{w}}
-\end{tabular}\par}
-
-\vspace{0.4em}
-
-This description is, in some aspects, very much like a typical \rbox{Command} construction. However, a trigger is less forgiving on data types and does not apply transformations on the provided list of arguments. Therefore, the argument types \emph{must match} the trigger signature.
-
-So far, the tool provides only one trigger, seen in action in one of the official rules, under the name \rbox{halt} and with no parameters. This particular trigger halts the current interpretation workflow, such that subsequent directives are ignored. We have not worked much on triggers yet, and the concept is mentioned here for documentation purposes only.
-\end{messagebox}
-
\begin{description}
\item[\mdbox{R}{getCommand(List<String> elements)}{Command}] This method, as the name implies, returns a \rbox{Command} object according to the provided list of \rbox{String} elements. If the list is empty, the tool will ignore the execution.
@@ -929,18 +841,6 @@ return getCommand([ 'ls', '-l' ]);
return getCommand('pdflatex', '--shell-escape', 'thesis.tex');
\end{codebox}
-\item[\mdbox{R}{getTrigger(String name)}{Trigger}] This method, as the name implies, returns a \rbox{Trigger} object according to the provided \rbox{String} reference as function name. It is important to observe that this particular trigger instance does not have parameters.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-return getTrigger('halt');
-\end{codebox}
-
-\item[\mdbox{R}{getTrigger(String name, Object... parameters)}{Trigger}] This method, as the name implies, returns a proper \rbox{Trigger} object according to the provided \rbox{String} reference as function name and the \rbox{Object} array as associated parameters. Note that the object array is denoted by a comma-separated sequence of elements in the actual method call, resulting in a variable number of parameters.
-
-\begin{codebox}{Example}{teal}{\icnote}{white}
-return getTrigger('multiply', 12, 34, 65);
-\end{codebox}
-
\item[\mdbox{R}{\parbox{0.62\textwidth}{getCommandWithWorkingDirectory(File directory,\\\hspace*{1em} List<String> elements)}}{Command}] This method, as the name implies, sets the working directory based on the provided \rbox{File} reference and returns a proper \rbox{Command} object according to the provided list of \rbox{String} elements. If the list is empty, the tool will ignore the execution.
\begin{codebox}{Example}{teal}{\icnote}{white}
@@ -978,16 +878,16 @@ The methods presented in this section constitute the foundations of underlying s
This section introduces assorted methods provided by \arara\ as a means to improve the automation itself with expressive rules and enhance the user experience. Such methods are properly described as follows.
\begin{messagebox}{Session}{araracolour}{\icok}{white}
-Rules are designed under the \emph{encapsulation} notion, such that the direct access to internal workings of such structures is restricted. However, as a means to support framework awareness, \arara\ provides a mechanism for data sharing across rule contexts, implemented as a \rbox{Session} object. In practical terms, this particular object is a global, persistent map composed of \rbox{String} keys and \rbox{Object} values available throughout the entire execution. The public methods are described as follows:
+Rules are designed under the \emph{encapsulation} notion, such that the direct access to internal workings of such structures is restricted. However, as a means to support framework awareness, \arara\ provides a mechanism for data sharing across rule contexts, implemented as a \rbox{Session} object. In practical terms, this particular object is a global, persistent map composed of \rbox{String} keys and \rbox{Object} values available throughout the entire execution. The public methods of a session are described as follows:
\begin{description}
-\item[\mtbox{insert(String key, Object value)}\hfill\rrbox{void}] This method, as the name implies, inserts an object into the session, indexed by the provided key. Observe that, if the session previously contained a mapping for the provided key, the old value is replaced by the specified value.
+\item[\mtbox{put(String key, Object value)}\hfill\rrbox{void}] This method, as the name implies, inserts an object into the session, indexed by the provided key. Observe that, if the session previously contained a mapping for the provided key, the old value is replaced by the specified value.
\item[\mtbox{remove(String key)}\hfill\rrbox{void}] This method, as the name implies, removes the mapping for the provided key from the session. Be mindful that an attempt to remove a mapping for a nonexistent key will raise an exception.
-\item[\mtbox{exists(String key)}\hfill\rrbox{boolean}] This method, as the name implies, returns a boolean value according to whether the session contains a mapping for the provided key. It is highly advisable to use this method before attempting to remove a mapping from the session.
+\item[\mtbox{contains(String key)}\hfill\rrbox{boolean}] This method, as the name implies, returns a boolean value according to whether the session contains a mapping for the provided key. It is highly advisable to use this method before attempting to remove a mapping from the session.
-\item[\mtbox{obtain(String key)}\hfill\rrbox{Object}] This method, as the name implies, returns the object value to which the specified key is mapped. Be mindful that an attempt to return a value for a nonexistent key will raise an exception.
+\item[\mtbox{get(String key)}\hfill\rrbox{Object}] This method, as the name implies, returns the object value to which the specified key is mapped. Be mindful that an attempt to return a value for a nonexistent key will raise an exception.
\item[\mtbox{forget()}\hfill\rrbox{void}] This method, as the name implies, removes all of the existing mappings from the session. The session object will be effectively empty after this call returns.
\end{description}
@@ -999,7 +899,7 @@ It is important to observe that the \rbox{Session} object provided by our tool f
\item[\mdbox{R}{getSession()}{Session}] This method, as the name implies, returns the \rbox{Session} object for data sharing across rule contexts. Keep in mind that a session cannot contain duplicate keys. Each key can map to at most one value.
\begin{codebox}{Example}{teal}{\icnote}{white}
-name = getSession().obtain('name');
+name = getSession().get('name');
\end{codebox}
\item[\mdbox{R}{throwError(String message)}{void}] This method deliberately throws an error to be intercepted later on during execution. Consider using such method for an explicit notification about unexpected or unsought scenarios, e.g, wrong parameter types or values. The raised error has an associated message which is displayed in the terminal and added to the log file.
@@ -1033,6 +933,10 @@ According to the \href{https://en.wikipedia.org/wiki/PATH_(variable)}{Wikipedia
result = unsafelyExecuteSystemCommand(getCommand('ls'));
\end{codebox}
+\begin{messagebox}{Important change in version 5.0}{araracolour}{\icattention}{white}
+\textbf{Working directory support} -- \arara\ now executes commands obtained from \rbox{getCommandWithWorkingDirectory} correctly. Previously, the working directory got silently ignored. This makes \arara\ even more powerful but we decided to change this for the sake of consistency.
+\end{messagebox}
+
\begin{messagebox}{Hic sunt leones}{attentioncolour}{\icattention}{black}
Please \emph{do not abuse} this method! Keep in mind that this particular feature is included for very specific scenarios in which the command streams are needed ahead of time for proper decision making.
\end{messagebox}
@@ -1042,25 +946,20 @@ Please \emph{do not abuse} this method! Keep in mind that this particular featur
\begin{codebox}{Example}{teal}{\icnote}{white}
valid = isSubdirectory(toFile('chapters/'));
\end{codebox}
+\end{description}
-\item[\mdbox{R}{\parbox{0.62\textwidth}{mergeVelocityTemplate(File input, File output,\\\hspace*{1em} Map<String, Object> map)}}{void}] This method, as the name implies, merges the provided \rbox{File} template reference written in the Velocity Template Language 1.7 specification with the \rbox{Map} data object in order to produce a corresponding \rbox{File} output. It is important to observe that this method will raise an exception if the provided input file does not exist or if there is an error with the underlying template language.
-
-\begin{ncodebox}{Source file}{teal}{\icnote}{white}{input.txt}
-Hello, my name is ${name} and
-I am from ${country}!
-\end{ncodebox}
+\begin{messagebox}{Flags and reserved storage in a session}{araracolour}{\icok}{white}
+Within a session there are two ``reserved'' namespaces: \verb|arara| and \verb|environment|. The latter is quite intuitive: \arara\ will store the current state of the systems environment variables in its session. You may alter these values in the session storage but they will not be written back to the system configuration. To access an environment variable, you can use its usual name prefixed by \verb|environment:|.
\begin{codebox}{Example}{teal}{\icnote}{white}
-mergeVelocityTemplate(toFile('input.txt'), toFile('output.txt'),
- [ 'name' : 'Paulo', 'country' : 'Brazil' ])
+path = getSession().get('environment:PATH');
\end{codebox}
-\begin{messagebox}{Velocity Template Language 1.7}{attentioncolour}{\icattention}{black}
-\setlength{\parskip}{1em}
-As of 2017, the Apache Foundation has released the new 2.0 version for the Velocity Template Language. However, this particular version introduces behavioural and syntactic changes that may cause problems with older versions.
+The \verb|arara| namespace is a bit different. It provides flags that control \arara s behaviour. Flags are used in rules and may be manipulated by the user. Be aware, that every change in this namespace will result in \arara\ acting like you know what you did. Use this power with care. Currently, there is only one relevant flag: \verb|arara:FILENAME:halt|. This will stop the currently run command execution on the file with the specified file name. The value of this map entry is the exit status you want \arara\ to have.
-In order to maintain compatibility with older Java virtual machines, \arara\ works with the \href{http://velocity.apache.org/engine/1.7/vtl-reference.html}{VTL 1.7 specification}, so it is highly recommended to strictly adhere to this reference when writing templates for the corresponding method or the official \rbox{velocity} rule.
+\begin{codebox}{Example}{teal}{\icnote}{white}
+path = getSession().put('arara:myfile.tex:halt', 42);
+\end{codebox}
\end{messagebox}
-\end{description}
The methods presented in this section provide interesting features for persistent data sharing, error handling, early command execution, and templating. It is important to note that more classes, objects and methods can be incorporated into \arara\ through class loading and object instantiation, extending the features and enhancing the overall user experience.
diff --git a/support/arara/doc/chapters/mvel.tex b/support/arara/doc/chapters/mvel.tex
index 7dd9564576..4ccca9b814 100644
--- a/support/arara/doc/chapters/mvel.tex
+++ b/support/arara/doc/chapters/mvel.tex
@@ -2,7 +2,7 @@
\chapter{MVEL}
\label{chap:mvel}
-According to the \href{https://en.wikipedia.org/wiki/MVEL}{Wikipedia entry}, the MVFLEX Expression Language (hereafter referred as \gls{MVEL}) is a hybrid, dynamic, statically typed, embeddable expression language and runtime for the Java platform. Originally started as a utility language for an application framework, the project is now developed completely independently. \arara\ relies on this scripting language in two circumstances:
+According to the \href{https://en.wikipedia.org/wiki/MVEL}{Wikipedia entry}, the MVFLEX Expression Language (hereafter referred as MVEL) is a hybrid, dynamic, statically typed, embeddable expression language and runtime for the Java platform. Originally started as a utility language for an application framework, the project is now developed completely independently. \arara\ relies on this scripting language in two circumstances:
\begin{enumerate}
\item\emph{Rules}, as nominal attributes gathered from directives are used to build complex command invocations and additional computations. A rule follows a very strict model, detailed in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
@@ -10,7 +10,7 @@ According to the \href{https://en.wikipedia.org/wiki/MVEL}{Wikipedia entry}, the
\item\emph{Conditionals}, as logical expressions must be evaluated in order to decide whether and how a directive should be interpreted. Conditionals are detailed in Section~\ref{sec:directives}, on page~\pageref{sec:directives}.
\end{enumerate}
-This chapter only covers the relevant parts of the \gls{MVEL} language for a consistent use with \arara. For advanced topics, I highly recommend the official language guide for \gls{MVEL} 2.0, available online.
+This chapter only covers the relevant parts of the MVEL language for a consistent use with \arara. For advanced topics, I highly recommend the official language guide for MVEL 2.0, available online.
\section{Basic usage}
\label{sec:mvelbasicusage}
@@ -27,7 +27,7 @@ In this expression, we have a single identifier \rbox{user.name}, which by itsel
user.name == 'John Doe'
\end{codebox}
-This expression yields a boolean result, either \rbox{true} or \rbox{false} based on a comparison operation. Like a typical programming language, \gls{MVEL} supports the full gamut of operator precedence rules, including the ability to use bracketing to control execution order:
+This expression yields a boolean result, either \rbox{true} or \rbox{false} based on a comparison operation. Like a typical programming language, MVEL supports the full gamut of operator precedence rules, including the ability to use bracketing to control execution order:
\begin{codebox}{Execution order control through bracketing}{teal}{\icnote}{white}
(user.name == 'John Doe') && ((x * 2) - 1) > 20
@@ -39,7 +39,7 @@ You may write scripts with an arbitrary number of statements using a semicolon t
statement1; statement2; statement3
\end{codebox}
-It is important to observe that \gls{MVEL} expressions use a \emph{last value out} principle. This means, that although \gls{MVEL} supports the \rbox{return} keyword, it can be safely omitted. For example:
+It is important to observe that MVEL expressions use a \emph{last value out} principle. This means, that although MVEL supports the \rbox{return} keyword, it can be safely omitted. For example:
\begin{codebox}{Automatic return}{teal}{\icnote}{white}
foo = 10;
@@ -57,18 +57,18 @@ return foo;
Personally, I like to explicitly add a \rbox{return} statement, as it provides a visual indication of the expression exit point. All rules released with \arara\ favour this writing style. However, feel free to choose any writing style you want, as long as the resulting code is consistent.
-The type coercion system of \gls{MVEL} is applied in cases where two incomparable types are presented by attempting to coerce the right value to that of the type of the left value, and then vice-versa. For example:
+The type coercion system of MVEL is applied in cases where two incomparable types are presented by attempting to coerce the right value to that of the type of the left value, and then vice-versa. For example:
\begin{codebox}{Type coercion}{teal}{\icnote}{white}
"123" == 123;
\end{codebox}
-Surprisingly, the evaluation of such expression holds \rbox{true} in \gls{MVEL} because the underlying type coercion system will coerce the untyped number \rbox{123} to a string \rbox{123} in order to perform the comparison.
+Surprisingly, the evaluation of such expression holds \rbox{true} in MVEL because the underlying type coercion system will coerce the untyped number \rbox{123} to a string \rbox{123} in order to perform the comparison.
\section{Inline lists, maps and arrays}
\label{sec:mvelinlinelistsmapsandarrays}
-According to the documentation, \gls{MVEL} allows you to express lists, maps and arrays using simple elegant syntax. Lists are expressed in the following format:
+According to the documentation, MVEL allows you to express lists, maps and arrays using simple elegant syntax. Lists are expressed in the following format:
\begin{codebox}{Creating a list}{teal}{\icnote}{white}
[ "Jim", "Bob", "Smith" ]
@@ -97,7 +97,7 @@ In this case, the scripting language will see that the target method accepts an
\section{Property navigation}
\label{sec:propertynavigation}
-\gls{MVEL} provides a single, unified syntax for accessing properties, static fields, maps and other structures. Lists are accessed the same as arrays. For example, these two constructs are equivalent (\gls{MVEL} and Java access styles for lists and arrays, respectively):
+MVEL provides a single, unified syntax for accessing properties, static fields, maps and other structures. Lists are accessed the same as arrays. For example, these two constructs are equivalent (MVEL and Java access styles for lists and arrays, respectively):
\begin{codebox}{MVEL access style for lists and arrays}{teal}{\icnote}{white}
user[5]
@@ -107,7 +107,7 @@ user[5]
user.get(5)
\end{codebox}
-Observe that \gls{MVEL} accepts plain Java methods as well. Maps are accessed in the same way as arrays except any object can be passed as the index value. For example, these two constructs are equivalent (\gls{MVEL} and Java access styles for maps, respectively):
+Observe that MVEL accepts plain Java methods as well. Maps are accessed in the same way as arrays except any object can be passed as the index value. For example, these two constructs are equivalent (MVEL and Java access styles for maps, respectively):
\begin{codebox}{MVEL access style for maps}{teal}{\icnote}{white}
user["foobar"]
@@ -123,7 +123,7 @@ It is advisable to favour such access styles over their Java counterparts when w
\section{Flow control}
\label{sec:mvelflowcontrol}
-The expression language goes beyond simple evaluations. In fact, \gls{MVEL} supports an assortment of control flow operators (namely, conditionals and repetitions) which allows advanced scripting operations. Consider this conditional statement:
+The expression language goes beyond simple evaluations. In fact, MVEL supports an assortment of control flow operators (namely, conditionals and repetitions) which allows advanced scripting operations. Consider this conditional statement:
\begin{codebox}{Conditional statement}{teal}{\icnote}{white}
if (var > 0) {
@@ -137,7 +137,7 @@ else {
}
\end{codebox}
-As seen in the previous code, the syntax is very similar to the ones found in typical programming languages. \gls{MVEL} also provides a shorter version, known as a ternary statement:
+As seen in the previous code, the syntax is very similar to the ones found in typical programming languages. MVEL also provides a shorter version, known as a ternary statement:
\begin{codebox}{Ternary statement}{teal}{\icnote}{white}
answer == true ? "yes" : "no";
@@ -151,7 +151,7 @@ foreach (name : people) {
}
\end{codebox}
-As expected, \gls{MVEL} also implements the standard C \rbox{for} loop. Observe that newer versions of \gls{MVEL} allow an abbreviation of \rbox{foreach} to the usual \rbox{for} statement, as syntactic sugar. In order to explicitly indicate a collection iteration, we usually use \rbox{foreach} in the default rules for \arara, but both statements behave exactly the same from a semantic point of view.
+As expected, MVEL also implements the standard C \rbox{for} loop. Observe that newer versions of MVEL allow an abbreviation of \rbox{foreach} to the usual \rbox{for} statement, as syntactic sugar. In order to explicitly indicate a collection iteration, we usually use \rbox{foreach} in the default rules for \arara, but both statements behave exactly the same from a semantic point of view.
\begin{codebox}{Iteration statement}{teal}{\icnote}{white}
for (int i = 0; i < 100; i++) {
@@ -173,7 +173,7 @@ do {
} until (x == null);
\end{codebox}
-Finally, \gls{MVEL} also implements the standard \rbox{while}, with the significant addition of an \rbox{until} counterpart (for inverted logic):
+Finally, MVEL also implements the standard \rbox{while}, with the significant addition of an \rbox{until} counterpart (for inverted logic):
\begin{codebox}{Iteration statement}{teal}{\icnote}{white}
while (isTrue()) {
@@ -192,7 +192,7 @@ Since \rbox{while} and \rbox{until} are unbounded (i.e, the number of iterations
\section{Projections and folds}
\label{sec:mvelprojectionsandfolds}
-Projections are a way of representing collections. According to the official documentation, using a very simple syntax, one can inspect very complex object models inside collections in \gls{MVEL} using the \rbox{in} operator. For example:
+Projections are a way of representing collections. According to the official documentation, using a very simple syntax, one can inspect very complex object models inside collections in MVEL using the \rbox{in} operator. For example:
\begin{codebox}{Projection and fold}{teal}{\icnote}{white}
names = (user.name in users);
@@ -203,7 +203,7 @@ As seen in the above code, \rbox{names} holds all values from the \rbox{name} pr
\section{Assignments}
\label{sec:mvelassignments}
-According to the official documentation, the scripting language allows variable assignment in expressions, either for extraction from the runtime, or for use inside the expression. As \gls{MVEL} is a dynamically typed language, there is no need to specify a type in order to declare a new variable. However, feel free to explicitly declare the type when desired.
+According to the official documentation, the scripting language allows variable assignment in expressions, either for extraction from the runtime, or for use inside the expression. As MVEL is a dynamically typed language, there is no need to specify a type in order to declare a new variable. However, feel free to explicitly declare the type when desired.
\begin{codebox}{Assignment}{teal}{\icnote}{white}
str = "My string";
@@ -227,16 +227,16 @@ When writing rules for \arara, is advisable to keep variables to a minimum in or
\section{Basic templating}
\label{sec:mvelbasictemplating}
-\gls{MVEL} templates are comprised of \emph{orb} tags inside a plain text document. \Glspl{orb-tag} denote dynamic elements of the template which the engine will evaluate at runtime. \arara\ heavily relies on this concept for runtime evaluation of conditionals and rules. For rules, we use \glspl{orb-tag} to return either a string from a textual template or a proper command object. The former constituted the basis of command generation in previous versions of our tool; from version 4.0 on, we highly recommend the latter, detailed in Section~\ref{sec:rule}, on page~\ref{sec:rule}. Conditionals are in fact \glspl{orb-tag} in disguise, such that the expression (or a sequence of expressions) is properly evaluated at runtime. Consider the following example:
+MVEL templates are comprised of \emph{orb} tags inside a plain text document. Orb tags denote dynamic elements of the template which the engine will evaluate at runtime. \arara\ heavily relies on this concept for runtime evaluation of conditionals and rules. For rules, we use orb tags to return either a string from a textual template or a proper command object. The former constituted the basis of command generation in previous versions of our tool; we highly recommend the latter, detailed in Section~\ref{sec:rule}, on page~\ref{sec:rule}. Conditionals are in fact orb tags in disguise, such that the expression (or a sequence of expressions) is properly evaluated at runtime. Consider the following example:
\begin{codebox}{Template}{teal}{\icnote}{white}
My favourite team is @{ person.name == 'Enrico'
? 'Juventus' : 'Palmeiras' }!
\end{codebox}
-The above code features a basic form of \gls{orb-tag} named \emph{expression orb}. It contains an expression (or a sequence of expressions) which will be evaluated to a certain value, as seen earlier on, when discussing the \emph{last value out} principle. In the example, the value to be returned will be a string containing a football team name (the result is of course based on the comparison outcome).
+The above code features a basic form of orb tag named \emph{expression orb}. It contains an expression (or a sequence of expressions) which will be evaluated to a certain value, as seen earlier on, when discussing the \emph{last value out} principle. In the example, the value to be returned will be a string containing a football team name (the result is of course based on the comparison outcome).
\section{Further reading}
\label{sec:mvelfurtherreading}
-This chapter does not cover all features of the \gls{MVEL} expression language, so further reading is advisable. I highly recommend the \href{http://mvel.documentnode.com/}{MVEL language guide} currently covering version 2.0 of the language.
+This chapter does not cover all features of the MVEL expression language, so further reading is advisable. I highly recommend the \href{http://mvel.documentnode.com/}{MVEL language guide} currently covering version 2.0 of the language.
diff --git a/support/arara/doc/chapters/prologue.tex b/support/arara/doc/chapters/prologue.tex
deleted file mode 100644
index ed77672237..0000000000
--- a/support/arara/doc/chapters/prologue.tex
+++ /dev/null
@@ -1,27 +0,0 @@
-% !TeX root = ../arara-manual.tex
-\chapter*{Prologue}
-\label{chap:prologue}
-
-\epigraph{Moral of the story: never read the
-documentation, bad things happen.}{\textsc{David Carlisle}}
-
-{\setlength{\parskip}{1em}
-Writing software is easy. Writing \emph{good} software is extremely difficult. When the counter stopped at version 3.0, Brent, Marco and I decided it was time for \arara\ to graduate and finally be released in \TeX\ Live. My life had changed.
-
-It was a success. A lot of people liked the idea of explicitly telling our tool how to compile their \TeX\ documents instead of relying on guesswork. It was indeed a cool concept! But then, the inevitable happened: a lot of bugs had emerged from the dark depths of my humble code.
-
-In all seriousness, \emph{I was about to give up}. My code was not awful, but there were a couple of critical and blocking bugs. Something very drastic had to be done in order to put \arara\ back on track. Then, walking on faith, I decided to rewrite the tool entirely from scratch. In order to achieve this goal, I created a \href{https://github.com/cereda/nightingale}{sandbox} and started working on the new code.
-
-It was my redemption. Nicola helped me with the new version, writing code, fixing bugs and suggesting new features. Soon, we all achieved a very pleasant result. It was like \arara\ was about to hatch again. Version 4.0 was definitely at our hands. Now, it is up to you.
-
-Surprisingly, this humble user manual is not the best resource for learning about our tool. If you really want to see \arara\ in action, I strongly recommend \href{https://www.dickimaw-books.com/latex/admin}{\LaTeX\ for administrative work}, an amazing book freely available for download. The author is, of course, Nicola herself! She explains how \LaTeX\ can be used for administrative work, such as writing correspondence, performing repetitive tasks or typesetting problem sheets on exam papers. And \arara\ is there!
-
-Enjoy the new version. Happy \TeX ing with \arara!
-\par}
-
-\vfill
-
-\begin{flushright}
-Paulo Roberto Massa Cereda\\
-\emph{on behalf of the \arara\ team}
-\end{flushright}
diff --git a/support/arara/doc/chapters/rules.tex b/support/arara/doc/chapters/rules.tex
index f2e7bfd0bc..759d62e133 100644
--- a/support/arara/doc/chapters/rules.tex
+++ b/support/arara/doc/chapters/rules.tex
@@ -9,7 +9,7 @@ As seen in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure
\end{messagebox}
\begin{description}
-\item[\rulebox{animate}{Chris Hughes, Paulo Cereda}]
+\item[\rulebox{animate}]
This rule creates an animated \rbox{gif} file from the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{pdf} suffix, using the \rbox{convert} command line utility from the ImageMagick suite.
\begin{description}
@@ -35,14 +35,64 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: animate: { delay: 15, density: 150 }
\end{codebox}
-\item[\rulebox{bib2gls}{Nicola Talbot, Paulo Cereda}] This rule executes the \rbox{bib2gls} command line application which extracts glossary information stored in a \rbox{bib} file and converts it into glossary entry definitions in resource files. This rule passes the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
+\item[\rulebox{asymptote}]
+This rule executes the \rbox{asy} command line, referring to Asymptote, a powerful descriptive vector graphics language for technical drawings, inspired by Metapost but with an improved syntax. Please note that you will have to make the \rbox{.asy} extension known to \arara\ in order to compile Asymptote files. Furthermore, it is advised to use this in your regular \TeX\ document specifying the \abox{files} parameter to include all graphics you want to compile for inclusion in your document.
+
+\begin{description}
+\item[\abox{color}] This option, as the name suggests, provides the underlying color model to be used in the current execution. Possible values are:
+
+\begin{description}
+\item[\povalue{\hphantom{x}bw\hphantom{x}}] This option value, as the name suggests, converts all colors to a black and white model.
+
+\item[\povalue{cmyk}] This option value converts the RGB (red, green an blue) color model to the CMYK (cyan, magenta, yellow and black) counterpart.
+
+\item[\povalue{rgb}] This option value converts the CMYK (cyan, magenta, yellow and black) color model to the RGB (red, green an blue) counterpart.
+
+\item[\povalue{gray}] This option value, as the name suggests, converts all colors to a grayscale model.
+\end{description}
+
+\item[\rpbox{engine}{latex}] This option, as the name indicates, sets the underlying \TeX\ engine to be used for the current compilation. Make sure to take a look at the Asymptote manual for further details on this option. Possible values are:
+
+\begin{description}
+\item[\povalue{latex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{latex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{pdflatex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{pdflatex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{xelatex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{xelatex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{lualatex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{lualatex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{tex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{tex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{pdftex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{pdftex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{luatex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{luatex} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{context}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{context} for the current compilation. Note that the engine might play a major role in the generated code.
+
+\item[\povalue{none}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{none} for the current compilation. In this case, there will be no associated engine.
+\end{description}
+
+\item[\abox{format}] This option, as the name suggests, converts each output file to a specified format. Make sure to take a look at the Asymptote manual for further details.
+
+\item[\abox{output}] This option, as the name suggests, sets an alternative output directory or file name. Make sure to take a look at the Asymptote manual for further details.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: asymptote: { files: [ mydrawing.asy ] }
+\end{codebox}
+\end{description}
+
+\item[\rulebox{bib2gls}]
+This rule executes the \rbox{bib2gls} command line application which extracts glossary information stored in a \rbox{bib} file and converts it into glossary entry definitions in resource files. This rule passes the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
\begin{description}
\item[\abox{dir}] This option sets the directory used for writing auxiliary files. Note that this option does not change the current working directory.
\item[\abox{trans}] This option sets the extension of the transcript file created by \rbox{bib2gls}. The value should be just the file extension without the leading dot. The default is \rbox{glg}.
-\item[\abox{locale}] This option specifies the preferred language resource file. Please keep in mind that the provided value must be a valid \gls{IETF} language tag. If omitted, the default is obtained by \rbox{bib2gls} from the \gls{JVM}.
+\item[\abox{locale}] This option specifies the preferred language resource file. Please keep in mind that the provided value must be a valid IETF language tag. If omitted, the default is obtained by \rbox{bib2gls} from the JVM.
\item[\rpsbox{group}] This option sets whether \rbox{bib2gls} will try to determine the letter group for each entry and add it to a new field called \rbox{group} when sorting. Be mindful that some \rbox{sort} options ignore this setting. The default value is off.
@@ -80,9 +130,12 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: --> if found('aux', 'glsxtr@resource')
\end{codebox}
-\item[\rulebox{biber}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{biber}, the backend bibliography processor for \rbox{biblatex}, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
+\item[\rulebox{biber}]
+This rule runs \rbox{biber}, the backend bibliography processor for \rbox{biblatex}, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
\begin{description}
+\item[\rpsbox{tool}] This option sets whether the bibliography processor should be executed in \emph{tool mode}, intended for transformations and modifications of datasources. Since this mode is oriented towards a datasource rather than a document, make sure to use it alongside the \abox{options} option.
+
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
\end{description}
@@ -90,7 +143,8 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: biber: { options: [ '--wraplines' ] }
\end{codebox}
-\item[\rulebox{bibtex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{bibtex} program, a reference management software, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
+\item[\rulebox{bibtex}]
+This rule runs the \rbox{bibtex} program, a reference management software, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -101,7 +155,8 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: --> if exists(toFile('references.bib'))
\end{codebox}
-\item[\rulebox{bibtex8}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{bibtex8}, an enhanced, portable C version of \rbox{bibtex}, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string. It is important to note that this tool can read a character set file containing encoding details.
+\item[\rulebox{bibtex8}]
+This rule runs \rbox{bibtex8}, an enhanced, portable C version of \rbox{bibtex}, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string. It is important to note that this tool can read a character set file containing encoding details.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -111,7 +166,8 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: bibtex8: { options: [ '--trace', '--huge' ] }
\end{codebox}
-\item[\rulebox{bibtexu}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{bibtexu} program, an enhanced version of \rbox{bibtex} with Unicode support and language features, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
+\item[\rulebox{bibtexu}]
+This rule runs the \rbox{bibtexu} program, an enhanced version of \rbox{bibtex} with Unicode support and language features, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -121,7 +177,8 @@ The best solution to avoid possible future name conflicts, according to the Imag
% arara: bibtexu: { options: [ '--language', 'fr' ] }
\end{codebox}
-\item[\rulebox{clean}{Marco Daniel, Paulo Cereda}] This rule removes the provided file reference through the underlying system command, which can be \rbox{rm} in a Unix environment or \rbox{del} in Microsoft Windows. As a security lock, this rule will always throw an error if \mtbox{currentFile} is equal to \mtbox{getOriginalFile}, so the main file reference cannot be removed. It is highly recommended to use the special \abox{files} parameter to indicate removal candidates. Alternatively, a list of file extensions can be provided as well. Be mindful that the security lock also applies to file removals based on extensions.
+\item[\rulebox{clean}]
+This rule removes the provided file reference through the underlying system command, which can be \rbox{rm} in a Unix environment or \rbox{del} in Microsoft Windows. As a security lock, this rule will always throw an error if \mtbox{currentFile} is equal to \mtbox{getOriginalFile}, so the main file reference cannot be removed. It is highly recommended to use the special \abox{files} parameter to indicate removal candidates. Alternatively, a list of file extensions can be provided as well. Be mindful that the security lock also applies to file removals based on extensions.
\begin{description}
\item[\abox{extensions}] This option, as the name indicates, takes a list of extensions and constructs a new list of removals commands according to the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with each extension from the original list as suffixes. Keep in mind that, if the special \abox{files} parameter is used with this option, the resulting list will contain the cartesian product of file base names and extensions. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -135,7 +192,8 @@ When in doubt, always remember that the \opbox{{-}dry-run} command line option i
% arara: clean: { extensions: [ aux, log ] }
\end{codebox}
-\item[\rulebox{csplain}{Paulo Cereda}] This rule runs the \rbox{csplain} \TeX\ engine, a conservative extension of Knuth's plain \TeX\ with direct processing characters and hyphenation patterns for Czech and Slovak, on the provided \mtbox{currentFile} reference.
+\item[\rulebox{csplain}]
+This rule runs the \rbox{csplain} \TeX\ engine, a conservative extension of Knuth's plain \TeX\ with direct processing characters and hyphenation patterns for Czech and Slovak, on the provided \mtbox{currentFile} reference.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. When such option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -163,7 +221,8 @@ When in doubt, always remember that the \opbox{{-}dry-run} command line option i
% arara: csplain: { interaction: batchmode, shell: yes }
\end{codebox}
-\item[\rulebox{datatooltk}{Nicola Talbot, Paulo Cereda}] This rule runs \rbox{datatooltk}, an application that creates \rbox{datatool} databases in raw format from several structured data formats, in batch mode. This rule requires \abox{output} and one of the import options.
+\item[\rulebox{datatooltk}]
+This rule runs \rbox{datatooltk}, an application that creates \rbox{datatool} databases in raw format from several structured data formats, in batch mode. This rule requires \abox{output} and one of the import options.
\begin{description}
\item[\abox{output}~\rqbox] This option provides the database name to be saved as output. To guard against accidentally overwriting a document file, \rbox{datatooltk} now forbids the \rbox{tex} extension for output files. This option is required.
@@ -176,11 +235,11 @@ When in doubt, always remember that the \opbox{{-}dry-run} command line option i
\item[\abox{name}] This option, as the name indicates, sets the label reference of the newly created database according to the provided value.
-\item[\abox{sql}] This option imports data from an \gls{SQL} database where the provided value refers to a proper \rbox{select} \gls{SQL} statement.
+\item[\abox{sql}] This option imports data from an SQL database where the provided value refers to a proper \rbox{select} SQL statement.
-\item[\abox{sqldb}] This option, as the name indicates, sets the name of the \gls{SQL} database according to the provided value.
+\item[\abox{sqldb}] This option, as the name indicates, sets the name of the SQL database according to the provided value.
-\item[\abox{sqluser}] This option, as the name indicates, sets the name of the \gls{SQL} user according to the provided value.
+\item[\abox{sqluser}] This option, as the name indicates, sets the name of the SQL user according to the provided value.
\item[\rpbox{noconsole}{gui}] This action dictates the password request action if such information was not provided earlier. If there is no console available, the action is determined by the following values:
@@ -189,7 +248,7 @@ When in doubt, always remember that the \opbox{{-}dry-run} command line option i
\item[\povalue{stdin}] This action requests the password via the standard input stream, which is less secure than using a console.
-\item[\povalue{gui}] This action displays a dialog box in which the user can enter the password for the \gls{SQL} database.
+\item[\povalue{gui}] This action displays a dialog box in which the user can enter the password for the SQL database.
\end{description}
\item[\abox{probsoln}] This option, as the name indicates, imports data in the \rbox{probsoln} format from the file name provided as the value.
@@ -213,7 +272,7 @@ spreadsheet import functions also use this setting.
\item[\rpsbox{owneronly}] This option sets whether read and write permissions when saving \rbox{dbtex} files should be defined for the owner only. This option has no effect on some operating systems.
-\item[\rpsbox{maptex}] This option sets whether \TeX\ special characters will be properly mapped when importing data from \rbox{csv} files or \gls{SQL} databases.
+\item[\rpsbox{maptex}] This option sets whether \TeX\ special characters will be properly mapped when importing data from \rbox{csv} files or SQL databases.
\item[\abox{xls}] This option, as the name indicates, imports data from a Microsoft Excel \rbox{xls} file reference provided as a plain string value.
@@ -240,7 +299,8 @@ spreadsheet import functions also use this setting.
% arara: --> csv: booklist.csv }
\end{codebox}
-\item[\rulebox{dvipdfm}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{dvipdfm}, a command line utility for file format translation, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
+\item[\rulebox{dvipdfm}]
+This rule runs \rbox{dvipdfm}, a command line utility for file format translation, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -252,7 +312,8 @@ spreadsheet import functions also use this setting.
% arara: dvipdfm: { output: thesis }
\end{codebox}
-\item[\rulebox{dvipdfmx}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{dvipdfmx}, an extended version of \rbox{dvipdfm} created to support multibyte character encodings and large character sets for East Asian languages, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
+\item[\rulebox{dvipdfmx}]
+This rule runs \rbox{dvipdfmx}, an extended version of \rbox{dvipdfm} created to support multibyte character encodings and large character sets for East Asian languages, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -264,7 +325,8 @@ spreadsheet import functions also use this setting.
% arara: dvipdfmx: { options: [ '-K', '40' ] }
\end{codebox}
-\item[\rulebox{dvips}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{dvips} on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a PostScript \rbox{ps} file.
+\item[\rulebox{dvips}]
+This rule runs \rbox{dvips} on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a PostScript \rbox{ps} file.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{ps} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -276,7 +338,8 @@ spreadsheet import functions also use this setting.
% arara: dvips: { output: thesis }
\end{codebox}
-\item[\rulebox{dvipspdf}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{dvips} in order to obtain a corresponding \rbox{ps} file from the initial \rbox{dvi} reference, and then runs \rbox{ps2pdf} on the previously generated \rbox{ps} file in order to obtain a \rbox{pdf} file. Note that all base names are acquired from the \mtbox{currentFile} reference (i.e, the name without the associated extension) and used to construct the resulting files.
+\item[\rulebox{dvipspdf}]
+This rule runs \rbox{dvips} in order to obtain a corresponding \rbox{ps} file from the initial \rbox{dvi} reference, and then runs \rbox{ps2pdf} on the previously generated \rbox{ps} file in order to obtain a \rbox{pdf} file. Note that all base names are acquired from the \mtbox{currentFile} reference (i.e, the name without the associated extension) and used to construct the resulting files.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -290,7 +353,8 @@ spreadsheet import functions also use this setting.
% arara: dvipspdf: { output: article }
\end{codebox}
-\item[\rulebox{dvisvgm}{samcarter}] This rule runs \rbox{dvisvgm} in order to obtain a corresponding \rbox{svg} file, a vector graphics format based on XML, from the initial \rbox{dvi} reference. It is important to observe that the base name is acquired from the \mtbox{currentFile} reference (i.e, the name without the associated extension) and used to construct the resulting file.
+\item[\rulebox{dvisvgm}]
+This rule runs \rbox{dvisvgm} in order to obtain a corresponding \rbox{svg} file, a vector graphics format based on XML, from the initial \rbox{dvi} reference. It is important to observe that the base name is acquired from the \mtbox{currentFile} reference (i.e, the name without the associated extension) and used to construct the resulting file.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -300,7 +364,8 @@ spreadsheet import functions also use this setting.
% arara: dvisvgm
\end{codebox}
-\item[\rulebox{etex}{Marco Daniel, Paulo Cereda, Nicola Talbot}] This rule runs the \rbox{etex} extended (plain) \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+\item[\rulebox{etex}]
+This rule runs the \rbox{etex} extended (plain) \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -324,7 +389,8 @@ spreadsheet import functions also use this setting.
% arara: etex: { shell: yes }
\end{codebox}
-\item[\rulebox{frontespizio}{Francesco Endrici, Enrico Gregorio, Paulo Cereda}] This rule automates the steps required by the \rbox{frontespizio} package in order to help Italian users generate the frontispiece to their thesis. First and foremost, the frontispiece is generated. If \rbox{latex} is used as the underlying engine, there is an additional intermediate conversion step to a proper \rbox{eps} file. Finally, the final document is compiled.
+\item[\rulebox{frontespizio}]
+This rule automates the steps required by the \rbox{frontespizio} package in order to help Italian users generate the frontispiece to their thesis. First and foremost, the frontispiece is generated. If \rbox{latex} is used as the underlying engine, there is an additional intermediate conversion step to a proper \rbox{eps} file. Finally, the final document is compiled.
\begin{description}
\item[\rpbox{engine}{pdflatex}] This option, as the name indicates, sets the underlying \TeX\ engine to be used for both compilations (the frontispiece and the document itself). Possible values are:
@@ -361,13 +427,15 @@ spreadsheet import functions also use this setting.
% arara: --> shell: yes, interaction: nonstopmode }
\end{codebox}
-\item[\rulebox{halt}{Heiko Oberdiek, Paulo Cereda}] This rule, as the name suggests, calls the \rbox{halt} trigger, which stops the current interpretation workflow, such that subsequent directives are ignored. This rule contains no associated options. Please refer to Section~\ref{sec:commandsandtriggers}, on page~\pageref{sec:commandsandtriggers}, for more information on triggers.
+\item[\rulebox{halt}]
+This rule, as the name suggests, sets a \rbox{halt} flag, which stops the current interpretation workflow, such that subsequent directives are ignored. This rule contains no associated options. Please refer to Section~\ref{sec:others}, on page~\pageref{sec:others}, for more information on flags.
\begin{codebox}{Example}{teal}{\icnote}{white}
% arara: halt
\end{codebox}
-\item[\rulebox{indent}{Chris Hughes, Paulo Cereda}] This rule runs \rbox{latexindent}, a Perl script that indents \TeX\ files according to an indentation scheme, on the provided \mtbox{currentFile} reference. Environments, including those with alignment delimiters, and commands, including those that can split braces and brackets across lines, are usually handled correctly by the script.
+\item[\rulebox{indent}]
+This rule runs \rbox{latexindent}, a Perl script that indents \TeX\ files according to an indentation scheme, on the provided \mtbox{currentFile} reference. Environments, including those with alignment delimiters, and commands, including those that can split braces and brackets across lines, are usually handled correctly by the script.
\begin{description}
\item[\rpsbox{silent}] This option, as the name indicates, sets whether the script will operate in silent mode, in which no output is given to the terminal.
@@ -419,9 +487,37 @@ spreadsheet import functions also use this setting.
% arara: indent: { overwrite: yes }
\end{codebox}
-\item[\rulebox{latex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{latex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+\item[\rulebox{knitr}]
+This rule calls the \rbox{knitr} package, a transparent engine for dynamic report generation with R. It takes an \rbox{.Rnw} file as input, extracts the R code in it according to a list of patterns, evaluates the code and writes the output in another file. It can also tangle R source code from the input document.
+
+\begin{description}
+\item[\rpbox{output}{NULL}] This option sets the output file. when absent, \rbox{knitr} will try to guess a default, which will be under the current working directory.
+
+\item[\rpsbox{tangle}] This option sets whether to tangle the R code from the input file. Note that, when used, this option requires \abox{output} to be specified as well, otherwise an error is thrown.
+
+\item[\rpsbox{quiet}] This option, as the name indicates, sets whether the tool should suppress both progress bar and messages.
+
+\item[\rpbox{envir}{parent.frame()}] This option sets the environment in which code chunks are to be evaluated. Please refer to the documentation for further details.
+
+\item[\rpbox{encoding}{getOption("encoding")}] This option, as the name indicates, sets the encoding of the input file. Please refer to the documentation for further details.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: knitr: { quiet: yes }
+\end{codebox}
+
+\item[\rulebox{latex}]
+This rule runs the \rbox{latex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
+
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
\begin{description}
@@ -447,7 +543,8 @@ spreadsheet import functions also use this setting.
% arara: latex: { interaction: scrollmode, draft: yes }
\end{codebox}
-\item[\rulebox{latexmk}{Marco Daniel, Brent Longborough, Paulo Cereda}] This rule runs \rbox{latexmk}, a fantastic command line tool for fully automated \TeX\ document generation, on the provided \mtbox{currentFile} reference.
+\item[\rulebox{latexmk}]
+This rule runs \rbox{latexmk}, a fantastic command line tool for fully automated \TeX\ document generation, on the provided \mtbox{currentFile} reference.
\begin{description}
\item[\abox{clean}] This option, as the name indicates, removes all temporary files generated after a sequence of intermediate calls for document generation. Two possible values are available:
@@ -479,7 +576,8 @@ spreadsheet import functions also use this setting.
% arara: latexmk: { engine: pdflatex }
\end{codebox}
-\item[\rulebox{lualatex}{Marco Daniel, Paulo Cereda}] This rule runs the new \rbox{lualatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{luahbtex}]
+This rule runs the \rbox{luahbtex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -504,11 +602,50 @@ spreadsheet import functions also use this setting.
\end{description}
\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: luahbtex: { interaction: batchmode,
+% arara: --> shell: yes, draft: yes }
+\end{codebox}
+
+\item[\rulebox{lualatex}]
+This rule runs the new \rbox{lualatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+
+\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
+
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
+\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
+
+\begin{description}
+\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort.
+
+\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described.
+
+\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself.
+
+\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available.
+\end{description}
+
+\item[\rpsbox{shell}] This option sets whether the possibility of running underlying system commands from within \TeX\ is activated.
+
+\item[\rpsbox{synctex}] This option sets whether \rbox{synctex}, an input and output synchronization feature that allows navigation from source to typeset material and vice versa, available in most \TeX\ engines, is activated.
+
+\item[\rpsbox{draft}] This option sets whether the draft mode, i.e, a mode that produces no output, so the engine can check the syntax, is activated.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
% arara: lualatex: { interaction: errorstopmode,
% arara: --> synctex: yes }
\end{codebox}
-\item[\rulebox{luatex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{luatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{luatex}]
+This rule runs the \rbox{luatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -537,7 +674,8 @@ spreadsheet import functions also use this setting.
% arara: --> shell: yes, draft: yes }
\end{codebox}
-\item[\rulebox{make}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{make}, a build automation tool that automatically builds executable programs and libraries from source code, according to a special file which specifies how to derive the target program.
+\item[\rulebox{make}]
+This rule runs \rbox{make}, a build automation tool that automatically builds executable programs and libraries from source code, according to a special file which specifies how to derive the target program.
\begin{description}
\item[\abox{targets}] This option takes a list of targets. Note that \rbox{make} updates a target if it depends on files that have been modified since the target was last modified, or if the target does not exist.
@@ -549,7 +687,8 @@ spreadsheet import functions also use this setting.
% arara: make: { targets: [ compile, package ] }
\end{codebox}
-\item[\rulebox{makeglossaries}{Marco Daniel, Nicola Talbot, Paulo Cereda}] This rule runs \rbox{makeglossaries}, an efficient Perl script designed for use with \TeX\ documents that work with the \rbox{glossaries} package. All the information required to be passed to the relevant indexing application should also be contained in the auxiliary file. The script takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
+\item[\rulebox{makeglossaries}]
+This rule runs \rbox{makeglossaries}, an efficient Perl script designed for use with \TeX\ documents that work with the \rbox{glossaries} package. All the information required to be passed to the relevant indexing application should also be contained in the auxiliary file. The script takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual script call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -559,7 +698,8 @@ spreadsheet import functions also use this setting.
% arara: makeglossaries if found('aux', '@istfilename')
\end{codebox}
-\item[\rulebox{makeglossarieslite}{Marco Daniel, Nicola Talbot, Paulo Cereda}] This rule runs \rbox{makeglossaries-lite}, a lightweight Lua script designed for use with \TeX\ documents that work with the \rbox{glossaries} package. All the information required to be passed to the relevant indexing application should also be contained in the auxiliary file. The script takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
+\item[\rulebox{makeglossarieslite}]
+This rule runs \rbox{makeglossaries-lite}, a lightweight Lua script designed for use with \TeX\ documents that work with the \rbox{glossaries} package. All the information required to be passed to the relevant indexing application should also be contained in the auxiliary file. The script takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as the mandatory argument.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual script call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -569,7 +709,8 @@ spreadsheet import functions also use this setting.
% arara: makeglossarieslite if found('aux', '@istfilename')
\end{codebox}
-\item[\rulebox{makeindex}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{makeindex}, a general purpose hierarchical index generator, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
+\item[\rulebox{makeindex}]
+This rule runs \rbox{makeindex}, a general purpose hierarchical index generator, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
\begin{description}
\item[\abox{style}] This option, as the name indicates, sets the underlying index style file. Make sure to provide a valid \rbox{ist} file when using this option.
@@ -597,7 +738,41 @@ spreadsheet import functions also use this setting.
% arara: makeindex: { style: book.ist }
\end{codebox}
-\item[\rulebox{nomencl}{Marco Daniel, Nicola Talbot, Paulo Cereda}] This rule runs \rbox{makeindex} in order to automatically generate a nomenclature list from \TeX\ documents that work with the \rbox{nomencl} package. The program itself is a general purpose hierarchical index generator and takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{nlo} suffix and a special style file in order to generate the nomenclature list as a special \rbox{nls} file.
+\item[\rulebox{metapost}]
+This rule runs \rbox{metapost}, a tool to compile the Metapost graphics programming language. Please note that you will have to make the \rbox{.mp} extension known to \arara\ in order to compile Metapost files. Furthermore, it is advised to use this in your regular \TeX\ document specifying the \abox{files} parameter to include all graphics you want to compile for inclusion in your document.
+
+\begin{description}
+\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
+
+\begin{description}
+\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort.
+
+\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described.
+
+\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself.
+
+\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available.
+\end{description}
+
+\item[\abox{numbersystem}] This option sets the number system Metapost will use for calculations.
+
+\begin{description}
+\item[\povalue{scaled}] In this mode, 32-bit fixed-point arithmetics is used.
+
+\item[\povalue{double}] In this mode, IEEE floating-point arithmetics with 64 bits is used.
+\item[\povalue{binary}] This mode is similary to \povalue{double} but without a fixed-length mantissa.
+\item[\povalue{decimal}] In this mode, arbitrary precision arithmetics is used and numbers are internally represented in base 10.
+\end{description}
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: metapost: { files: [ graphics.mp ] }
+\end{codebox}
+
+\item[\rulebox{nomencl}]
+This rule runs \rbox{makeindex} in order to automatically generate a nomenclature list from \TeX\ documents that work with the \rbox{nomencl} package. The program itself is a general purpose hierarchical index generator and takes the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{nlo} suffix and a special style file in order to generate the nomenclature list as a special \rbox{nls} file.
\begin{description}
\item[\rpbox{style}{nomencl.ist}] This option, as the name indicates, sets the underlying index style file. The default value is set to the one automatically provided by the \rbox{nomencl} package, so it is highly recommended to not override it.
@@ -609,7 +784,20 @@ spreadsheet import functions also use this setting.
% arara: nomencl
\end{codebox}
-\item[\rulebox{pdfcsplain}{Paulo Cereda}] This rule runs the \rbox{pdfcsplain} \TeX\ engine, a conservative extension of Knuth's plain \TeX\ with direct processing characters and hyphenation patterns for Czech and Slovak, on the provided \mtbox{currentFile} reference.
+\item[\rulebox{pbibtex}]
+This rule runs the \rbox{pbibtex} program, a reference management software, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
+
+\begin{description}
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: pbibtex
+% arara: --> if exists(toFile('references.bib'))
+\end{codebox}
+
+\item[\rulebox{pdfcsplain}]
+This rule runs the \rbox{pdfcsplain} \TeX\ engine, a conservative extension of Knuth's plain \TeX\ with direct processing characters and hyphenation patterns for Czech and Slovak, on the provided \mtbox{currentFile} reference.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -637,9 +825,18 @@ spreadsheet import functions also use this setting.
% arara: pdfcsplain: { shell: yes, synctex: yes }
\end{codebox}
-\item[\rulebox{pdflatex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{pdflatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{pdflatex}]
+This rule runs the \rbox{pdflatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
+
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
\begin{description}
@@ -666,7 +863,8 @@ spreadsheet import functions also use this setting.
% arara: --> if missing('pdf') || changed('tex')
\end{codebox}
-\item[\rulebox{pdftex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{pdftex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{pdftex}]
+This rule runs the \rbox{pdftex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -694,7 +892,43 @@ spreadsheet import functions also use this setting.
% arara: pdftex: { draft: yes }
\end{codebox}
-\item[\rulebox{pdftk}{Nicola Talbot, Paulo Cereda}] This rule runs \rbox{pdftk}, a command line tool for manipulating Portable Document Format documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{pdf} suffix.
+\item[\rulebox{platex}]
+This rule runs the \rbox{platex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+
+\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
+
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
+\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
+
+\begin{description}
+\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort.
+
+\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described.
+
+\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself.
+
+\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available.
+\end{description}
+
+\item[\rpsbox{shell}] This option sets whether the possibility of running underlying system commands from within \TeX\ is activated.
+
+\item[\rpsbox{synctex}] This option sets whether \rbox{synctex}, an input and output synchronization feature that allows navigation from source to typeset material and vice versa, available in most \TeX\ engines, is activated.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: platex: { interaction: scrollmode, shell: yes }
+\end{codebox}
+
+\item[\rulebox{pdftk}]
+This rule runs \rbox{pdftk}, a command line tool for manipulating Portable Document Format documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{pdf} suffix.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -704,7 +938,8 @@ spreadsheet import functions also use this setting.
% arara: pdftk: { options: [ burst ] }
\end{codebox}
-\item[\rulebox{ps2pdf}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{ps2pdf}, a tool that converts PostScript to Portable Document File, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{ps} suffix.
+\item[\rulebox{ps2pdf}]
+This rule runs \rbox{ps2pdf}, a tool that converts PostScript to Portable Document File, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{ps} suffix.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -716,7 +951,8 @@ spreadsheet import functions also use this setting.
% arara: ps2pdf: { output: article }
\end{codebox}
-\item[\rulebox{sketch}{Sergey Ulyanov, Paulo Cereda}] This rule runs \rbox{sketch}, a system for producing line drawings of solid objects and scenes, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{sk} suffix. Note that one needs to add support for this particular file type, as seen in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}.
+\item[\rulebox{sketch}]
+This rule runs \rbox{sketch}, a system for producing line drawings of solid objects and scenes, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{sk} suffix. Note that one needs to add support for this particular file type, as seen in Section~\ref{sec:basicstructure}, on page~\pageref{sec:basicstructure}.
\begin{description}
\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
@@ -726,7 +962,8 @@ spreadsheet import functions also use this setting.
% arara: sketch
\end{codebox}
-\item[\rulebox{songidx}{Francesco Endrici, Paulo Cereda}] This rule runs \rbox{songidx}, a song index generation script for the \rbox{songs} package, on the file reference provided as parameter, generating a proper index as a special \rbox{sbx} file. It is very important to observe that, at the time of writing, this script is not available off the shelf in \TeX\ Live or MiK\TeX\ distributions, so a manual deployment is required. The script execution is performed by the underlying \rbox{texlua} interpreter.
+\item[\rulebox{songidx}]
+This rule runs \rbox{songidx}, a song index generation script for the \rbox{songs} package, on the file reference provided as parameter, generating a proper index as a special \rbox{sbx} file. It is very important to observe that, at the time of writing, this script is not available off the shelf in \TeX\ Live or MiK\TeX\ distributions, so a manual deployment is required. The script execution is performed by the underlying \rbox{texlua} interpreter.
\begin{description}
\item[\abox{input}~\rqbox] This required option, as the name indicates, sets the input name for the song index file specified within the \TeX\ document. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used.
@@ -740,7 +977,8 @@ spreadsheet import functions also use this setting.
% arara: songidx: { input: songs }
\end{codebox}
-\item[\rulebox{tex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{tex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+\item[\rulebox{tex}]
+This rule runs the \rbox{tex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -764,7 +1002,8 @@ spreadsheet import functions also use this setting.
% arara: tex: { shell: yes }
\end{codebox}
-\item[\rulebox{texindy}{Nicola Talbot, Paulo Cereda}] This rule runs \rbox{texindy}, a variant of the \rbox{xindy} indexing system focused on \LaTeX\ documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
+\item[\rulebox{texindy}]
+This rule runs \rbox{texindy}, a variant of the \rbox{xindy} indexing system focused on \LaTeX\ documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
\begin{description}
\item[\rpsbox{quiet}] This option, as the name indicates, sets whether the tool will output progress messages. It is important to observe that \rbox{texindy} always outputs error messages, regardless of this option.
@@ -798,7 +1037,8 @@ spreadsheet import functions also use this setting.
% arara: texindy: { markup: latex }
\end{codebox}
-\item[\rulebox{tikzmake}{Robbie Smith, Paulo Cereda}] This rule runs \rbox{make} on a very specific build file generated by the \rbox{tikzmake} package, as a means to simplify the externalization of Ti{\itshape k}Z pictures. This build file corresponds to the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{makefile} suffix.
+\item[\rulebox{tikzmake}]
+This rule runs \rbox{make} on a very specific build file generated by the \rbox{tikzmake} package, as a means to simplify the externalization of Ti{\itshape k}Z pictures. This build file corresponds to the base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{makefile} suffix.
\begin{description}
\item[\rpsbox{force}] This option, as the name indicates, sets whether all targets specified in the corresponding build file should be unconditionally made.
@@ -812,22 +1052,82 @@ spreadsheet import functions also use this setting.
% arara: tikzmake: { force: yes, jobs: 2 }
\end{codebox}
-\item[\rulebox{velocity}{Paulo Cereda}] This rule, as the name suggests, calls the \mtbox{mergeVelocityTemplate} method, merging an input template file written according to the Velocity Template Language 1.7 specification with the provided \rbox{Map} data object in order to produce a corresponding \rbox{File} output. Be mindful that this particular rule returns \rbox{true} if, and only if, the aforementioned method is successfully executed. Otherwise, an exception is raised.
+\item[\rulebox{upbibtex}]
+This rule runs the \rbox{upbibtex} program, a reference management software, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string.
\begin{description}
-\item[\abox{input}] This option, as the name indicates, sets the input template file, written according to the Velocity Template Language 1.7 specification, as a proper \rbox{File} reference. Please note that the \mtbox{currentFile} reference is used as default input when this option is not set.
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
-\item[\abox{output}~\rqbox] This required option, as the name indicates, sets the output \rbox{File} reference. Be mindful that, if the reference exists, it will be overwritten without any warning.
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: pbibtex
+% arara: --> if exists(toFile('references.bib'))
+\end{codebox}
+
+\item[\rulebox{uplatex}]
+This rule runs the \rbox{uplatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+
+\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
-\item[\abox{context}~\rqbox] This required option, as the name indicates, sets the \rbox{Map} data object to be used as context to the method call, according to the provided value. An error is thrown if any data structure other than a proper map is specified.
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
+\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
+
+\begin{description}
+\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort.
+
+\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described.
+
+\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself.
+
+\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available.
+\end{description}
+
+\item[\rpsbox{shell}] This option sets whether the possibility of running underlying system commands from within \TeX\ is activated.
+
+\item[\rpsbox{synctex}] This option sets whether \rbox{synctex}, an input and output synchronization feature that allows navigation from source to typeset material and vice versa, available in most \TeX\ engines, is activated.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
\end{description}
\begin{codebox}{Example}{teal}{\icnote}{white}
-% arara: velocity: { input: input.txt, output: output.txt,
-% arara: --> context: { name: Paulo, country: Brazil } }
+% arara: uplatex: { interaction: scrollmode, shell: yes }
\end{codebox}
-\item[\rulebox{xdvipdfmx}{Marco Daniel, Paulo Cereda}] This rule runs \rbox{xdvipdfmx}, the back end for the \rbox{xetex} \TeX\ engine (and not intended to be invoked directly), on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
+\item[\rulebox{uptex}]
+This rule runs the \rbox{uptex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
+
+\begin{description}
+\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
+
+\begin{description}
+\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort.
+
+\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described.
+
+\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself.
+
+\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available.
+\end{description}
+
+\item[\rpsbox{shell}] This option sets whether the possibility of running underlying system commands from within \TeX\ is activated.
+
+\item[\rpsbox{synctex}] This option sets whether \rbox{synctex}, an input and output synchronization feature that allows navigation from source to typeset material and vice versa, available in most \TeX\ engines, is activated.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: uptex
+\end{codebox}
+
+\item[\rulebox{xdvipdfmx}]
+This rule runs \rbox{xdvipdfmx}, the back end for the \rbox{xetex} \TeX\ engine (and not intended to be invoked directly), on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{dvi} suffix, generating a Portable Document Format \rbox{pdf} file.
\begin{description}
\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value.
@@ -839,9 +1139,18 @@ spreadsheet import functions also use this setting.
% arara: xdvipdfmx: { output: thesis }
\end{codebox}
-\item[\rulebox{xelatex}{Marco Daniel, Paulo Cereda}] This rule runs the new \rbox{xelatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{xelatex}]
+This rule runs the new \rbox{xelatex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
+\item[\rpbox{branch}{stable}] This option allows branching formats for the current engine, mainly focused on package development. Users of current \TeX\ distributions might benefit from format branching in order to easily test documents and code against the upcoming releases. Possible values are:
+
+\begin{description}
+\item[\povalue{stable}] This value, as the name implies, enables the stable engine format branch. Note that this is the default format.
+
+\item[\povalue{developer}] For experienced users, this value enables the experimental, developer engine format branch.
+\end{description}
+
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
\begin{description}
@@ -865,7 +1174,8 @@ spreadsheet import functions also use this setting.
% arara: xelatex: { shell: yes, synctex: yes }
\end{codebox}
-\item[\rulebox{xetex}{Marco Daniel, Paulo Cereda}] This rule runs the \rbox{xetex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
+\item[\rulebox{xetex}]
+This rule runs the \rbox{xetex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in the Portable Document File format, as expected.
\begin{description}
\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio):
@@ -891,7 +1201,25 @@ spreadsheet import functions also use this setting.
% arara: xetex: { interaction: scrollmode, synctex: yes }
\end{codebox}
-\item[\rulebox{xindy}{Nicola Talbot, Paulo Cereda}] This rule runs \rbox{xindy}, a flexible and powerful indexing system, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
+\item[\rulebox{xindex}]
+This rule runs \rbox{xindex}, a flexible and powerful indexing system, on a provided \rbox{idx} input. This tool is completely with the \rbox{makeindex} program.
+
+\begin{description}
+\item[\abox{input}~\rqbox] This option, as the name indicates, corresponds to the \rbox{idx} reference to be processed by the indexing system. Note that this option is required.
+
+\item[\rpbox{config}{cfg}] This option specifies a configuration extension. Make sure to take a look at the documentation for further details.
+
+\item[\rpbox{language}{en}] This option, as the name suggests, specifies the language. Make sure to take a look at the documentation for further details.
+
+\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value.
+\end{description}
+
+\begin{codebox}{Example}{teal}{\icnote}{white}
+% arara: xindex: { input: mydoc.idx }
+\end{codebox}
+
+\item[\rulebox{xindy}]
+This rule runs \rbox{xindy}, a flexible and powerful indexing system, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{idx} suffix, generating an index as a special \rbox{ind} file.
\begin{description}
\item[\rpsbox{quiet}] This option, as the name indicates, sets whether the tool will output progress messages. It is important to observe that \rbox{xindy} always outputs error messages, regardless of this option.
diff --git a/support/arara/doc/chapters/yaml.tex b/support/arara/doc/chapters/yaml.tex
index 4078473829..c65c9898d7 100644
--- a/support/arara/doc/chapters/yaml.tex
+++ b/support/arara/doc/chapters/yaml.tex
@@ -2,22 +2,22 @@
\chapter{YAML}
\label{chap:yaml}
-According to the \href{http://yaml.org/spec/1.2/spec.html}{specification}, \gls{YAML} (a recursive acronym for \emph{YAML Ain't Markup Language}) is a human-friendly, cross language, Unicode-based data serialization language designed around the common native data type of programming languages. \arara\ uses this format in three circumstances:
+According to the \href{http://yaml.org/spec/1.2/spec.html}{specification}, YAML (a recursive acronym for \emph{YAML Ain't Markup Language}) is a human-friendly, cross language, Unicode-based data serialization language designed around the common native data type of programming languages. \arara\ uses this format in three circumstances:
\begin{enumerate}
\item\emph{Parametrized directives}, as the set of attribute/value pairs (namely, argument name and corresponding value) is represented by a map. This particular type of directive is formally introduced in Section~\ref{sec:directives}, on page~\pageref{sec:directives}.
-\item\emph{Rules}, as their entire structure is represented by a set of specific keys and their corresponding values (a proper \gls{YAML} document). A rule follows a very strict model, detailed in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
+\item\emph{Rules}, as their entire structure is represented by a set of specific keys and their corresponding values (a proper YAML document). A rule follows a very strict model, detailed in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
-\item\emph{Configuration files}, as the general settings are represented by a set of specific keys and their corresponding values (a proper \gls{YAML} document). Configuration files are covered in Chapter~\ref{chap:configurationfile}, on page~\pageref{chap:configurationfile}.
+\item\emph{Configuration files}, as the general settings are represented by a set of specific keys and their corresponding values (a proper YAML document). Configuration files are covered in Chapter~\ref{chap:configurationfile}, on page~\pageref{chap:configurationfile}.
\end{enumerate}
-This chapter only covers the relevant parts of the \gls{YAML} format for a consistent use with \arara. For advanced topics, I highly recommend the complete format specification, available online.
+This chapter only covers the relevant parts of the YAML format for a consistent use with \arara. For advanced topics, I highly recommend the complete format specification, available online.
\section{Collections}
\label{sec:yamlcollections}
-According to the specification, \gls{YAML}['s] block collections use indentation for scope and begin each entry on its own line. Block sequences indicate each entry with a dash and space. Mappings use a colon and space to mark each \emph{key: value} pair. Comments begin with an octothorpe \rbox{\#}. \arara\ relies solely on mappings and a few scalars to sequences at some point. Let us see an example of a sequence:
+According to the specification, YAML's block collections use indentation for scope and begin each entry on its own line. Block sequences indicate each entry with a dash and space. Mappings use a colon and space to mark each \emph{key: value} pair. Comments begin with an octothorpe \rbox{\#}. \arara\ relies solely on mappings and a few scalars to sequences at some point. Let us see an example of a sequence:
\begin{codebox}{A sequence of scalars in YAML}{teal}{\icnote}{white}
team:
@@ -25,15 +25,16 @@ team:
- Marco Daniel
- Brent Longborough
- Nicola Talbot
+- Ben Frank
\end{codebox}
-It is quite straightforward: \abox{team} holds a sequence of four scalars. \gls{YAML} also has flow styles, using explicit indicators rather than indentation to denote scope. The flow sequence is written as a comma-separated list within square brackets:
+It is quite straightforward: \abox{team} holds a sequence of four scalars. YAML also has flow styles, using explicit indicators rather than indentation to denote scope. The flow sequence is written as a comma-separated list within square brackets:
\begin{codebox}{A sequence of scalars in YAML}{teal}{\icnote}{white}
primes: [ 2, 3, 5, 7, 11 ]
\end{codebox}
-Attribute maps are easily represented by nesting entries, respecting indentation. For instance, consider a map \abox{developer} containing two keys, \abox{name} and \abox{country}. The \gls{YAML} representation is presented as follows:
+Attribute maps are easily represented by nesting entries, respecting indentation. For instance, consider a map \abox{developer} containing two keys, \abox{name} and \abox{country}. The YAML representation is presented as follows:
\begin{codebox}{An attribute map in YAML}{teal}{\icnote}{white}
developer:
@@ -81,17 +82,17 @@ As seen in the previous code, \abox{logo} holds the ASCII logo of our tool, resp
\begin{messagebox}{Block indentation indicator}{attentioncolour}{\icattention}{black}
\setlength{\parskip}{1em}
-According to the \gls{YAML} specification, the indentation level of a block scalar is typically detected from its first non-empty line. It is an error for any of the leading empty lines to contain more spaces than the first non-empty line, hence the ASCII logo could not be represented, as it starts with a space.
+According to the YAML specification, the indentation level of a block scalar is typically detected from its first non-empty line. It is an error for any of the leading empty lines to contain more spaces than the first non-empty line, hence the ASCII logo could not be represented, as it starts with a space.
-When detection would fail, \gls{YAML} requires that the indentation level for the content be given using an explicit indentation indicator. This level is specified as the integer number of the additional indentation spaces used for the content, relative to its parent node. It would be the case if we want to represent our logo without the preceding text.
+When detection would fail, YAML requires that the indentation level for the content be given using an explicit indentation indicator. This level is specified as the integer number of the additional indentation spaces used for the content, relative to its parent node. It would be the case if we want to represent our logo without the preceding text.
\end{messagebox}
-\gls{YAML}['s] flow scalars include the plain style and two quoted styles. The double-quoted style provides escape sequences. The single-quoted style is useful when escaping is not needed. All flow scalars can span multiple lines. Note that line breaks are always folded. Since \arara\ uses \gls{MVEL} as its underlying scripting language (Chapter~\ref{chap:mvel}, on page~\pageref{chap:mvel}), it might be advisable to quote scalars when starting with forbidden symbols in \gls{YAML}.
+YAML's flow scalars include the plain style and two quoted styles. The double-quoted style provides escape sequences. The single-quoted style is useful when escaping is not needed. All flow scalars can span multiple lines. Note that line breaks are always folded. Since \arara\ uses MVEL as its underlying scripting language (Chapter~\ref{chap:mvel}, on page~\pageref{chap:mvel}), it might be advisable to quote scalars when starting with forbidden symbols in YAML.
\section{Tags}
\label{sec:yamltags}
-According to the specification, in \gls{YAML}, untagged nodes are given a type depending on the application. The examples covered in this primer use the \rbox{seq}, \rbox{map} and \rbox{str} types from the fail safe schema. Explicit typing is denoted with a tag using the exclamation point symbol. Global tags are usually uniform resource identifiers and may be specified in a tag shorthand notation using a handle. Application-specific local tags may also be used. For \arara, there is a special schema used for both rules and configuration files, so in those cases, make sure to add \abox{!config} as global tag:
+According to the specification, in YAML, untagged nodes are given a type depending on the application. The examples covered in this primer use the \rbox{seq}, \rbox{map} and \rbox{str} types from the fail safe schema. Explicit typing is denoted with a tag using the exclamation point symbol. Global tags are usually uniform resource identifiers and may be specified in a tag shorthand notation using a handle. Application-specific local tags may also be used. For \arara, there is a special schema used for both rules and configuration files, so in those cases, make sure to add \abox{!config} as global tag:
\begin{codebox}{Global tag for rules and configuration files}{teal}{\icnote}{white}
!config
@@ -102,4 +103,4 @@ In particular, rules and configuration files of \arara\ are properly covered in
\section{Further reading}
\label{sec:yamlfurtherreading}
-This chapter does not cover all features of the \gls{YAML} format, so further reading is advisable. I highly recommend the \href{http://yaml.org/spec/1.2/spec.html}{official YAML specification}, currently covering the third version of the format.
+This chapter does not cover all features of the YAML format, so further reading is advisable. I highly recommend the \href{http://yaml.org/spec/1.2/spec.html}{official YAML specification}, currently covering the third version of the format.