circuitikz vs. tikzpicture: generating multipage standalone documents for animations












5














This is a problem I found a while ago, and haven't been able to figure out. Maybe is something wrong with my distribution, but don't know exactly how to fix it. Here is the idea



Consider this script



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{tikzpicture}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{tikzpicture}
}
end{document}


When I run it, it produces 10 pages which then I can use to produce a gif



enter image description here



If on the other hand I change the enviroment to circuitikz



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


I get one single page with all frames on it



enter image description here



and then transforming this to a gif has proven a bit difficult to do.



Any ideas as to why this is happening? Thanks!



I'm using Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7)










share|improve this question
























  • I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
    – marmot
    46 mins ago












  • I didn't know that standalone could produce more than a single page document.
    – Sigur
    43 mins ago










  • @Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
    – marmot
    38 mins ago










  • @marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
    – Sigur
    33 mins ago










  • @Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
    – marmot
    31 mins ago
















5














This is a problem I found a while ago, and haven't been able to figure out. Maybe is something wrong with my distribution, but don't know exactly how to fix it. Here is the idea



Consider this script



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{tikzpicture}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{tikzpicture}
}
end{document}


When I run it, it produces 10 pages which then I can use to produce a gif



enter image description here



If on the other hand I change the enviroment to circuitikz



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


I get one single page with all frames on it



enter image description here



and then transforming this to a gif has proven a bit difficult to do.



Any ideas as to why this is happening? Thanks!



I'm using Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7)










share|improve this question
























  • I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
    – marmot
    46 mins ago












  • I didn't know that standalone could produce more than a single page document.
    – Sigur
    43 mins ago










  • @Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
    – marmot
    38 mins ago










  • @marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
    – Sigur
    33 mins ago










  • @Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
    – marmot
    31 mins ago














5












5








5


1





This is a problem I found a while ago, and haven't been able to figure out. Maybe is something wrong with my distribution, but don't know exactly how to fix it. Here is the idea



Consider this script



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{tikzpicture}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{tikzpicture}
}
end{document}


When I run it, it produces 10 pages which then I can use to produce a gif



enter image description here



If on the other hand I change the enviroment to circuitikz



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


I get one single page with all frames on it



enter image description here



and then transforming this to a gif has proven a bit difficult to do.



Any ideas as to why this is happening? Thanks!



I'm using Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7)










share|improve this question















This is a problem I found a while ago, and haven't been able to figure out. Maybe is something wrong with my distribution, but don't know exactly how to fix it. Here is the idea



Consider this script



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{tikzpicture}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{tikzpicture}
}
end{document}


When I run it, it produces 10 pages which then I can use to produce a gif



enter image description here



If on the other hand I change the enviroment to circuitikz



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}

begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


I get one single page with all frames on it



enter image description here



and then transforming this to a gif has proven a bit difficult to do.



Any ideas as to why this is happening? Thanks!



I'm using Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7)







tikz-pgf circuitikz standalone gif






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 mins ago







caverac

















asked 49 mins ago









caveraccaverac

5,9901625




5,9901625












  • I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
    – marmot
    46 mins ago












  • I didn't know that standalone could produce more than a single page document.
    – Sigur
    43 mins ago










  • @Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
    – marmot
    38 mins ago










  • @marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
    – Sigur
    33 mins ago










  • @Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
    – marmot
    31 mins ago


















  • I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
    – marmot
    46 mins ago












  • I didn't know that standalone could produce more than a single page document.
    – Sigur
    43 mins ago










  • @Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
    – marmot
    38 mins ago










  • @marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
    – Sigur
    33 mins ago










  • @Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
    – marmot
    31 mins ago
















I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
– marmot
46 mins ago






I guess you need to tell standalone that you have a new standalone environment. So just add standaloneenv{circuitikz} after usepackage{circuitikz}.
– marmot
46 mins ago














I didn't know that standalone could produce more than a single page document.
– Sigur
43 mins ago




I didn't know that standalone could produce more than a single page document.
– Sigur
43 mins ago












@Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
– marmot
38 mins ago




@Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif via convert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif.
– marmot
38 mins ago












@marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
– Sigur
33 mins ago




@marmot, this I know. But I suppose that the pdf can not come from a standalone class file.
– Sigur
33 mins ago












@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
31 mins ago




@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
31 mins ago










