Re: counters in list environments



%Paralists

%paralist package doesn't work well with great numbered lists using
roman labels. alwaysadjust option works well for numbered lists with
roman labels having at most seven items. neveradjust option doesn't
work well either with such lists, and generates itemized lists with too
wide left margins. So I have solved this problem adjusting the left
margin for each generated list. As it is not possible to do it with
alwaysadjust option, it is necessary to call paralist package with
neveradjust option. As neveradjust option generates itemized list with
too wide margins, I had also to redefine itemize and compactitem
environments inside my code.

\usepackage[flushleft,neveradjust]{paralist}

\newlength{\lmargin}

%pitemize environment was defined instead of old itemize environment of
paralist, in order to obtain the correct margin under neveradjust
option of paralist. "pitemize" means "personalized itemize". It has
only one argument, which informs the kind of the label.

\newenvironment{pitemize}[1]
{\settowidth{\lmargin}{#1}
\addtolength{\lmargin}{\labelsep}

\setdefaultleftmargin{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}
\begin{itemize}[#1]}
{\end{itemize}}

%pcompactitem environment was defined instead of old compact
environment of paralist, in order to obtain the correct margin under
neveradjust option of paralist. "pcompactitem" means "personalized
compactitem". It has only one argument, which informs the kind of the
label.

\newenvironment{pcompactitem}[1]
{\settowidth{\lmargin}{#1}
\addtolength{\lmargin}{\labelsep}

\setdefaultleftmargin{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}
\begin{compactitem}[#1]}
{\end{compactitem}}

%penumerate environment was defined instead of old enumerate
environment of paralist. It has two arguments. The first one informs
the kind of the label, whereas the second one is a string whose width
informs the width of the greatest label of the list to be generated.
The left margin is the sum of the width of the greatest label plus
\labelsep. "pcompactitem" means "personalized compactitem".

\newenvironment{penumerate}[2]
{\settowidth{\lmargin}{#2}
\addtolength{\lmargin}{\labelsep}

\setdefaultleftmargin{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}
\begin{enumerate}[#1]}
{\end{enumerate}}

%Finally, pcompactenum environment was defined instead of old
compactenum environment of paralist. It has two arguments. The first
one informs the kind of the label, whereas the second one is a string
whose width informs the width of the greatest label of the list to be
generated. The left margin is the sum of the width of the greatest
label plus \labelsep. "pcompactenum" means "personalized compactenum".

\newenvironment{pcompactenum}[2]
{\settowidth{\lmargin}{#2}
\addtolength{\lmargin}{\labelsep}

\setdefaultleftmargin{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}{\lmargin}
\begin{compactenum}[#1]}
{\end{compactenum}}

.



Relevant Pages

  • Re: counters in list environments
    ... %paralist package doesn't work well with great numbered lists using ... %pitemize environment was defined instead of old itemize environment of ... which informs the kind of the label. ...
    (comp.text.tex)
  • Re: counters in list environments
    ... %paralist package doesn't work well with great numbered lists using ... %pitemize environment was defined instead of old itemize environment of ... which informs the kind of the label. ...
    (comp.text.tex)
  • Re: parameters of itemized or numbered lists
    ... > and numbered lists. ... > of parameters, optional or mandatory, of the new itemize and enumerate ... The sample label must include *everything*, ... > environment. ...
    (comp.text.tex)
  • Re: Lists of Figures are consecutively numbered
    ... the format requires that the label not be printed next to the ... If you want three kinds of captions to number independently, ... you will get three separate lists. ... If all your SEQ fields have the same label, or you have not used SEQ fields ...
    (microsoft.public.mac.office.word)