Re: counters in list environments
- From: "Arthur Buchsbaum" <arthurbu@xxxxxxxxx>
- Date: 15 Nov 2005 20:42:51 -0800
%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}}
.
- Follow-Ups:
- Re: counters in list environments
- From: Arthur Buchsbaum
- Re: counters in list environments
- References:
- counters in list environments
- From: Arthur Buchsbaum
- Re: counters in list environments
- From: Gabriel Guernik
- Re: counters in list environments
- From: Arthur Buchsbaum
- Re: counters in list environments
- From: Dan
- Re: counters in list environments
- From: Arthur Buchsbaum
- counters in list environments
- Prev by Date: Re: counters in list environments
- Next by Date: Re: counters in list environments
- Previous by thread: Re: counters in list environments
- Next by thread: Re: counters in list environments
- Index(es):
Relevant Pages
|