1 Answer
1






active

oldest

votes


















5














If you say documentclass[border = 5pt, tikz]{standalone} this does not just load tikz but also tells standalone that it should produce single pdf's for each tikzpicture. In order to generate separate pdf's for circuitikz you could do



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}
standaloneenv{circuitikz}
begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


enter image description here






share|improve this answer





















  • Note to myself: next time ask sooner :) Thanks a bunch
    – caverac
    36 mins ago










  • This MWE will be very useful in the future.
    – Sigur
    32 mins ago










  • BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
    – caverac
    30 mins ago










  • @caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
    – marmot
    26 mins ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469021%2fcircuitikz-vs-tikzpicture-generating-multipage-standalone-documents-for-animat%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














If you say documentclass[border = 5pt, tikz]{standalone} this does not just load tikz but also tells standalone that it should produce single pdf's for each tikzpicture. In order to generate separate pdf's for circuitikz you could do



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}
standaloneenv{circuitikz}
begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


enter image description here






share|improve this answer





















  • Note to myself: next time ask sooner :) Thanks a bunch
    – caverac
    36 mins ago










  • This MWE will be very useful in the future.
    – Sigur
    32 mins ago










  • BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
    – caverac
    30 mins ago










  • @caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
    – marmot
    26 mins ago
















5














If you say documentclass[border = 5pt, tikz]{standalone} this does not just load tikz but also tells standalone that it should produce single pdf's for each tikzpicture. In order to generate separate pdf's for circuitikz you could do



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}
standaloneenv{circuitikz}
begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


enter image description here






share|improve this answer





















  • Note to myself: next time ask sooner :) Thanks a bunch
    – caverac
    36 mins ago










  • This MWE will be very useful in the future.
    – Sigur
    32 mins ago










  • BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
    – caverac
    30 mins ago










  • @caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
    – marmot
    26 mins ago














5












5








5






If you say documentclass[border = 5pt, tikz]{standalone} this does not just load tikz but also tells standalone that it should produce single pdf's for each tikzpicture. In order to generate separate pdf's for circuitikz you could do



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}
standaloneenv{circuitikz}
begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


enter image description here






share|improve this answer












If you say documentclass[border = 5pt, tikz]{standalone} this does not just load tikz but also tells standalone that it should produce single pdf's for each tikzpicture. In order to generate separate pdf's for circuitikz you could do



documentclass[border = 5pt, tikz]{standalone}
usepackage{circuitikz}
standaloneenv{circuitikz}
begin{document}
foreach k in {1,...,10}
{
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
fill[red] (k/5, 1) circle (0.1);
end{circuitikz}
}
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 42 mins ago









marmotmarmot

89.3k4102193




89.3k4102193












  • Note to myself: next time ask sooner :) Thanks a bunch
    – caverac
    36 mins ago










  • This MWE will be very useful in the future.
    – Sigur
    32 mins ago










  • BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
    – caverac
    30 mins ago










  • @caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
    – marmot
    26 mins ago


















  • Note to myself: next time ask sooner :) Thanks a bunch
    – caverac
    36 mins ago










  • This MWE will be very useful in the future.
    – Sigur
    32 mins ago










  • BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
    – caverac
    30 mins ago










  • @caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
    – marmot
    26 mins ago
















Note to myself: next time ask sooner :) Thanks a bunch
– caverac
36 mins ago




Note to myself: next time ask sooner :) Thanks a bunch
– caverac
36 mins ago












This MWE will be very useful in the future.
– Sigur
32 mins ago




This MWE will be very useful in the future.
– Sigur
32 mins ago












BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
– caverac
30 mins ago




BTW, I couldn't come up with a more descriptive title for the question, or at least easier to find for similar users with the same problem. If you have suggestions, please feel free to edit it. Thanks once again
– caverac
30 mins ago












@caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
– marmot
26 mins ago




@caverac Perhaps: "Generating multipage standalone documents for animations of less common environments like circuitikz." (BTW, the above is just one option, there are more that are described on p. 10 of the standalone manual.)
– marmot
26 mins ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469021%2fcircuitikz-vs-tikzpicture-generating-multipage-standalone-documents-for-animat%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

濃尾地震

How to rewrite equation of hyperbola in standard form

No ethernet ip address in my vocore2