Workflow for projects with many tikz figures/plots
I love LaTeX and TikZ for creating high-quality documents. The problem is that large projects require a pretty long compilation time and that complicated TikZ figures/plots quickly exceed the memory cap. I can evade his problem if I include different sections into my main.tex and consequently uncomment them if I am not working on them. An alternative approach is an externalization of my TikZ figures/plots, but that is also not optimal, because often I will have to uncomment plots in sequential order and then compile each plot in sequential order. But compiling the whole project will be quite problematic.
Question: That is why I want to know the best practice for managing large
projects with a massive amount of TikZ figures/plots.
tikz-pgf pgfplots capacity
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I love LaTeX and TikZ for creating high-quality documents. The problem is that large projects require a pretty long compilation time and that complicated TikZ figures/plots quickly exceed the memory cap. I can evade his problem if I include different sections into my main.tex and consequently uncomment them if I am not working on them. An alternative approach is an externalization of my TikZ figures/plots, but that is also not optimal, because often I will have to uncomment plots in sequential order and then compile each plot in sequential order. But compiling the whole project will be quite problematic.
Question: That is why I want to know the best practice for managing large
projects with a massive amount of TikZ figures/plots.
tikz-pgf pgfplots capacity
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
For this sole reason, I switched toLuaLatexwhich doesn't suffer from this afore-mentioned memory issues. Then I started usingTikZexternalisefeature to cache my figures as apdfand re-include it whenever there are no changes made in them.
– Raaja
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago
add a comment |
I love LaTeX and TikZ for creating high-quality documents. The problem is that large projects require a pretty long compilation time and that complicated TikZ figures/plots quickly exceed the memory cap. I can evade his problem if I include different sections into my main.tex and consequently uncomment them if I am not working on them. An alternative approach is an externalization of my TikZ figures/plots, but that is also not optimal, because often I will have to uncomment plots in sequential order and then compile each plot in sequential order. But compiling the whole project will be quite problematic.
Question: That is why I want to know the best practice for managing large
projects with a massive amount of TikZ figures/plots.
tikz-pgf pgfplots capacity
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I love LaTeX and TikZ for creating high-quality documents. The problem is that large projects require a pretty long compilation time and that complicated TikZ figures/plots quickly exceed the memory cap. I can evade his problem if I include different sections into my main.tex and consequently uncomment them if I am not working on them. An alternative approach is an externalization of my TikZ figures/plots, but that is also not optimal, because often I will have to uncomment plots in sequential order and then compile each plot in sequential order. But compiling the whole project will be quite problematic.
Question: That is why I want to know the best practice for managing large
projects with a massive amount of TikZ figures/plots.
tikz-pgf pgfplots capacity
tikz-pgf pgfplots capacity
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 6 hours ago
JouleV
5,28621241
5,28621241
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 6 hours ago
MachineLearnerMachineLearner
1262
1262
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
MachineLearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
For this sole reason, I switched toLuaLatexwhich doesn't suffer from this afore-mentioned memory issues. Then I started usingTikZexternalisefeature to cache my figures as apdfand re-include it whenever there are no changes made in them.
– Raaja
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago
add a comment |
For this sole reason, I switched toLuaLatexwhich doesn't suffer from this afore-mentioned memory issues. Then I started usingTikZexternalisefeature to cache my figures as apdfand re-include it whenever there are no changes made in them.
– Raaja
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago
For this sole reason, I switched to
LuaLatex which doesn't suffer from this afore-mentioned memory issues. Then I started using TikZexternalise feature to cache my figures as a pdf and re-include it whenever there are no changes made in them.– Raaja
6 hours ago
For this sole reason, I switched to
LuaLatex which doesn't suffer from this afore-mentioned memory issues. Then I started using TikZexternalise feature to cache my figures as a pdf and re-include it whenever there are no changes made in them.– Raaja
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago
add a comment |
2 Answers
2
active
oldest
votes
If I understand you correctly, the reason why tikzexternalize is not working for you is because it gets confused and recompiles pictures when you change the order of figures by commenting out parts. The problem here seems to be that that tikzexternalize uses the relative position of a figure in the document to reference it.
One way to make tikzexternalize recognize pictures even if they change their position is to name them (then tikzexternalize will stop using the order to reference figures). Assuming you load your TikZ pictures from external files, you could do something like this:
newcommand{inputtikz}[1]{%
tikzsetnextfilename{#1}%
input{#1.tikz}%
}
and then use inputtikz{name of file} wherever you want to put your figure. This will be stable when you move your figures around or comment out sections.
Of yource you can also manually name each figure with tikzsetnextfilename{name} or define some other command/environment that does that, which is more suitable for your workflow.
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
add a comment |
What I would do in such a case is to redefine the environment of tikzpicture to be just a comment while working with the text or other part of my document and comment out this redefinition when the document is final or whenever I want to see it with all the figures inside.
I would also keep the old definition of it, in order to be able to work with individual tikzpictures in a environment called currenttikzpicture (this long name just for demonstration).
Code:
documentclass{article}
usepackage{tikz}
usepackage{verbatim}
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironment{tikzpicture}[1]{comment}{endcomment}
newenvironment{currenttikzpicture}[1]{oldtikzpicture[#1]}{oldendtikzpicture}
begin{document}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{currenttikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,green] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{currenttikzpicture}
Test
end{document}
PS: I know that the output would not keep the figures in the place that they should be, but I don't really care while trying to work faster.
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
});
}
});
MachineLearner is a new contributor. Be nice, and check out our Code of Conduct.
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%2f479265%2fworkflow-for-projects-with-many-tikz-figures-plots%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 I understand you correctly, the reason why tikzexternalize is not working for you is because it gets confused and recompiles pictures when you change the order of figures by commenting out parts. The problem here seems to be that that tikzexternalize uses the relative position of a figure in the document to reference it.
One way to make tikzexternalize recognize pictures even if they change their position is to name them (then tikzexternalize will stop using the order to reference figures). Assuming you load your TikZ pictures from external files, you could do something like this:
newcommand{inputtikz}[1]{%
tikzsetnextfilename{#1}%
input{#1.tikz}%
}
and then use inputtikz{name of file} wherever you want to put your figure. This will be stable when you move your figures around or comment out sections.
Of yource you can also manually name each figure with tikzsetnextfilename{name} or define some other command/environment that does that, which is more suitable for your workflow.
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
add a comment |
If I understand you correctly, the reason why tikzexternalize is not working for you is because it gets confused and recompiles pictures when you change the order of figures by commenting out parts. The problem here seems to be that that tikzexternalize uses the relative position of a figure in the document to reference it.
One way to make tikzexternalize recognize pictures even if they change their position is to name them (then tikzexternalize will stop using the order to reference figures). Assuming you load your TikZ pictures from external files, you could do something like this:
newcommand{inputtikz}[1]{%
tikzsetnextfilename{#1}%
input{#1.tikz}%
}
and then use inputtikz{name of file} wherever you want to put your figure. This will be stable when you move your figures around or comment out sections.
Of yource you can also manually name each figure with tikzsetnextfilename{name} or define some other command/environment that does that, which is more suitable for your workflow.
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
add a comment |
If I understand you correctly, the reason why tikzexternalize is not working for you is because it gets confused and recompiles pictures when you change the order of figures by commenting out parts. The problem here seems to be that that tikzexternalize uses the relative position of a figure in the document to reference it.
One way to make tikzexternalize recognize pictures even if they change their position is to name them (then tikzexternalize will stop using the order to reference figures). Assuming you load your TikZ pictures from external files, you could do something like this:
newcommand{inputtikz}[1]{%
tikzsetnextfilename{#1}%
input{#1.tikz}%
}
and then use inputtikz{name of file} wherever you want to put your figure. This will be stable when you move your figures around or comment out sections.
Of yource you can also manually name each figure with tikzsetnextfilename{name} or define some other command/environment that does that, which is more suitable for your workflow.
If I understand you correctly, the reason why tikzexternalize is not working for you is because it gets confused and recompiles pictures when you change the order of figures by commenting out parts. The problem here seems to be that that tikzexternalize uses the relative position of a figure in the document to reference it.
One way to make tikzexternalize recognize pictures even if they change their position is to name them (then tikzexternalize will stop using the order to reference figures). Assuming you load your TikZ pictures from external files, you could do something like this:
newcommand{inputtikz}[1]{%
tikzsetnextfilename{#1}%
input{#1.tikz}%
}
and then use inputtikz{name of file} wherever you want to put your figure. This will be stable when you move your figures around or comment out sections.
Of yource you can also manually name each figure with tikzsetnextfilename{name} or define some other command/environment that does that, which is more suitable for your workflow.
edited 5 hours ago
answered 5 hours ago
sheßsheß
2,18811435
2,18811435
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
add a comment |
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
However, could you also include your comments on the memory issue as well?
– Raaja
5 hours ago
1
1
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Sorry that was poorly written. What I am trying to tell you is, please consider adding some remarks on the case when the memory is too low for compiling a tikz image.
– Raaja
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
Concerning memory, I can't really say much without knowing a bit more about what @MachineLearner actually does (is a single picture the problem, the mass of picutures, or is it something else?). Yet, provided (s)he follows my suggestion above, (s)he'd never have to compile the whole document with all TikZ pictures at once. If some or all pictures are already pre-compiled and externalized from previous, partial runs memory should be less of an issue.
– sheß
5 hours ago
1
1
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
I agree with you here. Given the way the question is formulated, I think it is sufficient as you have given in your answer.
– Raaja
5 hours ago
add a comment |
What I would do in such a case is to redefine the environment of tikzpicture to be just a comment while working with the text or other part of my document and comment out this redefinition when the document is final or whenever I want to see it with all the figures inside.
I would also keep the old definition of it, in order to be able to work with individual tikzpictures in a environment called currenttikzpicture (this long name just for demonstration).
Code:
documentclass{article}
usepackage{tikz}
usepackage{verbatim}
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironment{tikzpicture}[1]{comment}{endcomment}
newenvironment{currenttikzpicture}[1]{oldtikzpicture[#1]}{oldendtikzpicture}
begin{document}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{currenttikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,green] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{currenttikzpicture}
Test
end{document}
PS: I know that the output would not keep the figures in the place that they should be, but I don't really care while trying to work faster.
add a comment |
What I would do in such a case is to redefine the environment of tikzpicture to be just a comment while working with the text or other part of my document and comment out this redefinition when the document is final or whenever I want to see it with all the figures inside.
I would also keep the old definition of it, in order to be able to work with individual tikzpictures in a environment called currenttikzpicture (this long name just for demonstration).
Code:
documentclass{article}
usepackage{tikz}
usepackage{verbatim}
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironment{tikzpicture}[1]{comment}{endcomment}
newenvironment{currenttikzpicture}[1]{oldtikzpicture[#1]}{oldendtikzpicture}
begin{document}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{currenttikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,green] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{currenttikzpicture}
Test
end{document}
PS: I know that the output would not keep the figures in the place that they should be, but I don't really care while trying to work faster.
add a comment |
What I would do in such a case is to redefine the environment of tikzpicture to be just a comment while working with the text or other part of my document and comment out this redefinition when the document is final or whenever I want to see it with all the figures inside.
I would also keep the old definition of it, in order to be able to work with individual tikzpictures in a environment called currenttikzpicture (this long name just for demonstration).
Code:
documentclass{article}
usepackage{tikz}
usepackage{verbatim}
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironment{tikzpicture}[1]{comment}{endcomment}
newenvironment{currenttikzpicture}[1]{oldtikzpicture[#1]}{oldendtikzpicture}
begin{document}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{currenttikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,green] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{currenttikzpicture}
Test
end{document}
PS: I know that the output would not keep the figures in the place that they should be, but I don't really care while trying to work faster.
What I would do in such a case is to redefine the environment of tikzpicture to be just a comment while working with the text or other part of my document and comment out this redefinition when the document is final or whenever I want to see it with all the figures inside.
I would also keep the old definition of it, in order to be able to work with individual tikzpictures in a environment called currenttikzpicture (this long name just for demonstration).
Code:
documentclass{article}
usepackage{tikz}
usepackage{verbatim}
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironment{tikzpicture}[1]{comment}{endcomment}
newenvironment{currenttikzpicture}[1]{oldtikzpicture[#1]}{oldendtikzpicture}
begin{document}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{tikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,red] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{tikzpicture}
begin{currenttikzpicture}[scale=0.5]
foreach i in {1,2,...,4}{draw[-,thick,green] (i,0)to[in={i*10}, out={170-i*10}]({2*i},{4*i+1}) to[in={170-i*10},out={270-i*10}] ({2*i-3},{i/10})--(i,0);}
end{currenttikzpicture}
Test
end{document}
PS: I know that the output would not keep the figures in the place that they should be, but I don't really care while trying to work faster.
answered 5 hours ago
koleygrkoleygr
12.5k11038
12.5k11038
add a comment |
add a comment |
MachineLearner is a new contributor. Be nice, and check out our Code of Conduct.
MachineLearner is a new contributor. Be nice, and check out our Code of Conduct.
MachineLearner is a new contributor. Be nice, and check out our Code of Conduct.
MachineLearner is a new contributor. Be nice, and check out our Code of Conduct.
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.
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%2f479265%2fworkflow-for-projects-with-many-tikz-figures-plots%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
For this sole reason, I switched to
LuaLatexwhich doesn't suffer from this afore-mentioned memory issues. Then I started usingTikZexternalisefeature to cache my figures as apdfand re-include it whenever there are no changes made in them.– Raaja
6 hours ago
Hi @MachineLearner, IMHO externalization is the way to go. I am not sure I fully understood the issue you had with that can you maybe elaborate on why this is not suited for you?
– sheß
6 hours ago
An alternative to externalize is to use standalone and only recompile when the images change. Basically, this is what externalize does (or attempts to do) automatically.
– John Kormylo
1 hour ago