LaTeX question: How can I control the line spacing in itemize and enumerate tags?
What I did was to create my own LaTeX command, and then use that command instead of the traditional enumerate tag. (This works just as well for the itemize tag.)
The LaTeX example below shows how to create your own command named packed_enum. After you define this command, just use it instead of enumerate or itemize, and your line spacing will essentially be reduced to single line spacing.
Note that this problem does not occur when you're generating LaTeX HTML documents, but does rear it's ugly head when you're generating LaTeX PDF documents. The default line spacing is just too large for my purposes.
Without any further ado, here is a complete Latex source code example that shows how to define and use a new tag to condense lines in enumerate lists.
\documentclass[letterpaper,11pt]{report}
\newenvironment{packed_enum}{
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{enumerate}}
\begin{document}
\chapter{Movies I need to watch}
Here is a short list of movies I need to watch some day:
\begin{packed_enum}
\item The Longest Day
\item Kill Bill 1
\item Kill Bill 2
\item Pretty much every other movie created in the last 30 years. :)
\end{packed_enum}
\end{document}
Worked great, thanks!!!
Worked great, thanks!!!
Thanks.
Very nice. Thanks.
Thanks
works like a charm
You can also use \itemsep and
You can also use \itemsep and \parskip to adjust the line spacing.
\begin{enumerate}
\itemsep 1pt
\parskip 0pt
\item First
\item Second
\item Third
\item \ldots
\end{enumerate}
LaTeX line spacing with itemsep and parskip
I haven't taken the time to test this yet, but I wanted to share your comment in hopes it will help others. Many thanks!
Thanks a lot! :)
Thanks a lot! :)
thank you
thank you
Change the standard itemize
This will change how the standard itemize and enumerate works and give both a smaller spacing.
\let\olditemize=\itemize
\def\itemize{
\olditemize
\setlength{\itemsep}{-1ex}
}
\let\oldenumerate=\enumerate
\def\enumerate{
\oldenumerate
\setlength{\itemsep}{-1ex}
}
Not my code, but i can't remember where i got it from.
Post new comment