circuitikz vs. tikzpicture: generating multipage standalone documents for animations
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
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
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 animations gif
|
show 1 more comment
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
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
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 animations gif
I didn't know thatstandalone
could produce more than a single page document.
– Sigur
yesterday
2
@Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif viaconvert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif
.
– marmot
yesterday
1
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
1
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
1
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago
|
show 1 more comment
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
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
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 animations gif
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
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
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 animations gif
tikz-pgf circuitikz standalone animations gif
edited yesterday
AlexG
32.4k479143
32.4k479143
asked yesterday
caveraccaverac
6,1171727
6,1171727
I didn't know thatstandalone
could produce more than a single page document.
– Sigur
yesterday
2
@Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif viaconvert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif
.
– marmot
yesterday
1
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
1
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
1
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago
|
show 1 more comment
I didn't know thatstandalone
could produce more than a single page document.
– Sigur
yesterday
2
@Sigur Many animations are produced by producing a multipage pdf first and then convert this to an animated gif viaconvert -density <density> -delay <delay> -loop 0 -alpha remove multipage.pdf anited.gif
.
– marmot
yesterday
1
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
1
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
1
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago
I didn't know that
standalone
could produce more than a single page document.– Sigur
yesterday
I didn't know that
standalone
could produce more than a single page document.– Sigur
yesterday
2
2
@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
yesterday
@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
yesterday
1
1
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
1
1
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
1
1
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago
|
show 1 more comment
2 Answers
2
active
oldest
votes
If you say documentclass[border = 5pt, tikz]{standalone}
this does not just load tikz
but also tells standalone
that it should produce single pdf pages for each tikzpicture
. In order to generate separate pdf pages 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}
Note that this possibility is not unique. Another possibility is to use
documentclass[border = 5pt, multi={circuitikz}]{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}
instead. For further information, please consult the standalone
manual on p. 10.
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
add a comment |
The same as an animated SVG, using the animations
library of TikZ/Pgf-3.1:
Compile with
latex example
dvisvgm --zoom=-1 example
example.tex
:
documentclass[dvisvgm]{standalone}
usepackage{circuitikz}
usetikzlibrary{animations}
begin{document}
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
scoped [name=circle, animate = {
object=circle, :shift = { 0s = "{(1/5,1)}", 3s = "{(2,1)}", repeats }
}
] fill[red] (0,0) circle (0.1);
end{circuitikz}
end{document}
Amazing, was this introduced in 3.1?
– caverac
yesterday
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you say documentclass[border = 5pt, tikz]{standalone}
this does not just load tikz
but also tells standalone
that it should produce single pdf pages for each tikzpicture
. In order to generate separate pdf pages 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}
Note that this possibility is not unique. Another possibility is to use
documentclass[border = 5pt, multi={circuitikz}]{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}
instead. For further information, please consult the standalone
manual on p. 10.
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
add a comment |
If you say documentclass[border = 5pt, tikz]{standalone}
this does not just load tikz
but also tells standalone
that it should produce single pdf pages for each tikzpicture
. In order to generate separate pdf pages 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}
Note that this possibility is not unique. Another possibility is to use
documentclass[border = 5pt, multi={circuitikz}]{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}
instead. For further information, please consult the standalone
manual on p. 10.
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
add a comment |
If you say documentclass[border = 5pt, tikz]{standalone}
this does not just load tikz
but also tells standalone
that it should produce single pdf pages for each tikzpicture
. In order to generate separate pdf pages 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}
Note that this possibility is not unique. Another possibility is to use
documentclass[border = 5pt, multi={circuitikz}]{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}
instead. For further information, please consult the standalone
manual on p. 10.
If you say documentclass[border = 5pt, tikz]{standalone}
this does not just load tikz
but also tells standalone
that it should produce single pdf pages for each tikzpicture
. In order to generate separate pdf pages 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}
Note that this possibility is not unique. Another possibility is to use
documentclass[border = 5pt, multi={circuitikz}]{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}
instead. For further information, please consult the standalone
manual on p. 10.
edited yesterday
answered yesterday
marmotmarmot
89.9k4103194
89.9k4103194
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
add a comment |
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
Note to myself: next time ask sooner :) Thanks a bunch
– caverac
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
This MWE will be very useful in the future.
– Sigur
yesterday
add a comment |
The same as an animated SVG, using the animations
library of TikZ/Pgf-3.1:
Compile with
latex example
dvisvgm --zoom=-1 example
example.tex
:
documentclass[dvisvgm]{standalone}
usepackage{circuitikz}
usetikzlibrary{animations}
begin{document}
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
scoped [name=circle, animate = {
object=circle, :shift = { 0s = "{(1/5,1)}", 3s = "{(2,1)}", repeats }
}
] fill[red] (0,0) circle (0.1);
end{circuitikz}
end{document}
Amazing, was this introduced in 3.1?
– caverac
yesterday
add a comment |
The same as an animated SVG, using the animations
library of TikZ/Pgf-3.1:
Compile with
latex example
dvisvgm --zoom=-1 example
example.tex
:
documentclass[dvisvgm]{standalone}
usepackage{circuitikz}
usetikzlibrary{animations}
begin{document}
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
scoped [name=circle, animate = {
object=circle, :shift = { 0s = "{(1/5,1)}", 3s = "{(2,1)}", repeats }
}
] fill[red] (0,0) circle (0.1);
end{circuitikz}
end{document}
Amazing, was this introduced in 3.1?
– caverac
yesterday
add a comment |
The same as an animated SVG, using the animations
library of TikZ/Pgf-3.1:
Compile with
latex example
dvisvgm --zoom=-1 example
example.tex
:
documentclass[dvisvgm]{standalone}
usepackage{circuitikz}
usetikzlibrary{animations}
begin{document}
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
scoped [name=circle, animate = {
object=circle, :shift = { 0s = "{(1/5,1)}", 3s = "{(2,1)}", repeats }
}
] fill[red] (0,0) circle (0.1);
end{circuitikz}
end{document}
The same as an animated SVG, using the animations
library of TikZ/Pgf-3.1:
Compile with
latex example
dvisvgm --zoom=-1 example
example.tex
:
documentclass[dvisvgm]{standalone}
usepackage{circuitikz}
usetikzlibrary{animations}
begin{document}
begin{circuitikz}
draw (0, 0) rectangle (2, 2);
scoped [name=circle, animate = {
object=circle, :shift = { 0s = "{(1/5,1)}", 3s = "{(2,1)}", repeats }
}
] fill[red] (0,0) circle (0.1);
end{circuitikz}
end{document}
edited 5 hours ago
answered yesterday
AlexGAlexG
32.4k479143
32.4k479143
Amazing, was this introduced in 3.1?
– caverac
yesterday
add a comment |
Amazing, was this introduced in 3.1?
– caverac
yesterday
Amazing, was this introduced in 3.1?
– caverac
yesterday
Amazing, was this introduced in 3.1?
– caverac
yesterday
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
I didn't know that
standalone
could produce more than a single page document.– Sigur
yesterday
2
@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
yesterday
1
@Sigur Yes, it does. If you compile the fist file in the above question, you get a multipage pdf.
– marmot
yesterday
1
Btw, shouldn't animated SVG be the preferred format nowadays ;-) ?
– AlexG
yesterday
1
The tikz option not only loads tikz, it also sets [multi=tikzpicture] (which is not always a good thing to do). [multi={circuitikz,tikzpicture}] is what you want.
– John Kormylo
23 hours ago