2

In the following MWE I put an extra space in front of tikzpicture. When running this with LuaLaTeX, I get 18 errors (not really part of the question, but why is that so sensitive, does matter at all and has such bad error messages???). When running it with arara, I get a complete breakdown of the process. I have to stop the two (why two?) lualatex.exe processes in my Windows Task Manager.

This is really annoying. Is there something in arara or in TeXnicCenter or in LuaLaTeX?

% arara: lualatex: { shell: yes }

\documentclass[convert]{standalone}
\usepackage{tikz}

\begin{document}

\begin{ tikzpicture}    
    \draw (0,0) -- (1,1);
\end{tikzpicture}

\end{document}

Edit when I stop the process of the first lualatex.exe, the building process continues showing me the one actual error. Then it starts the run and stops as before. When stopping the second process, arara writes ? FAILURE and TeXnicCenter Building process canceled by user.

LaRiFaRi
  • 43,807
  • 8
    I believe you answered your question yourself: the correct code is \begin{tikzpicture} (without space). \begin{ tikzpicture} is just wrong, so there is no reason to expect lualatex, arara or any other TeX tool to process it correctly! – Xavier Aug 07 '13 at 13:35
  • Number of errors doesn't mean anything http://tex.stackexchange.com/questions/95396/that-makes-100-errors-and-one-question . It's almost always the first one that matters. – percusse Aug 07 '13 at 13:38
  • Yes, of course, but I think it is a bug, if arara breaks down and lualatex doesn't. In the arara run, it stops at the error but at first I had no idea on how to correct it, if everything is stuck. Did a log off first. Than noticed the two instances of lualatex processes which I have to force to stop. – LaRiFaRi Aug 07 '13 at 13:38
  • @percusse Yes I know. The first error here would be "Environment tikzpicture undefined". If you see the second space at once, no problem. Still no userfriendly. But that's not really the topic. How do I prevent arara from breaking down on such typos. (Edit: there are two spaces in front of tikzpicture. The comment deletes it) – LaRiFaRi Aug 07 '13 at 13:41
  • 3
    This is the standard behaviour of arara, if any of the commands it runs produces an error, the arara reports FAILED. – Andrew Swann Aug 07 '13 at 14:03
  • 1
    But it doesn't for me. It stops in this line. The button "cancel building process" in TeXnicCenter is out of function. As I wrote: it's a break down or a veeeery slow report of FAILED. My System: MikTeX 2.9 on XP 64 bit. Arara downloaded today. – LaRiFaRi Aug 07 '13 at 14:12
  • 3
    Why the close votes? Also this seems to be a TC bug. From terminal it goes through – percusse Aug 07 '13 at 14:22
  • 2
    I'll take a look. :) My good friend percusse mentioned a similar behaviour before, and I suspect it's somehow related to the way the editor handles external processes (I assume the issue is not reproduced when arara is called from the terminal Update: percusse just confirmed this). I have no Windows machine at the moment, but I'll try to set up a VM and take a closer look at everything, from the JVM memory allocation with arara to the API calls from TeXnicCenter. Sorry for the trouble. – Paulo Cereda Aug 07 '13 at 14:24
  • Just for completeness: I tested arara: pdflatex and arara: xelatx, too, as well as with and without --shell-escape resp. arara: lualatex: { shell: yes }. Same behavior. There are not always two instances opened of the engines. Can't reproduce when for now. – LaRiFaRi Aug 07 '13 at 14:25
  • Guys, please, do not vote to close this question! – Paulo Cereda Aug 07 '13 at 14:25
  • @PauloCereda Thanks very much. I am very much looking forward to use arara as it looks great. But I will stop that for the moment, as it would disturb my working. Should I report something to TC? Not sure what, if I am honest. (Edit: and please don't apologize! Can't remember I paid something...) – LaRiFaRi Aug 07 '13 at 14:28
  • 1
    @LaRiFaRi TeXnicCenter looks for closure to enable the run buttons. So it's not actually following the actual process. Either arara should tell TC that there is a result or TC should know that arara is an interim and looks for its output. unfortunately defining the output profile doesn't guarantee the error-handling. – percusse Aug 07 '13 at 14:29
  • OK, I understand. If you want, you may edit the title of my question. Or is it better, to leave it, as it is? – LaRiFaRi Aug 07 '13 at 14:33
  • 1
    @LaRiFaRi: I'll investigate first. :) – Paulo Cereda Aug 07 '13 at 14:46
  • @PauloCereda Could you find something? Just to remember you. If this is a longer job, you could (or I will) write an answer, that this is a TC problem. I would like to close this post here thereafter. Thank you. – LaRiFaRi Sep 09 '13 at 07:55
  • 1
    @PauloCereda Nothing new about this? – egreg Dec 07 '13 at 22:32
  • 1
    @egreg, LaRiFaRi: I'll write an answer. – Paulo Cereda Dec 08 '13 at 14:00
  • @PauloCereda Do you think that six months for an answer are sufficient procrastination? – egreg May 03 '14 at 22:26

1 Answers1

6

Dealing with processes is not a trivial task, sadly.

From the terminal, arara prints the compilation status and ends, as expected. When called from editors, I believe it's a matter on how each developer decided to handle process input/output. From TeXworks, things seem smooth, even if it requires user interaction. I once once a problem with TeXnicCenter when trying to rerun pdflatex: the last process call got stuck somehow and files were locked. The only way to have my files "released" was to kill the offending process via task manager, so things started working again.

TeXnicCenter gave me a couple of headaches in the past, so I still believe there's nothing I could do on my end (the arara part). That said, it's worth mentioning that Windows behaves quite differently from Unix.

arara is a Java program. Any calls to arara will redirect to a call to java -jar arara.jar and the Java Virtual Machine will be in charge of the execution. In Unix, we have that as a shell script (thanks to Karl for the suggestion), and in Windows, it's an .exe; both are, in fact, wrappers to the .jar itself. Maybe, maybe TeXnicCenter is confused with the .exe resolving to a call to the JVM. What I can suggest is the following:

Try replacing the call to C:\Program Files\arara\arara.exe in TeXnicCenter with a direct call to the JVM with java -jar "C:\Program Files\arara\arara.jar", followed of course by the editor parameters. At least now we are "skipping" one expansion from the wrapper to a VM call. But this is just a thought, I have no Windows machine around to test it. :(

Sorry for the imprecise answer, but sadly the solution (if any) is on uncharted territory. As I mentioned before, calling stuff from stuff is very tricky and, most of the time, we just get the idea from phenomena observation. :(

I'm in the middle of developing a new version. I'll see what can be done when dealing with processes. That's also a hint for me to set a Windows VM. At least I'll have Windows inside a cage, where it should be. :)

Paulo Cereda
  • 44,220