Discussion:
Vertical spacing in "itemize"
(too old to reply)
Marthein Plat
2006-11-22 15:51:18 UTC
Permalink
Hi All,

I'm trying to redefine the "itemize" environment such that the vertical
spacing between the items is smaller. I'm doning this with
\renewenvironment, like this:

\let\Olditemize=\itemize\relax

\renewenvironment{itemize}{
\begin{OldItemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{OldItemize}
}

But something goes wrong, the layout is not how I want it. To see where the
problem arises I have created two different environments:

\newenvironment{tpitemize}{
\begin{Olditemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{Olditemize}
}

\newenvironment{tppitemize}{
\begin{itemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{itemize}
}

The last one (tppitemize) produces the results I want, tpitemize produces
the same result as the "renewenvironment" version above.

Can anyone tell me what I should change? I would really like to use
\begin{itemize} in the text instead of \begin{tppitemize}, because that
would create compatibility problems with standard styles.

Best regards,

Marthein
Robin Fairbairns
2006-11-22 16:25:46 UTC
Permalink
Post by Marthein Plat
I'm trying to redefine the "itemize" environment such that the vertical
spacing between the items is smaller. I'm doning this with
\let\Olditemize=\itemize\relax
\renewenvironment{itemize}{
\begin{OldItemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{OldItemize}
}
But something goes wrong, the layout is not how I want it.
it is always useful if posters bother to describe _what_ goes wrong.

you have, in effect, replace \end{itemize} with \relax; i presume the
problem is related to failing to close the list.

does:

\let\Olditemize=\itemize
\let\endOlditemize=\enditemize

\renewenvironment{itemize}{
\begin{OldItemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{OldItemize}
}

help? (note, i've removed your unnecessary \relax.)

see also http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist
--
Robin Fairbairns, Cambridge
Marthein Plat
2006-11-23 07:59:49 UTC
Permalink
Hi Robin,

Thank you for your help. I tried something similar yesterday, but I used
\end{endOldItemize} instead of \end{OldItemize}, which gives the error: "
LaTeX Error: \begin{Olditemize} on input line 22 ended by
\end{endOlditemize}".

I did not realize LaTeX prepends the "end" to "Olditemize" itself and
defines "endOlditemize" when it does not exist. Now it does exactly what I
want it to do.

Best regards,

Marthein Plat

P.S. I have also followed your link and tried to get the expdlist.sty
package, but the link to it seems to be broken.
Post by Marthein Plat
\let\Olditemize=\itemize
\let\endOlditemize=\enditemize
\renewenvironment{itemize}{
\begin{OldItemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{
\end{OldItemize}
}
help? (note, i've removed your unnecessary \relax.)
see also http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist
--
Robin Fairbairns, Cambridge
José Carlos Santos
2006-11-22 16:28:51 UTC
Permalink
Post by Marthein Plat
I'm trying to redefine the "itemize" environment such that the vertical
spacing between the items is smaller. I'm doning this with
[snip]
Can anyone tell me what I should change? I would really like to use
\begin{itemize} in the text instead of \begin{tppitemize}, because that
would create compatibility problems with standard styles.
Aren't trying to re-invent the wheel? Please read

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist

Best regards,

Jose Carlos Santos
Continue reading on narkive:
Loading...