\documentclass{pracjourn}
%\documentclass[12pt,a4paper]{article}
\usepackage{revnum}
\usepackage{amsmath}
\usepackage{setspace}

%\usepackage{etaremune}
\setlength{\parindent}{0mm}
\begin{document}
\title{Brevity is the soul of wit :\\ How \LaTeX\ can help.
\footnote{Ask the author for
a copy of the \LaTeX\ source  of this
document ({\texttt multilevel.tex})  . You can try out all the
examples yourself, by hacking the source.}}
\author{S. Parthasarathy\footnote{Algologic Research and Solutions,
78 Sancharpuri Colony, Bowenpally, Secunderabad 500\ 011, India
WWW-URL --
http://algolog.tripod.com/nupartha.htm}
 \\  drpartha@gmail.com}

\date{ }

\abstract {This essay is about using ``lists'' in \LaTeX\ . Lists
are very useful, in presenting material in a crisp and compact form.
This makes technical documents, less verbose, and easier to follow.
The author hopes that this paper will make \LaTeX\  enjoyable for more
people. }
\maketitle
\smallskip
\hrule
\smallskip \smallskip
\date{}
\maketitle
\section{Preamble}
``Brevity is the soul of wit'', said a great author once. Technical
documents have to be ``to the point'', and well focused. Lists provide
an excellent artefact for technical writers. Lists help you avoid long, verbose paragraphs. The points in a list, stand out on their own, prominently. They make documents, much more easy to follow. Thus, mastering lists, is
an essential activity for anyone who wishes to succeed in technical
writing. \LaTeX\ provides you three possible list environments:
\begin{description}
\item {Enumerate environment}{ -- for producing a ``numbered'' list}
\item {Itemize environment}{ -- for producing a ``bulleted'' list,
and}
\item {Description environment}{ -- for a list of
term/description pairs, like the entries you will find in a
traditional dictionary. This current list, uses a description
environment. You can see, it is so very clean, and easy to follow.}
\end{description}
And, of course you can cook up your own list environment too.\\

A few simple facts :
\begin{enumerate}
\item Each list must have at least one item.
\item You can embed lists inside lists, creating a hierarchical
structure (nested lists, or multi-level lists).
\item You can mix the above three basic types of lists inside
hierarchically structured  lists (multi-level, multi-mode lists).
\item You can number lists either in ascending order, or in
descending order.
\item You can change the ``look-and-feel'' of lists
\item As a standard practice, you can go four levels deep, in nested
lists. This is much more than necessary, for all practical purposes.
\end{enumerate}


We will see some examples, to illustrate the above facts. We
will also see several nested \verb9\itemize9 and
\verb9\enumerate9 lists now. This test document will try out different
possibilities with nested \verb9\itemize9 and
\verb9\enumerate9 lists.
\section{How to work with nested lists -- multi-level lists,
multi-mode lists}
\subsection{Nested itemize -- bullets within bullets}
\begin{itemize}
\item Partha is a great guy
\begin{itemize}
\item But no one knows that.
\item And, even if they know, they don't accept that
\end{itemize}
\item Yet, Partha keeps saying this again and again
\end{itemize}
\subsection{Nested enumerate -- numbers within numbers}
\begin{enumerate}
\item First first-level number
\item Second first level number
\begin{enumerate}
\item First second level
\item Second second level
\end{enumerate}
\item Third first level
\end{enumerate}
When you use multi-level lists, \LaTeX\ numbers each level using
a different numbering style : 2aiA (arabic, alpha, roman, Alpha). You
can decide to change these numbering styles,  by using the
\verb9\renewcommand9 facility, like this  : \\
\verb9\renewcommand{\theenumi}{Roman{enumi}}9
\subsection{Numbers within bullets}
\begin{itemize}
\item First bullet
\item second bullet
\begin{enumerate}
\item First number
\item Second number
\end{enumerate}
\item Bullet again
\end{itemize}
\subsection{Bullets within numbers -- why not ?}
\begin{enumerate}
\item first number
\item second number
\begin{itemize}
\item First bullet
\item Second bullet. Now we will go, one level more, for bullets
\begin{itemize}
\item second level bullet
\item second second level bullet
\end{itemize}
\end{itemize}
\item third number -- and go one level deeper for numbers
\begin{enumerate}
\item second level -- first item
\item secondlevel -- second item -- this will have two levels of
bullets
\begin{itemize}
\item one bullet inside a number which was under another number
\begin{itemize}
\item another level bullet
\end{itemize}
\end{itemize}
\item and now the next second level number
\end{enumerate}
\end{enumerate}
\section{\LaTeX\ magic!}
You can decide to get the items numbered in the
descending order. Why on earth would you need to do that?  For
instance, if you are preparing a list of items, arranged in the
reverse chronological order, you would like the first item to carry
the largest number since it was the last to be produced in the
chronological order. Confusing?  Imagine having to introduce your
children, youngest first, eldest last. Imagine you have four children.
You would say ``Meet xxx, my fourth child'', then ``Meet yyyy, my
third child'' and so on. Got the idea?  We achieve this using the
{\texttt revnum} package.\\
And, of course you can mix forward counting with reverse counting,
like in the following example:
\begin{revnumerate}
\item One
\item Two
\begin{enumerate}
\item Un
\item Deux
\item Trois
\end{enumerate}
\item Three
\begin{revnumerate}
\item Ein
\item Zwei
\item Drei
\end{revnumerate}
\end{revnumerate}

But, how does \LaTeX\ know from where to start numbering?  Do you
have to tell \LaTeX\ how many items you have in the list , so it can
start counting down from this maximum?  NO, a big NO. \LaTeX\ can
find out by itself. To do this, you will have to pass your document
through \LaTeX\, two times. In the first pass, \LaTeX\ just makes a
count and stores the maximum count, in the aux file. In the second
pass, \LaTeX\ will start counting down from this maximum limit which
it found out during the first pass. That is pretty smart, isn't it? 
\subsection{And some more \LaTeX\ magic!}

Actually, you can start numbering down, from any arbitrary maximum
value, like this :
\begin{revnumerate}[17]
\item we can start from any maximum
\item and count down
\item like this
\end{revnumerate}
Actually, reverse numbering of lists can also be achieved using the
{\texttt etaremune} package (etarenume is enumerate written
backwards). They say, etaremune is smarter than revnum. It uses
lesser memory.

\begin{verbatim}
\begin{etaremune}
\item hhh
\item jjj
\item kkk
\end{etaremune}
\end{verbatim}
And,  how about some personalised numbering scheme for your lists?
\renewcommand{\labelenumii}{\hspace{\labelsep}\theenumi++\theenumii**}
\begin{enumerate}
\item First first-level item
\item Second first level item
\begin{enumerate}
\item First second level item
\item Second second level item
\end{enumerate}
\item Third first level item
\end{enumerate}

We used the \verb9\renewcommand9 to modify the definition of
\verb9\labelenumii9. I decided to have the second level displayed
along with
the number of the first level, and with some ++ and ** ,
just for fun. Caution : You must undo this \verb9\renewcommand9 by
doing a \verb9\renewcommand9 again, so that the labels would look
normal, like this :

\renewcommand{\labelenumii}{\theenumii}
\begin{enumerate}
\item First first-level number
\item Second first level number
\begin{enumerate}
\item First second level . (Try commenting out the
\verb9\renewcommand9, used just before the \verb9\begin{enumerate}9
above.)
\item Second second level
\end{enumerate}
\item Third first level
\end{enumerate}

Can you customise the bullets too?  YES, of course. Just redefine
the \verb9\labelitem9 , and you can get this:

\newenvironment{nuitems}{%
\renewcommand{\labelitemi}{$\diamond$}%
\renewcommand{\labelitemii}{$\triangleleft$}%
\begin{itemize}}{\end{itemize}}
\begin{nuitems}
\item how is this?
\begin{nuitems}
\item or this one?
\item or this one?
\end{nuitems}
\item do you like this?
\end{nuitems}
You can't ask for more proof about the power of \LaTeX\ , can you?
\section{Closing remarks}
\LaTeX\ can be used for producing very elegant looking documents.
It gives you tools for making your documents, crisp and compact. The
``list'' facility of \LaTeX\ is an important feature for creating
documents with technical content. \LaTeX\ also gives you many options
for using lists, with flexibility and ease. You can personalise these
lists, to reflect your own taste and preferences.

This paper, predictably, was made using \LaTeX\ . It used the Kile
front-end provided by Suse Linux. It uses the revnum package,
downloaded from the CTAN site.   

The author of this paper teaches discrete mathematics in an
engineering college near Hyderabad, India. When he is not teaching, he preaches Linux and \LaTeX\ to his students. He also runs a specialised
enterprise which uses \LaTeX\ extensively. More details can be found in teh author's web site mentioned in the footnote of the title page.





\begin{center}
* * * * *
\end{center}


\end{document}





