How to skip items in reverse enumerations?











up vote
3
down vote

favorite












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


























    up vote
    3
    down vote

    favorite












    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
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      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 3 hours ago









      Abdallah

      26229




      26229






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          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





















          • 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
            11 mins ago




















          up vote
          0
          down vote













          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 your solution though.)






          share|improve this answer





















          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            7 mins ago











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








          up vote
          3
          down vote













          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





















          • 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
            11 mins ago

















          up vote
          3
          down vote













          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





















          • 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
            11 mins ago















          up vote
          3
          down vote










          up vote
          3
          down vote









          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 3 hours ago









          Abdallah

          26229




          26229












          • 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
            11 mins ago




















          • 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
            11 mins ago


















          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
          11 mins ago






          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
          11 mins ago












          up vote
          0
          down vote













          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 your solution though.)






          share|improve this answer





















          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            7 mins ago















          up vote
          0
          down vote













          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 your solution though.)






          share|improve this answer





















          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            7 mins ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          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 your solution 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 your solution though.)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 12 mins ago









          Circumscribe

          4,2571429




          4,2571429












          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            7 mins ago


















          • Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
            – Mico
            7 mins ago
















          Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
          – Mico
          7 mins ago




          Is there an advantage to running etaremuneskip[3] instead of, say, addtocounter{enumii}{-3}?
          – Mico
          7 mins ago


















          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

          Quarter-circle Tiles

          build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

          Mont Emei