Workflow for projects with many tikz figures/plots

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












5















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.











share|improve this question
























  • 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
    Mar 13 at 11:58












  • 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ß
    Mar 13 at 12:02











  • 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
    Mar 13 at 16:32
















5















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.











share|improve this question
























  • 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
    Mar 13 at 11:58












  • 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ß
    Mar 13 at 12:02











  • 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
    Mar 13 at 16:32














5












5








5


1






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.











share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 13 at 11:57









JouleV

12.6k22663




12.6k22663










asked Mar 13 at 11:54









MachineLearnerMachineLearner

1285




1285












  • 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
    Mar 13 at 11:58












  • 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ß
    Mar 13 at 12:02











  • 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
    Mar 13 at 16:32


















  • 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
    Mar 13 at 11:58












  • 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ß
    Mar 13 at 12:02











  • 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
    Mar 13 at 16:32

















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
Mar 13 at 11:58






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
Mar 13 at 11:58














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ß
Mar 13 at 12:02





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ß
Mar 13 at 12:02













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
Mar 13 at 16:32






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
Mar 13 at 16:32











2 Answers
2






active

oldest

votes


















5














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:



newcommandinputtikz[1]%
tikzsetnextfilename#1%
input#1.tikz%



and then use inputtikzname 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 tikzsetnextfilenamename or define some other command/environment that does that, which is more suitable for your workflow.






share|improve this answer

























  • However, could you also include your comments on the memory issue as well?

    – Raaja
    Mar 13 at 12:33






  • 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
    Mar 13 at 12:50











  • 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ß
    Mar 13 at 13:00






  • 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
    Mar 13 at 13:04






  • 1





    I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

    – MachineLearner
    Mar 14 at 13:15


















2














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:



