Automatic arrangement of the same type of theorem environments











up vote
2
down vote

favorite
1












Consider the following:



documentclass{article}
newtheorem{exe}{Exercise}
newtheorem{sol}{Solution}

begin{document}

begin{exe}
dots
end{exe}

begin{sol}
here the solution for Exercise 1
end{sol}

begin{exe}
dots
end{exe}

begin{sol}
here the solution for Exercise 2
end{sol}

end{document}


Is there a way (a switch) to automatically reorder the theorem environments by type without reordering them manually, that means to get the same output as



documentclass{article}
newtheorem{exe}{Exercise}
newtheorem{sol}{Solution}

begin{document}

begin{exe}
dots
end{exe}

begin{exe}
dots
end{exe}

begin{sol}
here the solution for Exercise 1
end{sol}

begin{sol}
here the solution for Exercise 2
end{sol}

end{document}


?



Update:



Actually I need a "switch" for this one:



documentclass{article}
newtheorem{exe}{Exercise}
newtheorem{sol}{Solution}

begin{document}

begin{exe}
dots
end{exe}

bigskip

begin{sol}
here the solution for Exercise 1
end{sol}

bigskip

begin{exe}
dots
end{exe}

bigskip

begin{sol}
here the solution for Exercise 2
end{sol}

end{document}


so that it has the same output as



documentclass{article}
newtheorem{exe}{Exercise}
newtheorem{sol}{Solution}

begin{document}

begin{exe}
dots
end{exe}

bigskip

begin{exe}
dots
end{exe}

bigskip

begin{sol}
here the solution for Exercise 1
end{sol}

bigskip

begin{sol}
here the solution for Exercise 2
end{sol}

end{document}









