[texhax] Customising list environment

Ozan Öktem ozan.oktem at sidec.com
Wed Jun 6 23:45:29 CEST 2007

Hi,

I have defined the following list environment in a document based on
the memoir document class.

\newcounter{deliverablenum}
\newenvironment{deliverablelist}{%
\begin{list}{\normalfont\bfseries D\arabic{deliverablenum}:}
{\usecounter{deliverablenum}
\setlength{\labelwidth}{0.5cm}
\setlength{\leftmargin}{0.8cm}
\setlength{\rightmargin}{0.3cm}
\setlength{\itemindent}{0.3cm}
}
}{\end{list}}

I have several issues with the current construction.

1. The counter "deliverablenum" is reset each time I start a new
"\begin{deliverablelist} ... \end{deliverablelist}". How can I
prevent that? I want the counter to be incremented throughout the
entire document, across chapters, appendices, sections, etc.

2. The list label is, as one can see in the code above, given as
"D<num>" where "<num>" is the current value of the counter
"deliverablenum". Cross referencing using the standard "\ref"-command
yields the value of the counter "deliverablenum", i.e. "<num>". I
would like the standard  "\ref"-command to yield the entire label,
i.e. "D<num>". How do I do that?

3. How do I prevent the paragraph that follows the list to be indented?

4. How do I adjust the vertical spacing before the environment?

5. How do I adjust the vertical spacing between items in the list
environment?

Sincerely,
Ozan Öktem

--
Ozan Öktem
Ph.D. in Mathematics, Senior Scientist
Sidec Technologies AB
Torshamnsgatan 28A, SE-164 40 Kista, Sweden
Mobile: +46 (0)733 52 21 85
Phone: +46 (0)8 47 77 614
Fax: +46 (0)8 47 77 601
http://www.sidec.com/