How to resume enumi in a question of exsheets?

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











up vote
1
down vote

favorite












I can resume by adding setcounterenumithetemp before the first item setcountertemptheenumi after the last item where temp is my new counter. However this approach does not look elegant. I don't want to type those adjustments by hand. Is there any better way to inject those adjustments by patching?



documentclassarticle
usepackageexsheets
usepackageenumitem

begindocument
beginquestion
beginenumerate[label=arabic*.]
item one
item two
endenumerate
endquestion
beginsolution
endsolution

beginquestion
beginenumerate[resume,label=arabic*.]
item must be three rather than one.
item must be four rather than two.
endenumerate
endquestion
beginsolution
endsolution
enddocument


enter image description here










share|improve this question





















  • Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
    – albert
    1 hour ago














up vote
1
down vote

favorite












I can resume by adding setcounterenumithetemp before the first item setcountertemptheenumi after the last item where temp is my new counter. However this approach does not look elegant. I don't want to type those adjustments by hand. Is there any better way to inject those adjustments by patching?



documentclassarticle
usepackageexsheets
usepackageenumitem

begindocument
beginquestion
beginenumerate[label=arabic*.]
item one
item two
endenumerate
endquestion
beginsolution
endsolution

beginquestion
beginenumerate[resume,label=arabic*.]
item must be three rather than one.
item must be four rather than two.
endenumerate
endquestion
beginsolution
endsolution
enddocument


enter image description here










share|improve this question





















  • Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
    – albert
    1 hour ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I can resume by adding setcounterenumithetemp before the first item setcountertemptheenumi after the last item where temp is my new counter. However this approach does not look elegant. I don't want to type those adjustments by hand. Is there any better way to inject those adjustments by patching?



documentclassarticle
usepackageexsheets
usepackageenumitem

begindocument
beginquestion
beginenumerate[label=arabic*.]
item one
item two
endenumerate
endquestion
beginsolution
endsolution

beginquestion
beginenumerate[resume,label=arabic*.]
item must be three rather than one.
item must be four rather than two.
endenumerate
endquestion
beginsolution
endsolution
enddocument


enter image description here










share|improve this question













I can resume by adding setcounterenumithetemp before the first item setcountertemptheenumi after the last item where temp is my new counter. However this approach does not look elegant. I don't want to type those adjustments by hand. Is there any better way to inject those adjustments by patching?



documentclassarticle
usepackageexsheets
usepackageenumitem

begindocument
beginquestion
beginenumerate[label=arabic*.]
item one
item two
endenumerate
endquestion
beginsolution
endsolution

beginquestion
beginenumerate[resume,label=arabic*.]
item must be three rather than one.
item must be four rather than two.
endenumerate
endquestion
beginsolution
endsolution
enddocument


enter image description here







counters enumitem exsheets






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Artificial Stupidity

3,8741728




3,8741728











  • Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
    – albert
    1 hour ago
















  • Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
    – albert
    1 hour ago















Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
– albert
1 hour ago




Probably due to the nested environments, see e.g. tex.stackexchange.com/questions/1669/resuming-a-list for a possible solution
– albert
1 hour ago










3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










If you want that the “subquestions” are numbered using the same series throughout the document, you can use the following:



documentclassarticle
usepackageexsheets

newcounterglobalenumerate
newenvironmentgenumerate
beginenumeratesetcounterenumivalueglobalenumerate
setcounterglobalenumeratevalueenumiendenumerate

begindocument
beginquestion
begingenumerate
item one
item two
endgenumerate
endquestion
beginsolution
endsolution

beginquestion
begingenumerate
item must be three rather than one.
item must be four rather than two.
endgenumerate
endquestion
beginsolution
endsolution
enddocument


This won't affect other usages of enumerate.



enter image description here






