11

Consider the following files

myfile.tex

% arara: myrule: {items: [lions, zebras]}
\documentclass{article}

\begin{document}
hello world
\end{document}

myrule.yaml

!config
#
# Sample usage
# % arara: myrule: {items: [lions]}
# % arara: myrule: {items: [lions, zebras]}
#
identifier: myrule
name: Myrule
commands: 
- <arara> echo @{item}
arguments: []

If I run arara in verbose mode on myfile.tex using

arara -v myfile

then the output is

  __ _ _ __ __ _ _ __ __ _ 
 / _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
 \__,_|_|  \__,_|_|  \__,_|

Running Myrule... 

lions
Status: SUCCESS

Running Myrule... 

zebras
Status: SUCCESS

If I run it in silent mode using

arara myfile

then the output is

  __ _ _ __ __ _ _ __ __ _ 
 / _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
 \__,_|_|  \__,_|_|  \__,_|

Running Myrule... SUCCESS
Running Myrule... SUCCESS

I would like to get more information about the @{item} currently being processed, even when I'm compiling in silent mode; explicitly, my desired result (when running arara myfile) would be something like

  __ _ _ __ __ _ _ __ __ _ 
 / _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
 \__,_|_|  \__,_|_|  \__,_|

Running Myrule (lions)... SUCCESS
Running Myrule (zebras)... SUCCESS

Is such output possible?

PS: My example above is a toy example- the 'real-life' code is in How to create individual chapter PDFs

7

Now you make me feel really bad and regret my decision of not making the name field in the arara rule specification expandable. :)

I'm deeply sorry, but this is not possible. When I defined the rule spec, back in version 1.0, I could not find out any real world example for providing variable expansion in the name field. As usual, time proved me wrong, and your example clearly presents a nice user case of how one could benefit from a feature like this. :)

That said, I think this feature is very doable and might reach the upcoming versions of arara. Sadly, arara is becoming more and more complex feature-wise, and I'm really worried of breaking backwards compatibility (I already did in 3.0, and I'm not inclined to do it again), since now we have a larger user base. I have an alternative solution, which might be a fork under a new bird name, which holds the bleeding edge features for advanced users, while arara keeps the traditional approach without breaking compilation chains. Let's see what I'll be able to come up with, time will tell. :)

Edit: percusse suggested in the chatroom for us to create a third execution mode, which is the middle of silent and verbose, called sibose. Oh my. :P

  • Thanks Paulo! I certainly didn't mean to make you feel bad :"( I love the tool- this question was more of an idea than anything else :) Thanks for releasing such a wonderful tool! – cmhughes Sep 13 '13 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.