share|improve this question




























    up vote
    2
    down vote

    favorite
    1












    Consider the following:



    documentclass{article}
    newtheorem{exe}{Exercise}
    newtheorem{sol}{Solution}

    begin{document}

    begin{exe}
    dots
    end{exe}

    begin{sol}
    here the solution for Exercise 1
    end{sol}

    begin{exe}
    dots
    end{exe}

    begin{sol}
    here the solution for Exercise 2
    end{sol}

    end{document}


    Is there a way (a switch) to automatically reorder the theorem environments by type without reordering them manually, that means to get the same output as



    documentclass{article}
    newtheorem{exe}{Exercise}
    newtheorem{sol}{Solution}

    begin{document}

    begin{exe}
    dots
    end{exe}

    begin{exe}
    dots
    end{exe}

    begin{sol}
    here the solution for Exercise 1
    end{sol}

    begin{sol}
    here the solution for Exercise 2
    end{sol}

    end{document}


    ?



    Update:



    Actually I need a "switch" for this one:



    documentclass{article}
    newtheorem{exe}{Exercise}
    newtheorem{sol}{Solution}

    begin{document}

    begin{exe}
    dots
    end{exe}

    bigskip

    begin{sol}
    here the solution for Exercise 1
    end{sol}

    bigskip

    begin{exe}
    dots
    end{exe}

    bigskip

    begin{sol}
    here the solution for Exercise 2
    end{sol}

    end{document}


    so that it has the same output as



    documentclass{article}
    newtheorem{exe}{Exercise}
    newtheorem{sol}{Solution}

    begin{document}

    begin{exe}
    dots
    end{exe}

    bigskip

    begin{exe}
    dots
    end{exe}

    bigskip

    begin{sol}
    here the solution for Exercise 1
    end{sol}

    bigskip

    begin{sol}
    here the solution for Exercise 2
    end{sol}

    end{document}









    share|improve this question


























      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      Consider the following:



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      Is there a way (a switch) to automatically reorder the theorem environments by type without reordering them manually, that means to get the same output as



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      ?



      Update:



      Actually I need a "switch" for this one:



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      bigskip

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      so that it has the same output as



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      bigskip

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}









      share|improve this question















      Consider the following:



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      Is there a way (a switch) to automatically reorder the theorem environments by type without reordering them manually, that means to get the same output as



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      begin{exe}
      dots
      end{exe}

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      ?



      Update:



      Actually I need a "switch" for this one:



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      bigskip

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}


      so that it has the same output as



      documentclass{article}
      newtheorem{exe}{Exercise}
      newtheorem{sol}{Solution}

      begin{document}

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{exe}
      dots
      end{exe}

      bigskip

      begin{sol}
      here the solution for Exercise 1
      end{sol}

      bigskip

      begin{sol}
      here the solution for Exercise 2
      end{sol}

      end{document}






      environments






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 6 at 22:49

























      asked Dec 6 at 18:34









      Thrash

      34319




      34319






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          You can gather the text of the solutions and print them at a certain point.



          This can be accomplished with environ.



          documentclass{article}
          usepackage{environ}

          newtheorem{exe}{Exercise}
          newtheorem{printsol}{Solution}

          NewEnviron{sol}{%
          xdefsolutionsuptonow{%
          unexpandedexpandafter{solutionsuptonow}%
          noexpandbegin{printsol}%
          unexpandedexpandafter{BODY}%
          noexpandend{printsol}%
          }%
          }
          newcommand{solutionsuptonow}{}
          newcommand{printsolutions}{solutionsuptonowgdefsolutionsuptonows{}}

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printsolutions

          end{document}


          enter image description here



          A different coding that adds spaces between exercises and solutions.



          documentclass{article}
          usepackage{environ,xparse}

          newtheorem{printexe}{Exercise}
          newtheorem{printsol}{Solution}

          ExplSyntaxOn
          NewEnviron{exe}
          {
          thrash_add:NnV g_thrash_exercises_seq {exe} BODY
          }
          NewEnviron{sol}
          {
          thrash_add:NnV g_thrash_solutions_seq {sol} BODY
          }

          NewDocumentCommand{printexercises}{}
          {
          seq_use:Nn g_thrash_exercises_seq { bigskip }
          bigskip
          seq_use:Nn g_thrash_solutions_seq { bigskip }
          seq_gclear:N g_thrash_exercisess_seq
          seq_gclear:N g_thrash_solutions_seq
          }

          seq_new:N g_thrash_exercises_seq
          seq_new:N g_thrash_solutions_seq

          cs_new_protected:Nn thrash_add:Nnn
          {
          seq_gput_right:Nn #1 { begin{print#2}#3end{print#2} }
          }
          cs_generate_variant:Nn thrash_add:Nnn { NnV }

          ExplSyntaxOff

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printexercises

          end{document}


          enter image description here






          share|improve this answer























          • Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
            – Thrash
            Dec 6 at 22:07












          • @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
            – egreg
            Dec 6 at 22:09












          • I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
            – Thrash
            Dec 6 at 22:32






          • 1




            @Thrash Added the code
            – egreg
            Dec 6 at 22:50






          • 1




            @Thrash Changed the coding.
            – egreg
            Dec 6 at 23:14











          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',
          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%2f463565%2fautomatic-arrangement-of-the-same-type-of-theorem-environments%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








          up vote
          2
          down vote













          You can gather the text of the solutions and print them at a certain point.



          This can be accomplished with environ.



          documentclass{article}
          usepackage{environ}

          newtheorem{exe}{Exercise}
          newtheorem{printsol}{Solution}

          NewEnviron{sol}{%
          xdefsolutionsuptonow{%
          unexpandedexpandafter{solutionsuptonow}%
          noexpandbegin{printsol}%
          unexpandedexpandafter{BODY}%
          noexpandend{printsol}%
          }%
          }
          newcommand{solutionsuptonow}{}
          newcommand{printsolutions}{solutionsuptonowgdefsolutionsuptonows{}}

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printsolutions

          end{document}


          enter image description here



          A different coding that adds spaces between exercises and solutions.



          documentclass{article}
          usepackage{environ,xparse}

          newtheorem{printexe}{Exercise}
          newtheorem{printsol}{Solution}

          ExplSyntaxOn
          NewEnviron{exe}
          {
          thrash_add:NnV g_thrash_exercises_seq {exe} BODY
          }
          NewEnviron{sol}
          {
          thrash_add:NnV g_thrash_solutions_seq {sol} BODY
          }

          NewDocumentCommand{printexercises}{}
          {
          seq_use:Nn g_thrash_exercises_seq { bigskip }
          bigskip
          seq_use:Nn g_thrash_solutions_seq { bigskip }
          seq_gclear:N g_thrash_exercisess_seq
          seq_gclear:N g_thrash_solutions_seq
          }

          seq_new:N g_thrash_exercises_seq
          seq_new:N g_thrash_solutions_seq

          cs_new_protected:Nn thrash_add:Nnn
          {
          seq_gput_right:Nn #1 { begin{print#2}#3end{print#2} }
          }
          cs_generate_variant:Nn thrash_add:Nnn { NnV }

          ExplSyntaxOff

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printexercises

          end{document}


          enter image description here






          share|improve this answer























          • Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
            – Thrash
            Dec 6 at 22:07












          • @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
            – egreg
            Dec 6 at 22:09












          • I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
            – Thrash
            Dec 6 at 22:32






          • 1




            @Thrash Added the code
            – egreg
            Dec 6 at 22:50






          • 1




            @Thrash Changed the coding.
            – egreg
            Dec 6 at 23:14















          up vote
          2
          down vote













          You can gather the text of the solutions and print them at a certain point.



          This can be accomplished with environ.



          documentclass{article}
          usepackage{environ}

          newtheorem{exe}{Exercise}
          newtheorem{printsol}{Solution}

          NewEnviron{sol}{%
          xdefsolutionsuptonow{%
          unexpandedexpandafter{solutionsuptonow}%
          noexpandbegin{printsol}%
          unexpandedexpandafter{BODY}%
          noexpandend{printsol}%
          }%
          }
          newcommand{solutionsuptonow}{}
          newcommand{printsolutions}{solutionsuptonowgdefsolutionsuptonows{}}

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printsolutions

          end{document}


          enter image description here



          A different coding that adds spaces between exercises and solutions.



          documentclass{article}
          usepackage{environ,xparse}

          newtheorem{printexe}{Exercise}
          newtheorem{printsol}{Solution}

          ExplSyntaxOn
          NewEnviron{exe}
          {
          thrash_add:NnV g_thrash_exercises_seq {exe} BODY
          }
          NewEnviron{sol}
          {
          thrash_add:NnV g_thrash_solutions_seq {sol} BODY
          }

          NewDocumentCommand{printexercises}{}
          {
          seq_use:Nn g_thrash_exercises_seq { bigskip }
          bigskip
          seq_use:Nn g_thrash_solutions_seq { bigskip }
          seq_gclear:N g_thrash_exercisess_seq
          seq_gclear:N g_thrash_solutions_seq
          }

          seq_new:N g_thrash_exercises_seq
          seq_new:N g_thrash_solutions_seq

          cs_new_protected:Nn thrash_add:Nnn
          {
          seq_gput_right:Nn #1 { begin{print#2}#3end{print#2} }
          }
          cs_generate_variant:Nn thrash_add:Nnn { NnV }

          ExplSyntaxOff

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printexercises

          end{document}


          enter image description here






          share|improve this answer























          • Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
            – Thrash
            Dec 6 at 22:07












          • @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
            – egreg
            Dec 6 at 22:09












          • I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
            – Thrash
            Dec 6 at 22:32






          • 1




            @Thrash Added the code
            – egreg
            Dec 6 at 22:50






          • 1




            @Thrash Changed the coding.
            – egreg
            Dec 6 at 23:14













          up vote
          2
          down vote










          up vote
          2
          down vote









          You can gather the text of the solutions and print them at a certain point.



          This can be accomplished with environ.



          documentclass{article}
          usepackage{environ}

          newtheorem{exe}{Exercise}
          newtheorem{printsol}{Solution}

          NewEnviron{sol}{%
          xdefsolutionsuptonow{%
          unexpandedexpandafter{solutionsuptonow}%
          noexpandbegin{printsol}%
          unexpandedexpandafter{BODY}%
          noexpandend{printsol}%
          }%
          }
          newcommand{solutionsuptonow}{}
          newcommand{printsolutions}{solutionsuptonowgdefsolutionsuptonows{}}

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printsolutions

          end{document}


          enter image description here



          A different coding that adds spaces between exercises and solutions.



          documentclass{article}
          usepackage{environ,xparse}

          newtheorem{printexe}{Exercise}
          newtheorem{printsol}{Solution}

          ExplSyntaxOn
          NewEnviron{exe}
          {
          thrash_add:NnV g_thrash_exercises_seq {exe} BODY
          }
          NewEnviron{sol}
          {
          thrash_add:NnV g_thrash_solutions_seq {sol} BODY
          }

          NewDocumentCommand{printexercises}{}
          {
          seq_use:Nn g_thrash_exercises_seq { bigskip }
          bigskip
          seq_use:Nn g_thrash_solutions_seq { bigskip }
          seq_gclear:N g_thrash_exercisess_seq
          seq_gclear:N g_thrash_solutions_seq
          }

          seq_new:N g_thrash_exercises_seq
          seq_new:N g_thrash_solutions_seq

          cs_new_protected:Nn thrash_add:Nnn
          {
          seq_gput_right:Nn #1 { begin{print#2}#3end{print#2} }
          }
          cs_generate_variant:Nn thrash_add:Nnn { NnV }

          ExplSyntaxOff

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printexercises

          end{document}


          enter image description here






          share|improve this answer














          You can gather the text of the solutions and print them at a certain point.



          This can be accomplished with environ.



          documentclass{article}
          usepackage{environ}

          newtheorem{exe}{Exercise}
          newtheorem{printsol}{Solution}

          NewEnviron{sol}{%
          xdefsolutionsuptonow{%
          unexpandedexpandafter{solutionsuptonow}%
          noexpandbegin{printsol}%
          unexpandedexpandafter{BODY}%
          noexpandend{printsol}%
          }%
          }
          newcommand{solutionsuptonow}{}
          newcommand{printsolutions}{solutionsuptonowgdefsolutionsuptonows{}}

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printsolutions

          end{document}


          enter image description here



          A different coding that adds spaces between exercises and solutions.



          documentclass{article}
          usepackage{environ,xparse}

          newtheorem{printexe}{Exercise}
          newtheorem{printsol}{Solution}

          ExplSyntaxOn
          NewEnviron{exe}
          {
          thrash_add:NnV g_thrash_exercises_seq {exe} BODY
          }
          NewEnviron{sol}
          {
          thrash_add:NnV g_thrash_solutions_seq {sol} BODY
          }

          NewDocumentCommand{printexercises}{}
          {
          seq_use:Nn g_thrash_exercises_seq { bigskip }
          bigskip
          seq_use:Nn g_thrash_solutions_seq { bigskip }
          seq_gclear:N g_thrash_exercisess_seq
          seq_gclear:N g_thrash_solutions_seq
          }

          seq_new:N g_thrash_exercises_seq
          seq_new:N g_thrash_solutions_seq

          cs_new_protected:Nn thrash_add:Nnn
          {
          seq_gput_right:Nn #1 { begin{print#2}#3end{print#2} }
          }
          cs_generate_variant:Nn thrash_add:Nnn { NnV }

          ExplSyntaxOff

          begin{document}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 1
          end{sol}

          begin{exe}
          dots
          end{exe}

          begin{sol}
          here the solution for Exercise 2
          end{sol}

          printexercises

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 6 at 23:14

























          answered Dec 6 at 21:05









          egreg

          704k8618763155




          704k8618763155












          • Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
            – Thrash
            Dec 6 at 22:07












          • @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
            – egreg
            Dec 6 at 22:09












          • I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
            – Thrash
            Dec 6 at 22:32






          • 1




            @Thrash Added the code
            – egreg
            Dec 6 at 22:50






          • 1




            @Thrash Changed the coding.
            – egreg
            Dec 6 at 23:14


















          • Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
            – Thrash
            Dec 6 at 22:07












          • @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
            – egreg
            Dec 6 at 22:09












          • I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
            – Thrash
            Dec 6 at 22:32






          • 1




            @Thrash Added the code
            – egreg
            Dec 6 at 22:50






          • 1




            @Thrash Changed the coding.
            – egreg
            Dec 6 at 23:14
















          Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
          – Thrash
          Dec 6 at 22:07






          Thank you! Why not just newcommand{solutionsuptonow} instead of the two lines and in the end solutionsuptonow instead of printsolutions? It works, too.
          – Thrash
          Dec 6 at 22:07














          @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
          – egreg
          Dec 6 at 22:09






          @Thrash You want to clear the container of solutions up to now and not print again and again the old solutions, don't you? ;-)
          – egreg
          Dec 6 at 22:09














          I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
          – Thrash
          Dec 6 at 22:32




          I don't understand your question, but I'm a LateX layman. Another question: What if I have a bigskip between the theorem environments?
          – Thrash
          Dec 6 at 22:32




          1




          1




          @Thrash Added the code
          – egreg
          Dec 6 at 22:50




          @Thrash Added the code
          – egreg
          Dec 6 at 22:50




          1




          1




          @Thrash Changed the coding.
          – egreg
          Dec 6 at 23:14




          @Thrash Changed the coding.
          – egreg
          Dec 6 at 23:14


















          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%2f463565%2fautomatic-arrangement-of-the-same-type-of-theorem-environments%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 change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents