Installation and dependencies

The Latex actor system

The "latex actor system" is intended to take as input a LaTeX filename and produce as output the "recursive" content of that file with all the explicitly replaced by the content of "file.tex".

The use of our actor system makes the recomposition work extremely multi-thread and then(?) efficient.

This is still under development.

How it works

The behaviour of an actor is :

What you need to know

The only class you have to work with is LatexCode. That class provides an abstraction that hides the actor system to the user.

Working actor vs. Active actor

A LatexActor can be active or not, as any actor. The LatexActor has an other status that is "working" or not.

An actor which is requested to create the code of the file "foo.tex" reads this file and send a request message to a new actor each time that it encounters a "" in "foo.tex". Such an actor has to be able to read new messages since it relies on the answer messages in order to complete its work.

So such a working actor is set "inactive" in order to unlock its mail box. But it is still working and cannot be requested to work on an other tex file until "foo.tex" is completed and sent to the calling actor.

The LatexActorSystem has a method

public LatexActorRef getNonWorkingActor()

which return an actor reference to an actor who can be requested to deal with a new tex file. The actor is 'working' from the moment it is returned.

Latex message

The latex actor system recognize two types of messages.

Hypothesis on the LaTeX source code (simplification and limitations)

Not standalone

The produced LaTeX code is in general not a standalone that can be fed to pdflatex.

These points explain why the test directory mazhe_tex_test is so large : this is a real live test, and the real live does not fulfills the limitations of some softwares (one should fix the live).


The input mechanism in LaTeX seems complex and I didn't study it. In particular, what makes the space after an input ? This question has an answer that is too complicated for me.

If someone can explain me that clearly, I'd appreciate.


with 1_file.tex containing only "A" and 2_file.tex containing "B" (no 'new line' or something). frtex will add a \n after the input if it is not followed by an other \n. So it will translate the second and third examples in the same way. LaTeX makes a difference that I do not understand.


with foo.tex containing "a=b" does not provoke error. This is why frtex does not add a "" if the input statement is already followed by a newline.

Fixing this bug would require pure LaTeX (not Java) knowledge that I don't have. In particular, clearly understand the answer here.


I sometimes have a NullPointerException in MultiFIFOMap.poll. Not always. Search in progress ...


use mvn test to see the result.

Notice that this software is still under development. I try to not commit (and even less push) versions that do nothing else than a crash...