4

I would like to know if there is a way to get an enumerate list in LaTeX such that if I write a total of N items, then I get

N. Item numeber N 
N - 1. Item number N - 1
...
1. Item number 1

So if N = 3,

3. Third item 
2. Second item
1. First item
Vicky
  • 143
  • 3

1 Answers1

8

From Is there a way to get reverse numbering on the enumerate environment?

enter image description here

\documentclass{article}

\newenvironment{benumerate}[1]{ \let\oldItem\item \def\item{\addtocounter{enumi}{-2}\oldItem} \begin{enumerate} \setcounter{enumi}{#1} \addtocounter{enumi}{1} }{ \end{enumerate} }

\begin{document}

\begin{enumerate} \item A % 1 \item B % 2 \item C % 3 \end{enumerate}

\begin{benumerate}{9} \item A % 9 \item B % 8 \item C % 7 \end{benumerate}

\end{document}

EDIT

The etaremune package provides an etaremune environment that does just this.

\documentclass{article}
\usepackage{etaremune}
\begin{document}
\begin{etaremune}
  \item Last things first
  \item \ldots
  \item First things last
\end{etaremune}
\end{document}

enter image description here

Rmano
  • 40,848
  • 3
  • 64
  • 125
js bibra
  • 21,280
  • Is there someway to avoid the indication of the total of items (9 in your answer, N in the OP's notation)? – Vicky Jul 13 '20 at 01:33
  • please see edit – js bibra Jul 13 '20 at 03:43
  • 2
    You may want to simplify the answer to mention just the etarenum approach. – Mico Jul 13 '20 at 07:10
  • The problem encountered with etaremune is that not seem to be able to change margins and indentation for the list, as with the enumerate package--that is why a secondary choice – js bibra Jul 13 '20 at 07:14
  • 2
    @jsbibra - You should mention this shortcoming explicitly, lest the OP has a need for chaging margins, indentation amounts, etc. Of course, the OP may have no such need, in which case etaremun is all he/she needs. – Mico Jul 13 '20 at 07:21