How to skip items in reverse enumerations?












4














I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.



documentclass{article}

usepackage{etaremune}
begin{document}
begin{etaremune}
item the fourth
item the third
%%item the second
item the first
end{etaremune}
end{document}









share|improve this question



























    4














    I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.



    documentclass{article}

    usepackage{etaremune}
    begin{document}
    begin{etaremune}
    item the fourth
    item the third
    %%item the second
    item the first
    end{etaremune}
    end{document}









    share|improve this question

























      4












      4








      4







      I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.



      documentclass{article}

      usepackage{etaremune}
      begin{document}
      begin{etaremune}
      item the fourth
      item the third
      %%item the second
      item the first
      end{etaremune}
      end{document}









      share|improve this question













      I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.



      documentclass{article}

      usepackage{etaremune}
      begin{document}
      begin{etaremune}
      item the fourth
      item the third
      %%item the second
      item the first
      end{etaremune}
      end{document}






      lists etaremune






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 16 at 5:49









      Abdallah

      267210




      267210






















          2 Answers
          2






          active

          oldest

          votes


















          3














          One way to alter the numbering is the addtocounter command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.



          documentclass{article}
          usepackage{etaremune}
          begin{document}
          begin{etaremune}
          addtocounter{enumi}{1}
          item the fourth
          item the third
          %%item the second
          addtocounter{enumi}{-1}
          item the first
          end{etaremune}
          end{document}





          share|improve this answer

















          • 1




            An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
            – Mico
            Dec 16 at 8:42





















          2














          In addition to the normal counters for enumeration environments, which now count down, etaremune uses a second counter called EM@itemctr.
          This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.



          You can thus skip an item in an etaremune environment by decreasing @enumctr (= enum<i+> where <i+> stands for an appropriate number of i's) by one and increasing EM@itemctr by one.
          The macro etaremuneskip, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).



          documentclass{article}
          pagestyle{empty}

          usepackage{etaremune}
          makeatletter %% <- make @ usable in command names
          newcommand*etaremuneskip[1][1]{%
          addtocounter{EM@itemctr}{#1}%
          addtocounter{@enumctr}{-#1}%
          }
          makeatother %% <- revert @

          begin{document}

          begin{etaremune}
          item the fourthlabel{fourth}
          begin{etaremune}
          item the f-th
          item the e-th
          etaremuneskip[3]
          item the a-th
          end{etaremune}
          item the third label{third}
          etaremuneskip
          item the firstlabel{first}
          end{etaremune}

          end{document}


          output



          (Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)






          share|improve this answer























          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            Dec 16 at 8:46






          • 1




            @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
            – Circumscribe
            Dec 16 at 8:54






          • 1




            @Mico: (Apart from that, no.)
            – Circumscribe
            Dec 16 at 9:06











          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%2f466047%2fhow-to-skip-items-in-reverse-enumerations%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









          3














          One way to alter the numbering is the addtocounter command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.



          documentclass{article}
          usepackage{etaremune}
          begin{document}
          begin{etaremune}
          addtocounter{enumi}{1}
          item the fourth
          item the third
          %%item the second
          addtocounter{enumi}{-1}
          item the first
          end{etaremune}
          end{document}





          share|improve this answer

















          • 1




            An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
            – Mico
            Dec 16 at 8:42


















          3














          One way to alter the numbering is the addtocounter command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.



          documentclass{article}
          usepackage{etaremune}
          begin{document}
          begin{etaremune}
          addtocounter{enumi}{1}
          item the fourth
          item the third
          %%item the second
          addtocounter{enumi}{-1}
          item the first
          end{etaremune}
          end{document}





          share|improve this answer

















          • 1




            An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
            – Mico
            Dec 16 at 8:42
















          3












          3








          3






          One way to alter the numbering is the addtocounter command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.



          documentclass{article}
          usepackage{etaremune}
          begin{document}
          begin{etaremune}
          addtocounter{enumi}{1}
          item the fourth
          item the third
          %%item the second
          addtocounter{enumi}{-1}
          item the first
          end{etaremune}
          end{document}





          share|improve this answer












          One way to alter the numbering is the addtocounter command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.



          documentclass{article}
          usepackage{etaremune}
          begin{document}
          begin{etaremune}
          addtocounter{enumi}{1}
          item the fourth
          item the third
          %%item the second
          addtocounter{enumi}{-1}
          item the first
          end{etaremune}
          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 16 at 5:53









          Abdallah

          267210




          267210








          • 1




            An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
            – Mico
            Dec 16 at 8:42
















          • 1




            An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
            – Mico
            Dec 16 at 8:42










          1




          1




          An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
          – Mico
          Dec 16 at 8:42






          An alternative to executing addtocounter{enumi}{1} would be to change begin{etaremune} to begin{etaremune}[start=4]. Of course, the instruction addtocounter{enumi}{-1} is still needed.
          – Mico
          Dec 16 at 8:42













          2














          In addition to the normal counters for enumeration environments, which now count down, etaremune uses a second counter called EM@itemctr.
          This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.



          You can thus skip an item in an etaremune environment by decreasing @enumctr (= enum<i+> where <i+> stands for an appropriate number of i's) by one and increasing EM@itemctr by one.
          The macro etaremuneskip, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).



          documentclass{article}
          pagestyle{empty}

          usepackage{etaremune}
          makeatletter %% <- make @ usable in command names
          newcommand*etaremuneskip[1][1]{%
          addtocounter{EM@itemctr}{#1}%
          addtocounter{@enumctr}{-#1}%
          }
          makeatother %% <- revert @

          begin{document}

          begin{etaremune}
          item the fourthlabel{fourth}
          begin{etaremune}
          item the f-th
          item the e-th
          etaremuneskip[3]
          item the a-th
          end{etaremune}
          item the third label{third}
          etaremuneskip
          item the firstlabel{first}
          end{etaremune}

          end{document}


          output



          (Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)






          share|improve this answer























          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            Dec 16 at 8:46






          • 1




            @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
            – Circumscribe
            Dec 16 at 8:54






          • 1




            @Mico: (Apart from that, no.)
            – Circumscribe
            Dec 16 at 9:06
















          2














          In addition to the normal counters for enumeration environments, which now count down, etaremune uses a second counter called EM@itemctr.
          This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.



          You can thus skip an item in an etaremune environment by decreasing @enumctr (= enum<i+> where <i+> stands for an appropriate number of i's) by one and increasing EM@itemctr by one.
          The macro etaremuneskip, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).



          documentclass{article}
          pagestyle{empty}

          usepackage{etaremune}
          makeatletter %% <- make @ usable in command names
          newcommand*etaremuneskip[1][1]{%
          addtocounter{EM@itemctr}{#1}%
          addtocounter{@enumctr}{-#1}%
          }
          makeatother %% <- revert @

          begin{document}

          begin{etaremune}
          item the fourthlabel{fourth}
          begin{etaremune}
          item the f-th
          item the e-th
          etaremuneskip[3]
          item the a-th
          end{etaremune}
          item the third label{third}
          etaremuneskip
          item the firstlabel{first}
          end{etaremune}

          end{document}


          output



          (Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)






          share|improve this answer























          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            Dec 16 at 8:46






          • 1




            @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
            – Circumscribe
            Dec 16 at 8:54






          • 1




            @Mico: (Apart from that, no.)
            – Circumscribe
            Dec 16 at 9:06














          2












          2








          2






          In addition to the normal counters for enumeration environments, which now count down, etaremune uses a second counter called EM@itemctr.
          This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.



          You can thus skip an item in an etaremune environment by decreasing @enumctr (= enum<i+> where <i+> stands for an appropriate number of i's) by one and increasing EM@itemctr by one.
          The macro etaremuneskip, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).



          documentclass{article}
          pagestyle{empty}

          usepackage{etaremune}
          makeatletter %% <- make @ usable in command names
          newcommand*etaremuneskip[1][1]{%
          addtocounter{EM@itemctr}{#1}%
          addtocounter{@enumctr}{-#1}%
          }
          makeatother %% <- revert @

          begin{document}

          begin{etaremune}
          item the fourthlabel{fourth}
          begin{etaremune}
          item the f-th
          item the e-th
          etaremuneskip[3]
          item the a-th
          end{etaremune}
          item the third label{third}
          etaremuneskip
          item the firstlabel{first}
          end{etaremune}

          end{document}


          output



          (Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)






          share|improve this answer














          In addition to the normal counters for enumeration environments, which now count down, etaremune uses a second counter called EM@itemctr.
          This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.



          You can thus skip an item in an etaremune environment by decreasing @enumctr (= enum<i+> where <i+> stands for an appropriate number of i's) by one and increasing EM@itemctr by one.
          The macro etaremuneskip, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).



          documentclass{article}
          pagestyle{empty}

          usepackage{etaremune}
          makeatletter %% <- make @ usable in command names
          newcommand*etaremuneskip[1][1]{%
          addtocounter{EM@itemctr}{#1}%
          addtocounter{@enumctr}{-#1}%
          }
          makeatother %% <- revert @

          begin{document}

          begin{etaremune}
          item the fourthlabel{fourth}
          begin{etaremune}
          item the f-th
          item the e-th
          etaremuneskip[3]
          item the a-th
          end{etaremune}
          item the third label{third}
          etaremuneskip
          item the firstlabel{first}
          end{etaremune}

          end{document}


          output



          (Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 16 at 9:00

























          answered Dec 16 at 8:41









          Circumscribe

          4,5611432




          4,5611432












          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            Dec 16 at 8:46






          • 1




            @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
            – Circumscribe
            Dec 16 at 8:54






          • 1




            @Mico: (Apart from that, no.)
            – Circumscribe
            Dec 16 at 9:06


















          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            Dec 16 at 8:46






          • 1




            @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
            – Circumscribe
            Dec 16 at 8:54






          • 1




            @Mico: (Apart from that, no.)
            – Circumscribe
            Dec 16 at 9:06
















          Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
          – Mico
          Dec 16 at 8:46




          Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
          – Mico
          Dec 16 at 8:46




          1




          1




          @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
          – Circumscribe
          Dec 16 at 8:54




          @Mico: If you do the latter (without incrementing EM@itemctr), you'll also need to add addtocounter{enumii}{3} at the top of the etaremune environment (as in the other answer). Otherwise the items will not be labelled correctly.
          – Circumscribe
          Dec 16 at 8:54




          1




          1




          @Mico: (Apart from that, no.)
          – Circumscribe
          Dec 16 at 9:06




          @Mico: (Apart from that, no.)
          – Circumscribe
          Dec 16 at 9:06


















          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%2f466047%2fhow-to-skip-items-in-reverse-enumerations%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

          Morgemoulin

          Scott Moir

          Souastre