[Tugindia] Q: changing etaremune to include a fixed prefix

Jagath AR jagathar at gmail.com
Mon Aug 1 06:32:43 CEST 2011


On 31 July 2011 23:36, Shrisha Rao <shrao at nyx.net> wrote:

> Greetz.
>
> I am trying to create numbered lists where each number is prefixed by a
> character (e.g., C).  I figured out that the following macro emulates the
> enumerate environment:
>
> \newcounter{ccount}
> \newenvironment{cenumerate}%
> {\begin{list}{$\mathcal{C}${}{{(\arabic{ccount})}}}%
> {\usecounter{ccount}}%
> }%
> {\end{list}}
>
> Then one can just use \begin{cenumerate} ... \end{cenumerate} so that each
> \item is marked as C(1), C(2), etc., unlike the plain (1), (2), etc., of
> enumerate.  However, I am unable to get this to work in etaremune style
> (where the numbers are marked in decreasing rather than increasing order).
>  Most obvious modifications to etaremune.sty either break it completely or
> just produce C(1), C(1), ...
>
> Any suggestions appreciated.  Thanks in advance.
>
>

Hi,
Is this what you are looking for?
%%%%%%%%%%%%%%%%
\documentclass{article}

\usepackage{etaremune}

\makeatletter
\def\labelenumi{C(\theenumi)}
\def\labelenumii{C(\theenumii)}
\def\labelenumiii{C(\theenumiii)}
\def\labelenumiv{C(\theenumiv)}

\begin{document}

\begin{etaremune}
\item test
\begin{etaremune}
\item test
\begin{etaremune}
\item test
\begin{etaremune}
\item test
\item test
\end{etaremune}
\item test
\item test
\item test
\end{etaremune}
\item test
\end{etaremune}
\item test
\item test
\end{etaremune}
\end{document}
%%%%%%%%%%%%
-- 
Regards

Jagath AR
jagathar at gmail.com


More information about the tugindia mailing list