Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I cannot get rid of the vertical space before and behind the lists. I have code like below:

\begin{list}{-}{%
  \setlength{\itemsep}{0pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}    
  \item First item
  \item Second item
\end{list}
share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I answered this at stackexchange where you originally posted (below). I tried the suggested use of `\setlength{tosep}{0pt} but don't know if it's what you want. It seems that that eliminates space in between list items but not before and after lists themselves, but I could be wrong. My solution below may be hackish (or maybe not...), but it leaves no space between a previous paragraph, the itemized list, the items themselves, or the following paragraph.


Itemize without itemizing...

Some text that is here and I want to see what it does. \\
  \indent$\bullet$\,first item \\
  \indent$\bullet$\,second item \\
Some text that is here and I want to see what it does.

Replace $\bullet$ with whatever you want.

\indent- first item\\
\indent$\cdot$\,first item\\
\indent$\circ$\,first item\\
\indent$\ast$\,first item\\

The "-" seems to work fine with the whitespace as shown but the rest need the trailing \, which inserts a space between the math symbol and the next word. Without it there will be no space between the "bullet" and the text that follows.

share|improve this answer
    
Yes, it looks nice, but what about the list which has items longer than one line, I need to put continuing line indented as well - I commented the same on stackoverflow –  kogut Nov 18 '10 at 22:11
1  
Think I got it. See stackoverflow.com/questions/4210766/… for the update. –  Hendy Nov 18 '10 at 23:17
    
I don't recommend hand-rolling your own lists. Just use enumitem to make a better itemize. –  Will Robertson Nov 19 '10 at 4:04
1  
@Will: absolutely. Not ideal. I just provided the best answer I could given my available knowledge. I was unfamiliar with the enumitem package, but perhaps you could provide an example with that method that also accomplishes the above? –  Hendy Nov 19 '10 at 17:12
add comment

Add \setlength{\topsep}{0pt} to the list parameters. You could also use the enumitem package which offers a nolistsep option for the list environments.

share|improve this answer
    
+1 for enumitem –  Will Robertson Nov 19 '10 at 4:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.