arara is a TeX automation tool based on rules and directives. It gives you a way to enhance your TeX experience.
% arara: bibtex if changed('bibliography.bib') || missing('bbl')
bibliography.bib
% arara: bibtex if changed(toFile('bibliography.bib')) || missing('bbl')
% arara: bibtex if changed(toFile('bibliography.bib')) || missing('bbl')
% pdflatex: {options: ['-interaction=batchmode']} until !found('log', 'No file ') && !found('log', 'undefined references') && !found('log', 'Rerun required') &&! found('log', 'Rerun to get cross-references')
Now in my thesis.tex I have:
% arara: pdflatex: {options: ['-interaction=batchmode']}
% arara: --> if
% arara: --> entries =
% arara: --> org.islandoftex.arara.utils.Methods.listFilesByExtensions(
% arara: --> toFile('Chapters/'), ['tex'], false
% arara: --> ); flag = false;
% arara: --> foreach(entry : entries) {
% arara: --> flag = changed(entry) || flag;
% arara: --> };
% arara: --> flag = changed(currentFile()) || flag;
% arara: --> flag = missing('log') || flag;
% arara: --> flag = missing('aux') || flag;
% arara: --> return flag
% arara: makeindex if changed('idx')
% arara: bibtex if changed(toFile('bibliography.bib')) || missing('bbl')
% arara: pdflatex: {options: ['-interaction=batchmode']} while found('log', 'undefined references') || found('log', 'Rerun required') || found('log', 'Rerun to get cross-references')and it seems to not get out of the while loop:
✗ arara thesis
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
Processing 'thesis.tex' (size: 4.1 kB, last modified: 12/07/2020
16:44:52), please wait.
(MakeIndex) The MakeIndex software ...................... SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. ^C%Is it possible to print the reason why the engine is running the rule? Which condition was met? Also, in case of failure, it would be good to know what failed.
true. The best way to find out now is probably inspect thesis.log and try to spot the culprit. I might raise with the team if we should log conditional methods as well in future releases. For now, one thing is clear: your log file has the key to understand this behaviour. :)
It does not run, but if I change to:
% arara: pdflatex: {options: ['-interaction=batchmode']}
% arara: --> if
% arara: --> entries =
% arara: --> org.islandoftex.arara.utils.Methods.listFilesByExtensions(
% arara: --> toFile('Chapters/'), ['tex'], false
% arara: --> ); flag = false;
% arara: --> foreach(entry : entries) {
% arara: --> flag = changed(entry) || flag;
% arara: --> };
% arara: --> flag = changed(currentFile()) || flag;
% arara: --> flag = missing('log') || flag;
% arara: --> flag = missing('aux') || flag;
% arara: --> return flag
% arara: pdflatex: {options: ['-interaction=batchmode']} while found('log', 'undefined references')it loops indefinetly, although I can't find "undefined references in thesis.log"
✗ cat thesis.log | grep "undefined references"
✗
arara.log say? It would be good if you could reduce your setup to a MWE that reproduces the issue. Otherwise, one can only speculate...
@dan-r95 Hello Daniel! I just commited a
moverule to our repository: https://gitlab.com/islandoftex/arara/-/blob/development/rules/arara-rule-move.yaml
thank you for the updated rule!
Hi, I'm one of the authors of TeXiFy-IDEA, which is the LaTeX plugin for IntelliJ (you might have heard of IntelliJ, given that you're using Kotlin now - TeXiFy has also been translated to Kotlin a few years ago.) https://github.com/Hannah-Sten/TeXiFy-IDEA
We're planning to provide (better) support for arara, I'm thinking of autocompletion on existing rules and some basic syntax highlighting in the arara magic comments. Completely supporting the MVEL syntax might be a bit too much, but who knows.
Maybe it will even help with more people getting to know that arara in fact exists and what it does, I didn't even know it myself until a user asked about it (okay, I've only been using LaTeX for like six years, but still).
However, before I spend a lot of time on introspecting your YAML (think of autocompletion of parameters for each rule for example): I have heard you are working on a Kotlin DSL. What is your intention exactly? Will it replace the YAML within, say, the next few years? I have read the complete manual but didn't find any reference to it yet.
Thanks for the outline! That looks indeed promising. Of course given that half of our users (some 10.000 monthly downloads at the moment) are using IntelliJ, that would really tie in nicely with the Kotlin DSL. (The other half is using PyCharm).
I haven't used Kotlin Multiplatform myself, I agree that it would be an important development direction but it's probably of less importance to IntelliJ/TeXiFy users.
That's true, so maybe for TeXiFy we should provide some basic YAML support for now, and then focus on the Kotlin DSL, when it is (almost) released, especially to figure out which arguments are present in user-written rules.
One thing that I'm not sure about what your ideas are, is about documentation of rules and arguments. Of course for built-in rules there is documentation in the manual, but what I mean is that in IntelliJ you can use the quick documentation popup to view documentation of stuff right inside the IDE. I think the best way would be to regex the manual LaTeX source? Because it seems to be more extended than the documentation inside the rules itself. The downside is that the source is, contrary to the rules, by default not available on the user's system, and that only works if you stick to the same way you write the LaTeX source of the manual. One other thing that we could try is opening the manual at exactly the right location, but that doesn't sound very easy as well.
Documentation of LaTeX elements is a problem broader than arara, it seems that nobody has thought of an IDE wanting to show inline documentation to LaTeX users, which I think is much more usable than having to search through very big pdfs manually (something that I rarely do, I rather just google what a command does).
We already have something like that for LaTeX commands and environments as they are defined in the dtx files, but the problem is that many package authors do not really adhere to the conventions specified by the 'doc' package. I would like to avoid that same problem for arara rules, if possible. (See e.g. the screenshot here: https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/LaTeX-documentation)
I really like the way you have made it easy with arara for users to specify custom steps in the compile sequence, and we are currently completely redesigning the LaTeX run configuration in order to make it just as easy to add custom steps. Then users can choose to specify their steps inside the LaTeX file when using arara, and when they don't want to touch the LaTeX file for some reason they can use the TeXiFy run configuration. (In case you were wondering how arara ties in with TeXiFy :) )
Sounds great, be sure to let me know how things progress, I will be keeping an eye on releases as well.
Thanks, I will look into kaml, that sounds easy enough to do. Will report back on that soon, when I have time to work on it.
Never heard of digestif, thanks for the link! Abby Berkers will have a look for some inspiration there. Yeah, especially the basic LaTeX commands are very badly documented.
Aha, that's very good to know, then let's wait with that until you figured out the markdown format. Would be great if it could be somewhat easy to parse for us, wherever it is. I think the extend of the documentation as it now is in the pdf is great.
Do you perhaps know what the url should be for the maven repo? Or maybe I made a different mistake in the build file: https://github.com/PHPirates/parse-arara-rules/blob/master/build.gradle.kts
because it can't find the dependencies.
I noticed though that I need a GitLab token in order to download them, this would be pretty inconvenient if everyone who wants to build TeXiFy needs to create their own GitLab token, but maybe I can create a dummy GitLab account and simply hardcode the token.
Does anyone use arara with make? Never had a problem before but now I'm getting make: arara: Permission denied. Works fine when calling arara directly from a bash terminal. In Makefile:
test.pdf : test.tex
which arara
arara test.texFrom command prompt:
$ make -B
which arara
/usr/local/texlive/default/bin/x86_64-linux/arara
arara test.tex
make: arara: Permission denied
make: *** [Makefile:3: test.pdf] Error 127
$ which arara
/usr/local/texlive/default/bin/x86_64-linux/arara
$ arara test
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
\__,_|_| \__,_|_| \__,_|
Processing 'test.tex' (size: 292 B, last modified: 05/19/2021
14:42:51), please wait.
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
Total: 0.93 secondsI can't think why it's suddenly stopped working when executed with make. (Other applications, such as pdflatex and bib2gls, are still working.) Any troubleshooting suggestions?