Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 07 13:02
    GitLab | Ben Frank pushed 2 commits to arara
  • Apr 25 10:50
    GitLab | Paulo Cereda pushed 1 commits to arara
  • Apr 24 15:41
    GitLab | Paulo Cereda pushed to arara
  • Apr 15 09:08
    GitLab | Ben Frank pushed 6 commits to arara
  • Apr 11 15:28
    GitLab | Ben Frank pushed 7 commits to arara
  • Apr 11 14:44
    GitLab | Ben Frank pushed to arara
  • Apr 11 14:42
    GitLab | Ben Frank pushed 7 commits to arara
  • Apr 11 14:42
    GitLab | Ben Frank pushed 1 commits to arara
  • Apr 10 13:35
    GitLab | Ben Frank pushed 2 commits to arara
  • Apr 09 11:35
    GitLab | Ben Frank pushed 1 commits to arara
  • Apr 09 11:25
    GitLab | Ben Frank pushed 15 commits to arara
  • Apr 09 10:45
    GitLab | Ben Frank pushed 1 commits to arara
  • Apr 09 10:34
    GitLab | Ben Frank pushed to arara
  • Apr 09 10:27
    GitLab | Ben Frank pushed 5 commits to arara
  • Apr 09 10:27
  • Apr 07 21:17
    GitLab | Ben Frank pushed 1 commits to arara
  • Apr 07 09:54
  • Apr 04 16:50
    GitLab | Ben Frank pushed 4 commits to arara
  • Apr 04 16:50
  • Apr 04 16:48
    GitLab | Paulo Cereda pushed 1 commits to arara
Fred Guth
@fredguth
I am still a little confused about where the "if" ends. It seems to end in return flag, right?
Paulo Cereda
@cereda

I am still a little confused about where the "if" ends. It seems to end in return flag, right?

Yes, it is correct. Another hint is the --> prefix, which indicates the line is a continuation of the previous one.

Although this is definitely not my favourite preamble, it tracks all .tex files and checks their statuses. :)
As time went by, people started using arara for more and more complex tasks. :)
Fred Guth
@fredguth
I understand... n thesis.tex I have now:
% 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
Which I understand means that thesis.tex will be recompiled if I changed any of the Chapters. But it would be nicer if I had some kind of way to includeonly the chapter needing recompilation. Does it make any sense? I guess if I compile only one chapter it may lead to problems with page numbering.
I understand... n thesis.tex I have now:
% 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
Which I understand means that thesis.tex will be recompiled if I changed any of the Chapters. But it would be nicer if I had some kind of way to includeonly the chapter needing recompilation. Does it make any sense? I guess if I compile only one chapter it may lead to problems with page numbering.
Paulo Cereda
@cereda

[...] Which I understand means that thesis.tex will be recompiled if I changed any of the Chapters. But it would be nicer if I had some kind of way to includeonly the chapter needing recompilation. Does it make any sense? I guess if I compile only one chapter it may lead to problems with page numbering.

I think I see what you mean, but this is not possible with TeX. It's either everything or nothing...

There are some tricks regarding TikZ externalization, but that only applies to... well, TikZ. :)
You are probably thinking along the lines of having an "object code" in the typical CS sense, so you "only" update the modified files.
Fred Guth
@fredguth
Exactly... for my paper reviews, I made a simple python script to compile in parallel. I do that because sometimes I change the bibliography and need to review all the papers at once. It is a little faster in parallel (half of the time).
Another road block here:
% arara: bibtex if changed('bibliography.bib') || missing('bbl')
is not running bibtex when I change bibliography.bib
Paulo Cereda
@cereda
That's easy to fix:
% arara: bibtex if changed(toFile('bibliography.bib')) || missing('bbl')
Fred Guth
@fredguth
my bad... thanks.
Paulo Cereda
@cereda
changed('foo') checks for changes in <basename>.foo. :)
Oh no worries! Been there, done that. :)
How many roads must a man walk down. :D
Fred Guth
@fredguth
Now, if I run bibtex, I may need to run pdflatex several times until there is no reference error.
If I just
% 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')
Paulo Cereda
@cereda
Let me think. :)
Fred Guth
@fredguth
maybe the pdflatex until need to be with the bibtex and only run if there is a change in the bib file.
Paulo Cereda
@cereda
Yes, that might be a sensible approach. thought of using sessions, but this might work just fine. :)
Fred Guth
@fredguth

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.