documentclassarticle 
usepackagetikz
usepackageverbatim
letoldtikzpicturetikzpicture
letoldendtikzpictureendtikzpicture
renewenvironmenttikzpicture[1]commentendcomment
newenvironmentcurrenttikzpicture[1]oldtikzpicture[#1]oldendtikzpicture

begindocument
begintikzpicture[scale=0.5]
foreach i in 1,2,...,4draw[-,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);
endtikzpicture

begintikzpicture[scale=0.5]
foreach i in 1,2,...,4draw[-,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);
endtikzpicture

begintikzpicture[scale=0.5]
foreach i in 1,2,...,4draw[-,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);
endtikzpicture

begincurrenttikzpicture[scale=0.5]
foreach i in 1,2,...,4draw[-,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);
endcurrenttikzpicture



Test
enddocument


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.






share|improve this answer























    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%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









    5














    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:



    newcommandinputtikz[1]%
    tikzsetnextfilename#1%
    input#1.tikz%



    and then use inputtikzname 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 tikzsetnextfilenamename or define some other command/environment that does that, which is more suitable for your workflow.






    share|improve this answer

























    • However, could you also include your comments on the memory issue as well?

      – Raaja
      Mar 13 at 12:33






    • 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
      Mar 13 at 12:50











    • 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ß
      Mar 13 at 13:00






    • 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
      Mar 13 at 13:04






    • 1





      I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

      – MachineLearner
      Mar 14 at 13:15















    5














    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:



    newcommandinputtikz[1]%
    tikzsetnextfilename#1%
    input#1.tikz%



    and then use inputtikzname 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 tikzsetnextfilenamename or define some other command/environment that does that, which is more suitable for your workflow.






    share|improve this answer

























    • However, could you also include your comments on the memory issue as well?

      – Raaja
      Mar 13 at 12:33






    • 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
      Mar 13 at 12:50











    • 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ß
      Mar 13 at 13:00






    • 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
      Mar 13 at 13:04






    • 1





      I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

      – MachineLearner
      Mar 14 at 13:15













    5












    5








    5







    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:



    newcommandinputtikz[1]%
    tikzsetnextfilename#1%
    input#1.tikz%



    and then use inputtikzname 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 tikzsetnextfilenamename or define some other command/environment that does that, which is more suitable for your workflow.






    share|improve this answer















    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:



    newcommandinputtikz[1]%
    tikzsetnextfilename#1%
    input#1.tikz%



    and then use inputtikzname 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 tikzsetnextfilenamename or define some other command/environment that does that, which is more suitable for your workflow.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 13 at 12:21

























    answered Mar 13 at 12:12









    sheßsheß

    2,06511436




    2,06511436












    • However, could you also include your comments on the memory issue as well?

      – Raaja
      Mar 13 at 12:33






    • 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
      Mar 13 at 12:50











    • 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ß
      Mar 13 at 13:00






    • 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
      Mar 13 at 13:04






    • 1





      I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

      – MachineLearner
      Mar 14 at 13:15

















    • However, could you also include your comments on the memory issue as well?

      – Raaja
      Mar 13 at 12:33






    • 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
      Mar 13 at 12:50











    • 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ß
      Mar 13 at 13:00






    • 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
      Mar 13 at 13:04






    • 1





      I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

      – MachineLearner
      Mar 14 at 13:15
















    However, could you also include your comments on the memory issue as well?

    – Raaja
    Mar 13 at 12:33





    However, could you also include your comments on the memory issue as well?

    – Raaja
    Mar 13 at 12:33




    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
    Mar 13 at 12:50





    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
    Mar 13 at 12:50













    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ß
    Mar 13 at 13:00





    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ß
    Mar 13 at 13:00




    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
    Mar 13 at 13:04





    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
    Mar 13 at 13:04




    1




    1





    I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

    – MachineLearner
    Mar 14 at 13:15





    I will check this out as soon as I feel comfortable with this solution I will accept your answer. At the moment I am struggling with Texmaker with compiling my references. As soon as this is resolved I can check out your method.

    – MachineLearner
    Mar 14 at 13:15











    2














    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:



    documentclassarticle 
    usepackagetikz
    usepackageverbatim
    letoldtikzpicturetikzpicture
    letoldendtikzpictureendtikzpicture
    renewenvironmenttikzpicture[1]commentendcomment
    newenvironmentcurrenttikzpicture[1]oldtikzpicture[#1]oldendtikzpicture

    begindocument
    begintikzpicture[scale=0.5]
    foreach i in 1,2,...,4draw[-,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);
    endtikzpicture

    begintikzpicture[scale=0.5]
    foreach i in 1,2,...,4draw[-,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);
    endtikzpicture

    begintikzpicture[scale=0.5]
    foreach i in 1,2,...,4draw[-,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);
    endtikzpicture

    begincurrenttikzpicture[scale=0.5]
    foreach i in 1,2,...,4draw[-,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);
    endcurrenttikzpicture



    Test
    enddocument


    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.






    share|improve this answer



























      2














      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:



      documentclassarticle 
      usepackagetikz
      usepackageverbatim
      letoldtikzpicturetikzpicture
      letoldendtikzpictureendtikzpicture
      renewenvironmenttikzpicture[1]commentendcomment
      newenvironmentcurrenttikzpicture[1]oldtikzpicture[#1]oldendtikzpicture

      begindocument
      begintikzpicture[scale=0.5]
      foreach i in 1,2,...,4draw[-,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);
      endtikzpicture

      begintikzpicture[scale=0.5]
      foreach i in 1,2,...,4draw[-,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);
      endtikzpicture

      begintikzpicture[scale=0.5]
      foreach i in 1,2,...,4draw[-,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);
      endtikzpicture

      begincurrenttikzpicture[scale=0.5]
      foreach i in 1,2,...,4draw[-,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);
      endcurrenttikzpicture



      Test
      enddocument


      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.






      share|improve this answer

























        2












        2








        2







        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:



        documentclassarticle 
        usepackagetikz
        usepackageverbatim
        letoldtikzpicturetikzpicture
        letoldendtikzpictureendtikzpicture
        renewenvironmenttikzpicture[1]commentendcomment
        newenvironmentcurrenttikzpicture[1]oldtikzpicture[#1]oldendtikzpicture

        begindocument
        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begincurrenttikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endcurrenttikzpicture



        Test
        enddocument


        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.






        share|improve this answer













        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:



        documentclassarticle 
        usepackagetikz
        usepackageverbatim
        letoldtikzpicturetikzpicture
        letoldendtikzpictureendtikzpicture
        renewenvironmenttikzpicture[1]commentendcomment
        newenvironmentcurrenttikzpicture[1]oldtikzpicture[#1]oldendtikzpicture

        begindocument
        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begintikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endtikzpicture

        begincurrenttikzpicture[scale=0.5]
        foreach i in 1,2,...,4draw[-,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);
        endcurrenttikzpicture



        Test
        enddocument


        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 13 at 12:33









        koleygrkoleygr

        13.4k11039




        13.4k11039



























            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.




            draft saved


            draft discarded














            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





















































            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 check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?