[Tuglist] Problem with list environment.

S. venkataraman tuglist@tug.org.in
Tue, 28 May 2002 10:49:38 +0530


Hi,
I have a peculiar problem with a list environment I defined. 
I have defined some commands for saving some parameters.  The important
reason 
for defining this list to have flush left item numbering rather than the
flush right numbering that 
latex gives.
Sometimes it gives a latex error message `missing item'.
Quite often it goes away on it own, meaning after some time latex
doesn't
give this message, so you may not be able to reproduce the error
message.  
I have reproduced the list below:
\newlength{\lsubexlabelsep}
\setlength{\lsubexlabelsep}{0pt}
\newlength{\lsubexitemskipsave}
\setlength{\lsubexitemskipsave}{\itemsep}
\newlength{\lsubexitemskip}
\setlength{\lsubexitemskip}{\lsubexitemskipsave}
\newcommand{\setsubexitemskip}[1][\lsubexitemskipsave]{\setlength{\lsube
xitemskip}{#1}}
\newlength{\subexskip}
\newlength{\lsubexparsep}
\newlength{\lsubexparsepsav}
\newcommand{\setsubexparsep}[1][\lsubexparsepsav]{\setlength{\lsubexpars
epsav}{\parsep}\setlength{\lsubexparsep}{#1}}
\setlength{\subexskip}{-5pt}
\newcommand{\resetsubexskip}[1][-5pt]{\setlength{\subexskip}{#1}}%for
changing \topsep
\newenvironment{subex}{%beginning of preamble of subex
\begin{list}{}%label declaration is empty
{%list declaration starts
\setlength{\topsep}{\subexskip}%
\settowidth{\labelwidth}{xiii) }%
\setlength{\labelsep}{\lsubexlabelsep}%
\setlength{\leftmargin}{0pt}%
\setlength{\parsep}{\lsubexparsep}
\setlength{\itemsep}{\lsubexitemskip}
\addtolength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}[1]{{##1\hfill}}% to get flush left list
numbering.
}%list of declaration ends
\mraggedright}%
{%beginning of postamble(!!) of subex.
\end{list}
}
Venkataraman.