Paulo Cereda
@cereda
My best guess is that you have an undefined reference/label, so at least one of the conditions will evaluate to 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. :)
Ben Frank
@benfrank_gitlab
@fredguth It's currently not implemented (and neither is it easy) to find out the specific part of a condition as the whole conditional block is evaluated as one and arara only gets to see the result of the evaluation. I concur with @cereda that you probably have an undefined reference and should look into the TeX log.
Fred Guth
@fredguth
Ok.
Fred Guth
@fredguth
If I change my .tex to:
% arara: pdflatex: {options: ['-interaction=batchmode']} while found('log', 'undefined references')

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"
Ben Frank
@benfrank_gitlab
@fredguth We have some suspicion what might cause this behavior. Particularly, it may be some kind of trouble caused by the multi-file setup (with the files from the subdirectory). @cereda already investigates potential issues to get back to you :slight_smile:
Fred Guth
@fredguth
thanks
Paulo Cereda
@cereda
@fredguth sorry for the late reply, today has been hectic. It's challenging to spot a potential issue by only inspecting the directives and one file. Your setup is far from being trivial and there are lots of files involved. What does 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...
Daniel
@dan-r95

@dan-r95 Hello Daniel! I just commited a move rule to our repository: https://gitlab.com/islandoftex/arara/-/blob/development/rules/arara-rule-move.yaml

thank you for the updated rule!

1 reply
Gitlab Notifications
@gitlab:t2bot.io
[m]
[Island of TeX/arara] Ben Frank created tag v6.0.0
[Island of TeX/arara] Ben Frank created tag v6.0.0
Ben Frank
@benfrank_gitlab
arara version 6 has been released. See the CHANGELOG for details. Thanks for all suggestions. We will ship it in TL2021 pretest within the next days :slight_smile:
Gitlab Notifications
@gitlab:t2bot.io
[m]
[Island of TeX/arara] Ben Frank created tag v6.0.1
Gitlab Notifications
@gitlab:t2bot.io
[m]
[Island of TeX/arara] Ben Frank created tag v6.0.1
[Island of TeX/arara] Ben Frank created tag v6.0.1
Gitlab Notifications
@gitlab:t2bot.io
[m]
[Island of TeX/arara] Ben Frank created tag v6.0.2
Gitlab Notifications
@gitlab:t2bot.io
[m]
[Island of TeX/arara] Paulo Cereda created tag v6.1.0
phpirates
@phpirates:matrix.org
[m]

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.

1 reply
Thomas Schouten
@phpirates:matrix.org
[m]

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

phpirates
@phpirates:matrix.org
[m]

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.

Paulo Cereda
@cereda:matrix.org
[m]
Hi friends! We could think of including field descriptions in the rules themselves, as a means to make them self-documented and contained. I think Ben Frank and I could could discuss this internally, but I see an interesting potential in this approach (not only tied to YAML). Either through explicit declarations or some sort of Python-like docstrings... :)
Thomas Schouten
@phpirates:matrix.org
[m]
Hi Paulo! Indeed, I have a habit of documenting my Kotlin methods, and it would make sense to me to do that for my arara rules as well. The question is how to do it in such a way that it is easy to use for everyone but also useful for use in IDEs like IntelliJ and possibly others in the future (and not too hard for me to support ;) ). Thanks, let me know when you have some definite ideas about it!
1 reply
Thomas Schouten
@phpirates:matrix.org
[m]
Thanks to your help it was indeed easy to parse the yaml files, but how do you propose to do dependency management, as arara isn't published in a maven repo somewhere is it? I could of course simply copy the jar as a dependency to TeXiFy, but it would be nice to make updating arara a little bit easier than that. (https://github.com/PHPirates/parse-arara-rules)
1 reply
Aha, I had not noticed that gitlab had a package registry, thanks!
1 reply
Thomas Schouten
@phpirates:matrix.org
[m]

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.

1 reply
Thomas Schouten
@phpirates:matrix.org
[m]
Right, that fixes it, I must have been misled by the GitLab docs regarding authentication. Thanks for the help!