2

Hello after compiling the code found below using WinEdt 10 PDFLaTeX, I ran arara from the accessories menu but got an error I didn't get any directives in 'animated1.tex' , so didn't do anything...

Can you tell me how to use arara for this code:

%arara: animate: {density: 160, delay: 8}
\documentclass[tikz]{standalone}
\usepackage{amsmath,amssymb}
\usepackage{pgfplots}

\pgfplotsset{compat=1.13}
\usepgfplotslibrary{fillbetween}

\begin{document}
\foreach \mainangle [count=\xx, evaluate=\mainangle as \mark using (\mainangle/45)] in {0,5,...,355,360}{
\begin{tikzpicture}
\begin{axis}[
    set layers,
    x=1.5cm,y=1.5cm,
    xmin=-3.7, xmax=8.2,
    ymin=-1.5, ymax=1.5,
    axis lines=center,
    axis on top,
    xtick={2,4,6,8},
    ytick={-1,-.5,.5,1},
    xticklabels={$90^{\circ} (\pi/2)$, $180^{\circ} (\pi)$, $270^{\circ} (3\pi/2)$,$360^{\circ} (2\pi)$},
    xticklabel style={font=\tiny},
    yticklabels={-1,-0.5,0.5,1},
    ylabel={$\sin(x)$}, y label style={anchor=west},
    xlabel={$x$}, x label style={anchor=south},
]
\pgfonlayer{pre main}
\addplot [fill=white] coordinates {(-4,-2) (8.5,-2) (8.5,2) (-4,2)} \closedcycle;
\endpgfonlayer

\path[name path=xaxis] (axis cs:-4,0) -- (axis cs:8,0);
\coordinate (O) at (axis cs:0,0);

% plot and circle
\addplot [samples=100,domain=0:8, name path=myplot](\x,{3 * sin(\x*45)/pi});
\draw[name path=circle] (axis cs:-2.5,0) circle (1.5cm);

% fill in circle and plot
\draw[black,fill=blue!40] (axis cs:-2.5,0) -- (axis cs:-1.5,0) arc (0:\mainangle:1.5cm) coordinate (cc) -- cycle;
\path[name path=mark] (axis cs:\mark,-1) -- (axis cs:\mark,1);
% small circles
\draw (cc) circle (3pt);

\path[name intersections={of=mark and myplot,by=cp}];
\draw (cp) circle (3pt);
\draw (cc) -- (cp) -- (cp|-O);

\ifnum\mainangle<5
\else
\addplot[blue!30] fill between[of=xaxis and myplot, soft clip={domain=-1:\mark}];
\fi
\end{axis}
\end{tikzpicture}}
\end{document} 
Joe
  • 9,080

1 Answers1

4

You forgot a space in the arara directive.

The right one should be:

% arara: animate: {density: 160, delay: 8}

Remember that this directive works if you have the animate.yaml rule as in this cmhughes's answer and ImageMagick installed (during install time remember to check the option "Install legacy utilities (e.g. convert)" otherwise convert.exe won't be installed).

Also you need to have compiled the source file into .pdf otherwise the conversion cannot start.

So I suggest you to add the rule

% arara: pdflatex

before the above one and let arara do the whole work for you.

EDIT

Supposing that you're going to place your animate.yaml in the folder C:\arara\myrules, the contents of araraconfig.yaml must be

!config
paths:
- C:\arara\myrules

The file araraconfig.yaml has to be placed in the folder C:\Users\<Username>, where <Username> is your Windows User Account name.

Arzigoglu
  • 1,348
  • I got ImageMagick installed correctly, but still not sure how and where to put the animate.yaml file? What do I have to do to get this to work with WinEdt? Thanks. – Joe Jun 01 '17 at 01:08
  • 1
    @Joe You first have to create an araraconfig.yaml file in C:\Users\Username with your custom paths as described in the preface of section 6 ("Configuration file") and subsection 6.1 ("Search paths") of the arara manual. Then put your animate.yaml in one of the paths listed there. – Arzigoglu Jun 01 '17 at 05:08
  • @Joe Have you been able to make things work properly? – Arzigoglu Jun 01 '17 at 17:03
  • Not yet...still having issues. I will let you later today if I got anything going. Thanks for checking in! – Joe Jun 01 '17 at 18:23
  • I created the araraconfig.yaml, placed it in C:\Users\Username. I then created the animate.yaml file and placed it in C:\Program Files\arara\rules\. I ran the code above and still got the same error. I followed the steps that you requested. DId I place the animate.yaml in the wrong place? Is there something else that needs to be done? Thanks! – Joe Jun 02 '17 at 03:02
  • 1
    @Joe Does the edit in the answer helps? – Arzigoglu Jun 02 '17 at 04:54
  • I got a little further, but now I get this message: `I'm sorry, but apparently your arara configuration file is invalid, that is, it has invalid or missing YAML entries. Unfortunately, arara cannot proceed until the error is fixed. I tried my best to dump the error message, so here it is:

    Problem: Can't construct a java object for ... Unable to find property 'identifier' on class: com.github.arara.model.AraraConfiguration Error found in line 0, column 0. !config ^`

    – Joe Jun 02 '17 at 05:15
  • 1
    @Joe Which version of arara are you using? Note that both MiKTeX and TeX Live come with arara installed. – Arzigoglu Jun 02 '17 at 05:22
  • I did not know that. I went ahead and downloaded the arara-3.0-installer.exe from https://bintray.com/cereda/arara/installers/3.0. Also, I am using WinEdt. I installed the package for WinEdt and try to run arara from the Accessories option in WinEdt after running pdfLaTeX – Joe Jun 02 '17 at 05:28
  • 1
    @Joe Do you have Java installed? arara works only if you have Java on your machine. – Arzigoglu Jun 02 '17 at 05:29
  • I have Java 8 Update 112 installed on my machine – Joe Jun 02 '17 at 05:33
  • 1
    @Joe Isn't it that your custom arara installation is interferring with the arara which comes with your TeX distribution? Try uninstalling your custom arara. WinEdt will find the one of the distro. – Arzigoglu Jun 02 '17 at 05:58
  • this is the beginning of my animate.yaml file...`!config

    Arara, the cool TeX automation tool

    Copyright (c) 2012, Paulo Roberto Massa Cereda

    All rights reserved.

    This rule is part of arara.

    identifier: animate name: Animate authors:

    • Chris Hughes
    • Paulo Cereda

    commands:

    • name: The Convert program command: >...`..., This file is currently placed in the folder where I am generating the TeX output from WinEdt PDFLaTeX. Is this file correct?
    – Joe Jun 02 '17 at 22:23
  • This is my araraconfig.yaml file...`!config paths:
    • E:\FAU\tests\pgfplots\arara\myrules

    identifier: animate name: animate commands:

    • @{ isWindows( "cmd /c convert", "convert" ) } -delay @{delay} -loop @{loop} -density @{density} "@{ getBasename(file) }.pdf" "@{ getBasename(file) }.gif"

    arguments:

    • identifier: delay flag: @{parameters.delay} default: 10
    • identifier: loop flag: @{parameters.loop} default: 0
    • identifier: density flag: @{parameters.density} default: 300`
    – Joe Jun 02 '17 at 23:35