share|improve this answer



























    up vote
    3
    down vote













    You can use the series key:



    documentclassarticle
    usepackageexsheets
    usepackageenumitem

    begindocument

    beginquestion
    beginenumerate[label=arabic*., series=A]%
    item one
    item two
    endenumerate
    endquestion
    beginsolution
    endsolution

    beginquestion
    beginenumerate[resume*=A]
    item must be three rather than one.
    item must be four rather than two.
    endenumerate
    endquestion
    beginsolution
    endsolution

    enddocument


    enter image description here






    share|improve this answer




















    • +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
      – Mico
      47 mins ago






    • 1




      @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
      – Bernard
      44 mins ago


















    up vote
    2
    down vote













    The enumitem package features a resume option, which you are attempting to employ. However, this option works only locally, i.e., not across other numbered environments. However, the package also features a method to make the resume feature apply globally; see section 3.5 of the package's user guide for the full details. The global form of resume differs from the local form of resume by making resume point to a "series". I suggest you create a dedicated enumerate-like environment (called, say, myenum) as follows:



    newlistmyenumenumerate1
    setlist[myenum]label=arabic*.,resume=xyz


    That way, you still have access to the "regular" enumerate environment elsewhere in the document.



    A full MWE (I'll skip the screenshot):



    documentclassarticle
    usepackageexsheets
    usepackageenumitem
    newlistmyenumenumerate1
    setlist[myenum]label=arabic*.,resume=xyz

    begindocument
    beginquestion
    beginmyenum
    item one
    item two
    endmyenum
    endquestion
    beginsolution
    endsolution

    beginquestion
    beginmyenum
    item three
    item four
    endmyenum
    endquestion
    beginsolution
    endsolution
    enddocument





    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',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      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%2f451097%2fhow-to-resume-enumi-in-a-question-of-exsheets%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote



      accepted










      If you want that the “subquestions” are numbered using the same series throughout the document, you can use the following:



      documentclassarticle
      usepackageexsheets

      newcounterglobalenumerate
      newenvironmentgenumerate
      beginenumeratesetcounterenumivalueglobalenumerate
      setcounterglobalenumeratevalueenumiendenumerate

      begindocument
      beginquestion
      begingenumerate
      item one
      item two
      endgenumerate
      endquestion
      beginsolution
      endsolution

      beginquestion
      begingenumerate
      item must be three rather than one.
      item must be four rather than two.
      endgenumerate
      endquestion
      beginsolution
      endsolution
      enddocument


      This won't affect other usages of enumerate.



      enter image description here






      share|improve this answer
























        up vote
        1
        down vote



        accepted










        If you want that the “subquestions” are numbered using the same series throughout the document, you can use the following:



        documentclassarticle
        usepackageexsheets

        newcounterglobalenumerate
        newenvironmentgenumerate
        beginenumeratesetcounterenumivalueglobalenumerate
        setcounterglobalenumeratevalueenumiendenumerate

        begindocument
        beginquestion
        begingenumerate
        item one
        item two
        endgenumerate
        endquestion
        beginsolution
        endsolution

        beginquestion
        begingenumerate
        item must be three rather than one.
        item must be four rather than two.
        endgenumerate
        endquestion
        beginsolution
        endsolution
        enddocument


        This won't affect other usages of enumerate.



        enter image description here






        share|improve this answer






















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          If you want that the “subquestions” are numbered using the same series throughout the document, you can use the following:



          documentclassarticle
          usepackageexsheets

          newcounterglobalenumerate
          newenvironmentgenumerate
          beginenumeratesetcounterenumivalueglobalenumerate
          setcounterglobalenumeratevalueenumiendenumerate

          begindocument
          beginquestion
          begingenumerate
          item one
          item two
          endgenumerate
          endquestion
          beginsolution
          endsolution

          beginquestion
          begingenumerate
          item must be three rather than one.
          item must be four rather than two.
          endgenumerate
          endquestion
          beginsolution
          endsolution
          enddocument


          This won't affect other usages of enumerate.



          enter image description here






          share|improve this answer












          If you want that the “subquestions” are numbered using the same series throughout the document, you can use the following:



          documentclassarticle
          usepackageexsheets

          newcounterglobalenumerate
          newenvironmentgenumerate
          beginenumeratesetcounterenumivalueglobalenumerate
          setcounterglobalenumeratevalueenumiendenumerate

          begindocument
          beginquestion
          begingenumerate
          item one
          item two
          endgenumerate
          endquestion
          beginsolution
          endsolution

          beginquestion
          begingenumerate
          item must be three rather than one.
          item must be four rather than two.
          endgenumerate
          endquestion
          beginsolution
          endsolution
          enddocument


          This won't affect other usages of enumerate.



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 25 mins ago









          egreg

          682k8318133061




          682k8318133061




















              up vote
              3
              down vote













              You can use the series key:



              documentclassarticle
              usepackageexsheets
              usepackageenumitem

              begindocument

              beginquestion
              beginenumerate[label=arabic*., series=A]%
              item one
              item two
              endenumerate
              endquestion
              beginsolution
              endsolution

              beginquestion
              beginenumerate[resume*=A]
              item must be three rather than one.
              item must be four rather than two.
              endenumerate
              endquestion
              beginsolution
              endsolution

              enddocument


              enter image description here






              share|improve this answer




















              • +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
                – Mico
                47 mins ago






              • 1




                @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
                – Bernard
                44 mins ago















              up vote
              3
              down vote













              You can use the series key:



              documentclassarticle
              usepackageexsheets
              usepackageenumitem

              begindocument

              beginquestion
              beginenumerate[label=arabic*., series=A]%
              item one
              item two
              endenumerate
              endquestion
              beginsolution
              endsolution

              beginquestion
              beginenumerate[resume*=A]
              item must be three rather than one.
              item must be four rather than two.
              endenumerate
              endquestion
              beginsolution
              endsolution

              enddocument


              enter image description here






              share|improve this answer




















              • +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
                – Mico
                47 mins ago






              • 1




                @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
                – Bernard
                44 mins ago













              up vote
              3
              down vote










              up vote
              3
              down vote









              You can use the series key:



              documentclassarticle
              usepackageexsheets
              usepackageenumitem

              begindocument

              beginquestion
              beginenumerate[label=arabic*., series=A]%
              item one
              item two
              endenumerate
              endquestion
              beginsolution
              endsolution

              beginquestion
              beginenumerate[resume*=A]
              item must be three rather than one.
              item must be four rather than two.
              endenumerate
              endquestion
              beginsolution
              endsolution

              enddocument


              enter image description here






              share|improve this answer












              You can use the series key:



              documentclassarticle
              usepackageexsheets
              usepackageenumitem

              begindocument

              beginquestion
              beginenumerate[label=arabic*., series=A]%
              item one
              item two
              endenumerate
              endquestion
              beginsolution
              endsolution

              beginquestion
              beginenumerate[resume*=A]
              item must be three rather than one.
              item must be four rather than two.
              endenumerate
              endquestion
              beginsolution
              endsolution

              enddocument


              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 50 mins ago









              Bernard

              156k763189




              156k763189











              • +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
                – Mico
                47 mins ago






              • 1




                @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
                – Bernard
                44 mins ago

















              • +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
                – Mico
                47 mins ago






              • 1




                @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
                – Bernard
                44 mins ago
















              +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
              – Mico
              47 mins ago




              +1. Given that the OP wants to automate things as much as possible, you may want to add the instruction setlist[enumerate,1]label=arabic*.,resume=A in the preamble, after loading the enumitem package. That way, the subsequent [label=arabic*., series=A] and [resume*=A] option directives may be omitted.
              – Mico
              47 mins ago




              1




              1




              @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
              – Bernard
              44 mins ago





              @Mico: I already thought of this possibility, but what if only some questions have to share the same counter, another set of questions another counter, and so on?
              – Bernard
              44 mins ago











              up vote
              2
              down vote













              The enumitem package features a resume option, which you are attempting to employ. However, this option works only locally, i.e., not across other numbered environments. However, the package also features a method to make the resume feature apply globally; see section 3.5 of the package's user guide for the full details. The global form of resume differs from the local form of resume by making resume point to a "series". I suggest you create a dedicated enumerate-like environment (called, say, myenum) as follows:



              newlistmyenumenumerate1
              setlist[myenum]label=arabic*.,resume=xyz


              That way, you still have access to the "regular" enumerate environment elsewhere in the document.



              A full MWE (I'll skip the screenshot):



              documentclassarticle
              usepackageexsheets
              usepackageenumitem
              newlistmyenumenumerate1
              setlist[myenum]label=arabic*.,resume=xyz

              begindocument
              beginquestion
              beginmyenum
              item one
              item two
              endmyenum
              endquestion
              beginsolution
              endsolution

              beginquestion
              beginmyenum
              item three
              item four
              endmyenum
              endquestion
              beginsolution
              endsolution
              enddocument





              share|improve this answer
























                up vote
                2
                down vote













                The enumitem package features a resume option, which you are attempting to employ. However, this option works only locally, i.e., not across other numbered environments. However, the package also features a method to make the resume feature apply globally; see section 3.5 of the package's user guide for the full details. The global form of resume differs from the local form of resume by making resume point to a "series". I suggest you create a dedicated enumerate-like environment (called, say, myenum) as follows:



                newlistmyenumenumerate1
                setlist[myenum]label=arabic*.,resume=xyz


                That way, you still have access to the "regular" enumerate environment elsewhere in the document.



                A full MWE (I'll skip the screenshot):



                documentclassarticle
                usepackageexsheets
                usepackageenumitem
                newlistmyenumenumerate1
                setlist[myenum]label=arabic*.,resume=xyz

                begindocument
                beginquestion
                beginmyenum
                item one
                item two
                endmyenum
                endquestion
                beginsolution
                endsolution

                beginquestion
                beginmyenum
                item three
                item four
                endmyenum
                endquestion
                beginsolution
                endsolution
                enddocument





                share|improve this answer






















                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  The enumitem package features a resume option, which you are attempting to employ. However, this option works only locally, i.e., not across other numbered environments. However, the package also features a method to make the resume feature apply globally; see section 3.5 of the package's user guide for the full details. The global form of resume differs from the local form of resume by making resume point to a "series". I suggest you create a dedicated enumerate-like environment (called, say, myenum) as follows:



                  newlistmyenumenumerate1
                  setlist[myenum]label=arabic*.,resume=xyz


                  That way, you still have access to the "regular" enumerate environment elsewhere in the document.



                  A full MWE (I'll skip the screenshot):



                  documentclassarticle
                  usepackageexsheets
                  usepackageenumitem
                  newlistmyenumenumerate1
                  setlist[myenum]label=arabic*.,resume=xyz

                  begindocument
                  beginquestion
                  beginmyenum
                  item one
                  item two
                  endmyenum
                  endquestion
                  beginsolution
                  endsolution

                  beginquestion
                  beginmyenum
                  item three
                  item four
                  endmyenum
                  endquestion
                  beginsolution
                  endsolution
                  enddocument





                  share|improve this answer












                  The enumitem package features a resume option, which you are attempting to employ. However, this option works only locally, i.e., not across other numbered environments. However, the package also features a method to make the resume feature apply globally; see section 3.5 of the package's user guide for the full details. The global form of resume differs from the local form of resume by making resume point to a "series". I suggest you create a dedicated enumerate-like environment (called, say, myenum) as follows:



                  newlistmyenumenumerate1
                  setlist[myenum]label=arabic*.,resume=xyz


                  That way, you still have access to the "regular" enumerate environment elsewhere in the document.



                  A full MWE (I'll skip the screenshot):



                  documentclassarticle
                  usepackageexsheets
                  usepackageenumitem
                  newlistmyenumenumerate1
                  setlist[myenum]label=arabic*.,resume=xyz

                  begindocument
                  beginquestion
                  beginmyenum
                  item one
                  item two
                  endmyenum
                  endquestion
                  beginsolution
                  endsolution

                  beginquestion
                  beginmyenum
                  item three
                  item four
                  endmyenum
                  endquestion
                  beginsolution
                  endsolution
                  enddocument






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 54 mins ago









                  Mico

                  263k30355730




                  263k30355730



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f451097%2fhow-to-resume-enumi-in-a-question-of-exsheets%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What does second last employer means? [closed]

                      List of Gilmore Girls characters

                      Confectionery