[Tex/LaTex] Latex enumerate environment I want to enumerate with A.1,A.2,…,A.n. How does one do this

#enumeratelists

I am using latex to type up a logical system that has some equations. The abbreviation for the logical system is DAS. I would like the equations to be numbered
DAS.1
DAS.2

DAS.n

I expected that

\begin{enumerate}[{DAS.1}]
    \item
    \item
    ...
   \item
\end{enumerate}

would work. However the output I get is:

D1S.1
D2S.2

DnS.n

So I suppose the question could be restated as: how does one control which letter the enumerate environment … enumerates? Any suggestions are greatly appreciated.

Best Answer

The enumerate package provides the optional argument functionality to listing environments like enumerate. However, to make this work as expected, you need to "shield" the unwanted enumeration from the choices. This is done by putting DAS inside braces, and therefore using

\begin{enumerate}[{DAS}.1]

since in

\begin{enumerate}[{DAS.1}]

the first available enumerations (albeit grouped) are specified by A and 1, causing the D1S.1, D2S.2, ... output. That is, enumerate identifies two locations to place the enumeration, and sets the enumeration style as the last one encountered (1/\arabic in this case). Consequently, using

\begin{enumerate}[{DAa1S.1}]

would yield the enumeration D111S.1, D222S.2, ..., as is visible from the following minimal example:

enter image description here

\documentclass{article}
\usepackage{enumerate}% http://ctan.org/pkg/enumerate
\begin{document}
\begin{enumerate}[{DAS}.1]
  \item stuff
  \item stuff
  \item stuff
\end{enumerate}
\begin{enumerate}[{DAa1S.1}]
  \item stuff
  \item stuff
  \item stuff
\end{enumerate}
\end{document}
Related Question