subequations: How to continue numbering while considering scrbook numbering scheme?












2















The user daleif has posted a nice approach on how to increase equation numbers when using subequations.





Minimum Working Example (MWE):



documentclass{scrbook}
usepackage{amsmath}
newcommandStepSubequations{
stepcounter{parentequation}
gdeftheparentequation{arabic{parentequation}}
setcounter{equation}{0}
}

begin{document}

First, some normal equation:

begin{equation}
content...
end{equation}

And in following the subequations:

begin{subequations}
begin{align}
1 &= 1\
2 &= 2\
StepSubequations
3 &= 3\% from here a new equation number should begin
4 &= 4
end{align}
end{subequations}

begin{equation}
label{eq:1}
a=b
end{equation}

end{document}




Screenshot of the result:



Screenshot of the result





Description of the issue:



As you can see, scrbook uses a custom numbering scheme like chapternumber.equationnumber. With the counter modification from daleif this does not work unfortunately.



Is there an option available to consider the common scrbook numbering scheme in subequations as well?



In the upper example the subequation numbers should appear like:



0.2a, 0.2b, 0.3a and 0.3b to match the numbering scheme of scrbook.










share|improve this question



























    2















    The user daleif has posted a nice approach on how to increase equation numbers when using subequations.





    Minimum Working Example (MWE):



    documentclass{scrbook}
    usepackage{amsmath}
    newcommandStepSubequations{
    stepcounter{parentequation}
    gdeftheparentequation{arabic{parentequation}}
    setcounter{equation}{0}
    }

    begin{document}

    First, some normal equation:

    begin{equation}
    content...
    end{equation}

    And in following the subequations:

    begin{subequations}
    begin{align}
    1 &= 1\
    2 &= 2\
    StepSubequations
    3 &= 3\% from here a new equation number should begin
    4 &= 4
    end{align}
    end{subequations}

    begin{equation}
    label{eq:1}
    a=b
    end{equation}

    end{document}




    Screenshot of the result:



    Screenshot of the result





    Description of the issue:



    As you can see, scrbook uses a custom numbering scheme like chapternumber.equationnumber. With the counter modification from daleif this does not work unfortunately.



    Is there an option available to consider the common scrbook numbering scheme in subequations as well?



    In the upper example the subequation numbers should appear like:



    0.2a, 0.2b, 0.3a and 0.3b to match the numbering scheme of scrbook.










    share|improve this question

























      2












      2








      2








      The user daleif has posted a nice approach on how to increase equation numbers when using subequations.





      Minimum Working Example (MWE):



      documentclass{scrbook}
      usepackage{amsmath}
      newcommandStepSubequations{
      stepcounter{parentequation}
      gdeftheparentequation{arabic{parentequation}}
      setcounter{equation}{0}
      }

      begin{document}

      First, some normal equation:

      begin{equation}
      content...
      end{equation}

      And in following the subequations:

      begin{subequations}
      begin{align}
      1 &= 1\
      2 &= 2\
      StepSubequations
      3 &= 3\% from here a new equation number should begin
      4 &= 4
      end{align}
      end{subequations}

      begin{equation}
      label{eq:1}
      a=b
      end{equation}

      end{document}




      Screenshot of the result:



      Screenshot of the result





      Description of the issue:



      As you can see, scrbook uses a custom numbering scheme like chapternumber.equationnumber. With the counter modification from daleif this does not work unfortunately.



      Is there an option available to consider the common scrbook numbering scheme in subequations as well?



      In the upper example the subequation numbers should appear like:



      0.2a, 0.2b, 0.3a and 0.3b to match the numbering scheme of scrbook.










      share|improve this question














      The user daleif has posted a nice approach on how to increase equation numbers when using subequations.





      Minimum Working Example (MWE):



      documentclass{scrbook}
      usepackage{amsmath}
      newcommandStepSubequations{
      stepcounter{parentequation}
      gdeftheparentequation{arabic{parentequation}}
      setcounter{equation}{0}
      }

      begin{document}

      First, some normal equation:

      begin{equation}
      content...
      end{equation}

      And in following the subequations:

      begin{subequations}
      begin{align}
      1 &= 1\
      2 &= 2\
      StepSubequations
      3 &= 3\% from here a new equation number should begin
      4 &= 4
      end{align}
      end{subequations}

      begin{equation}
      label{eq:1}
      a=b
      end{equation}

      end{document}




      Screenshot of the result:



      Screenshot of the result





      Description of the issue:



      As you can see, scrbook uses a custom numbering scheme like chapternumber.equationnumber. With the counter modification from daleif this does not work unfortunately.



      Is there an option available to consider the common scrbook numbering scheme in subequations as well?



      In the upper example the subequation numbers should appear like:



      0.2a, 0.2b, 0.3a and 0.3b to match the numbering scheme of scrbook.







      equations numbering koma-script scrbook subequations






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 1 at 14:45









      DaveDave

      1,268619




      1,268619






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You can always add thechapter to the representation:



          documentclass{scrbook}
          usepackage{amsmath}

          newcommandStepSubequations{
          stepcounter{parentequation}
          gdeftheparentequation{thechapter.arabic{parentequation}}
          setcounter{equation}{0}
          }

          begin{document}

          First, some normal equation:

          begin{equation}
          content...
          end{equation}

          And in following the subequations:

          begin{subequations}
          begin{align}
          1 &= 1\
          2 &= 2\
          StepSubequations
          3 &= 3\% from here a new equation number should begin
          4 &= 4
          end{align}
          end{subequations}

          begin{equation}
          label{eq:1}
          a=b
          end{equation}

          end{document}


          enter image description here






          share|improve this answer































            2














            As a comment to Ulrikes answer,



            We can simply copy the normal formatting of the equation number and patch it to use parentequation



            documentclass{scrbook}
            usepackage{amsmath}

            usepackage{etoolbox}
            letsillymacrotheequation % copy definition, then patch,
            % ERROR does not exist, so doc will not compile if patch fails
            patchcmdsillymacro{equation}{parentequation}{typeout{patched ok}}{ERROR}

            newcommandStepSubequations{
            stepcounter{parentequation}
            % gdeftheparentequation{arabic{parentequation}}
            gdeftheparentequation{sillymacro}%
            setcounter{equation}{0}
            }

            begin{document}
            ...





            share|improve this answer
























            • Thanks a lot for your hint! But what does this approach improve in detail?

              – Dave
              Apr 1 at 19:16













            • Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

              – daleif
              Apr 1 at 19:20












            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%2f482595%2fsubequations-how-to-continue-numbering-while-considering-scrbook-numbering-sche%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









            2














            You can always add thechapter to the representation:



            documentclass{scrbook}
            usepackage{amsmath}

            newcommandStepSubequations{
            stepcounter{parentequation}
            gdeftheparentequation{thechapter.arabic{parentequation}}
            setcounter{equation}{0}
            }

            begin{document}

            First, some normal equation:

            begin{equation}
            content...
            end{equation}

            And in following the subequations:

            begin{subequations}
            begin{align}
            1 &= 1\
            2 &= 2\
            StepSubequations
            3 &= 3\% from here a new equation number should begin
            4 &= 4
            end{align}
            end{subequations}

            begin{equation}
            label{eq:1}
            a=b
            end{equation}

            end{document}


            enter image description here






            share|improve this answer




























              2














              You can always add thechapter to the representation:



              documentclass{scrbook}
              usepackage{amsmath}

              newcommandStepSubequations{
              stepcounter{parentequation}
              gdeftheparentequation{thechapter.arabic{parentequation}}
              setcounter{equation}{0}
              }

              begin{document}

              First, some normal equation:

              begin{equation}
              content...
              end{equation}

              And in following the subequations:

              begin{subequations}
              begin{align}
              1 &= 1\
              2 &= 2\
              StepSubequations
              3 &= 3\% from here a new equation number should begin
              4 &= 4
              end{align}
              end{subequations}

              begin{equation}
              label{eq:1}
              a=b
              end{equation}

              end{document}


              enter image description here






              share|improve this answer


























                2












                2








                2







                You can always add thechapter to the representation:



                documentclass{scrbook}
                usepackage{amsmath}

                newcommandStepSubequations{
                stepcounter{parentequation}
                gdeftheparentequation{thechapter.arabic{parentequation}}
                setcounter{equation}{0}
                }

                begin{document}

                First, some normal equation:

                begin{equation}
                content...
                end{equation}

                And in following the subequations:

                begin{subequations}
                begin{align}
                1 &= 1\
                2 &= 2\
                StepSubequations
                3 &= 3\% from here a new equation number should begin
                4 &= 4
                end{align}
                end{subequations}

                begin{equation}
                label{eq:1}
                a=b
                end{equation}

                end{document}


                enter image description here






                share|improve this answer













                You can always add thechapter to the representation:



                documentclass{scrbook}
                usepackage{amsmath}

                newcommandStepSubequations{
                stepcounter{parentequation}
                gdeftheparentequation{thechapter.arabic{parentequation}}
                setcounter{equation}{0}
                }

                begin{document}

                First, some normal equation:

                begin{equation}
                content...
                end{equation}

                And in following the subequations:

                begin{subequations}
                begin{align}
                1 &= 1\
                2 &= 2\
                StepSubequations
                3 &= 3\% from here a new equation number should begin
                4 &= 4
                end{align}
                end{subequations}

                begin{equation}
                label{eq:1}
                a=b
                end{equation}

                end{document}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 1 at 14:55









                Ulrike FischerUlrike Fischer

                199k9306692




                199k9306692























                    2














                    As a comment to Ulrikes answer,



                    We can simply copy the normal formatting of the equation number and patch it to use parentequation



                    documentclass{scrbook}
                    usepackage{amsmath}

                    usepackage{etoolbox}
                    letsillymacrotheequation % copy definition, then patch,
                    % ERROR does not exist, so doc will not compile if patch fails
                    patchcmdsillymacro{equation}{parentequation}{typeout{patched ok}}{ERROR}

                    newcommandStepSubequations{
                    stepcounter{parentequation}
                    % gdeftheparentequation{arabic{parentequation}}
                    gdeftheparentequation{sillymacro}%
                    setcounter{equation}{0}
                    }

                    begin{document}
                    ...





                    share|improve this answer
























                    • Thanks a lot for your hint! But what does this approach improve in detail?

                      – Dave
                      Apr 1 at 19:16













                    • Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                      – daleif
                      Apr 1 at 19:20
















                    2














                    As a comment to Ulrikes answer,



                    We can simply copy the normal formatting of the equation number and patch it to use parentequation



                    documentclass{scrbook}
                    usepackage{amsmath}

                    usepackage{etoolbox}
                    letsillymacrotheequation % copy definition, then patch,
                    % ERROR does not exist, so doc will not compile if patch fails
                    patchcmdsillymacro{equation}{parentequation}{typeout{patched ok}}{ERROR}

                    newcommandStepSubequations{
                    stepcounter{parentequation}
                    % gdeftheparentequation{arabic{parentequation}}
                    gdeftheparentequation{sillymacro}%
                    setcounter{equation}{0}
                    }

                    begin{document}
                    ...





                    share|improve this answer
























                    • Thanks a lot for your hint! But what does this approach improve in detail?

                      – Dave
                      Apr 1 at 19:16













                    • Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                      – daleif
                      Apr 1 at 19:20














                    2












                    2








                    2







                    As a comment to Ulrikes answer,



                    We can simply copy the normal formatting of the equation number and patch it to use parentequation



                    documentclass{scrbook}
                    usepackage{amsmath}

                    usepackage{etoolbox}
                    letsillymacrotheequation % copy definition, then patch,
                    % ERROR does not exist, so doc will not compile if patch fails
                    patchcmdsillymacro{equation}{parentequation}{typeout{patched ok}}{ERROR}

                    newcommandStepSubequations{
                    stepcounter{parentequation}
                    % gdeftheparentequation{arabic{parentequation}}
                    gdeftheparentequation{sillymacro}%
                    setcounter{equation}{0}
                    }

                    begin{document}
                    ...





                    share|improve this answer













                    As a comment to Ulrikes answer,



                    We can simply copy the normal formatting of the equation number and patch it to use parentequation



                    documentclass{scrbook}
                    usepackage{amsmath}

                    usepackage{etoolbox}
                    letsillymacrotheequation % copy definition, then patch,
                    % ERROR does not exist, so doc will not compile if patch fails
                    patchcmdsillymacro{equation}{parentequation}{typeout{patched ok}}{ERROR}

                    newcommandStepSubequations{
                    stepcounter{parentequation}
                    % gdeftheparentequation{arabic{parentequation}}
                    gdeftheparentequation{sillymacro}%
                    setcounter{equation}{0}
                    }

                    begin{document}
                    ...






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 1 at 15:10









                    daleifdaleif

                    33.8k255118




                    33.8k255118













                    • Thanks a lot for your hint! But what does this approach improve in detail?

                      – Dave
                      Apr 1 at 19:16













                    • Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                      – daleif
                      Apr 1 at 19:20



















                    • Thanks a lot for your hint! But what does this approach improve in detail?

                      – Dave
                      Apr 1 at 19:16













                    • Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                      – daleif
                      Apr 1 at 19:20

















                    Thanks a lot for your hint! But what does this approach improve in detail?

                    – Dave
                    Apr 1 at 19:16







                    Thanks a lot for your hint! But what does this approach improve in detail?

                    – Dave
                    Apr 1 at 19:16















                    Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                    – daleif
                    Apr 1 at 19:20





                    Say you are using a strange numbering, say it is not a dot as a separator, you do not have to remember how to format this strange formatting. Only requirement is that the copy needs to me made after the initial definition of theequation.

                    – daleif
                    Apr 1 at 19:20


















                    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%2f482595%2fsubequations-how-to-continue-numbering-while-considering-scrbook-numbering-sche%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

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy