I wanted to automate conversion from pdf to animated gif with animate rule provided by cmhughes in answer to plotting the sequence x_n using tikz.
I'm using arara+texworks+miktex on windows. I also have imagemagick installed and working from command line.
I've saved cmhughes code as animate.yaml in my \rules folder. I add
% arara: pdflatex
% arara: animate
to my tex file (as example, this pgfplots code) and compile it with arara. The result is a correct pdf file but when starts animate it shows a message with
Running animate ...
Parámetro no válido: 10
FAILURE
Parámetro no válido means non valid parameter and I don't know which program (arara, convert) shows it.
I'm using arara from TeXworks with options --log and --verbose. After compiling a tex file, arara.log contains:
05 Jun 2013 15:52:58.687 INFO Arara - Welcome to arara!
05 Jun 2013 15:52:58.687 INFO Arara - Processing file '117309.tex', please wait.
05 Jun 2013 15:52:58.703 INFO DirectiveExtractor - Reading directives from 117309.tex.
05 Jun 2013 15:52:58.703 TRACE DirectiveExtractor - Directive found in line 1 with animate: {density: 200, delay: 10}.
05 Jun 2013 15:52:58.812 INFO DirectiveParser - Parsing directives.
05 Jun 2013 15:52:58.812 INFO TaskDeployer - Deploying tasks into commands.
05 Jun 2013 15:52:58.812 TRACE TaskDeployer - Task 'animate' found in 'D:\Archivos de programa\arara\rules'.
05 Jun 2013 15:52:59.125 INFO CommandTrigger - Ready to run commands.
05 Jun 2013 15:52:59.125 INFO CommandTrigger - Running 'animate'.
05 Jun 2013 15:52:59.125 TRACE CommandTrigger - Command: convert -delay 10 -loop 0 -density 200 "117309.pdf" "117309.gif"
05 Jun 2013 15:52:59.265 TRACE CommandTrigger - Output logging:
05 Jun 2013 15:52:59.265 TRACE CommandTrigger - Par metro no v lido: 10
05 Jun 2013 15:52:59.265 WARN CommandTrigger - 'animate' returned an error status.
05 Jun 2013 15:52:59.265 INFO Arara - Done.
(empty line is original, not my mistake editing it)
In any case, running command
convert -delay 10 -loop 0 -density 300 myfile.pdf myfile.gif
from command window works and creates a gif file. This command is what it's trying to do arara: animate.
Do you know what's wrong?
-v -lto the compilation ofarara. Then you have a verbosed arara log file. – Marco Daniel Jun 05 '13 at 11:06arara.logresults. – Ignasi Jun 05 '13 at 13:59-debug Allto convert. Then you get an output of the log ofconvert– Marco Daniel Jun 05 '13 at 14:06-debug Allto convert on command line I can see a lot of information but conversion still works. If I the option toyamlfile:- <arara> convert -debug All -delay @{delay} -loop @{loop} -density @{density} "@{getBasename(file)}.pdf" "@{getBasename(file)}.gif" > test.log 2>&1. Still nothing changes. The error is the same, process stops in same place and nothing is written intest.log. – Ignasi Jun 05 '13 at 16:26indentout of my editor. From the terminal everything works fine. I suppose you are compiling the document from the terminal with arara too. – Marco Daniel Jun 05 '13 at 16:35convertis being called (Windows has also a tool namedconvert, so there's a name clash). I have no Windows machine near me right now, so I cannot say for sure which PATHararais assuming (either user or system, I suspect system). As a workaround, replace- <arara> convertin Chris'animaterule by the full path to ImageMagick'sconvert, say,- <arara> "C:\Program Files\ImageMagick\bin\convert.exe"(I don't know the exact path) and try runningararaagain. Please tell me if this works, otherwise we have to come up with another solution.:)– Paulo Cereda Jun 05 '13 at 17:26ararastartswindows convertandcommand linestartsImageMagick convert. In any case, problem solved. If you think this question isnot too localizedand want to write an answer I'll accept it. – Ignasi Jun 05 '13 at 19:30arararelies solely on the system path. I'll investigate about it (I just need a Windows machine first), don't worry.:)I'll write an answer later on too.:)– Paulo Cereda Jun 05 '13 at 19:45cmd c/, as in- <arara> @{ isWindows( "cmd /c convert", "convert" ) } -delay @{delay} -loop @{loop} -density @{density} "@{ getBasename(file) }.pdf" "@{ getBasename(file) }.gif"– cmhughes Jun 06 '13 at 02:02convertfrom a command terminal and as I've ImageMagick's path in my user settings, ImageMagick's convert is the one which runs. Nice! – Ignasi Jun 06 '13 at 07:12