I am trying to build a very compact itemize with LaTeX, because I want to fit it in a table without whitespace everywhere.
What I need:
I have tried many packages (paralist
, mdwlist
, enumitem
) but non of them can fully do it.
I tried it myself (with the help of paralist
) and could get rid of everything except the whitespace after the list. This is my current solution:
\makeatletter \newcommand*{\compress}{\@minipagetrue} \makeatother \newenvironment{ilist}% { %from parlist package, reduces indent before bulletpoints \setdefaultleftmargin{1em}{1em}{}{}{}{} \compress %places itemize into minipage, removing whitespace before \begin{itemize}% \setlength{\itemsep}{0pt}% \setlength{\topsep}{0pt} \setlength{\partopsep}{0pt} \setlength{\parsep}{0pt} \setlength{\parskip}{0pt}}% {\end{itemize}}
However, I am unable to get rid of the space after the list. I can do it with a negative vspace
but this is:
Can anyone tell me how to do it? I have googled so much, but it somehow seems that I am the first human that ever tried to insert an itemize into a table :D
How do you reduce space before and after itemize in LaTeX? You have to do it manually: \kern-\parskip\begin{itemize} then your \items and then \end{itemize}\kern-\parskip.
You can create a numbered list with LaTex bullet points with the same code we used before, except with \begin{enumerate} and \end{enumerate} around the list items instead of \begin{itemize} and \end{itemize}. When compiled, the result resembles: As you can see, the above example shows each list item numbered.
the itemize environment for creating a bulleted (unordered) list. the enumerate environment for creating a numbered (ordered) list. the description environment for creating a list of descriptions.
To change these settings globally
\usepackage{enumitem} \setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
(And you can use the \setenumerate
, \setdescription
or \setlist
commands for other types of lists)
Or for just a single list
\usepackage{enumitem} ... \begin{itemize}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt] \item item 1 \item item 2 \item item 3 \end{itemize}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With