5

I an using this snippet to make bullet list with default documet line interval. This code works fine, but every line in this list is indented. I want to indent only first line. How can I achive this?

% List without intervals
\newenvironment{compactlist}{
 \begin{list}{{$\bullet$}}{
  \setlength\partopsep{0pt}
  \setlength\parskip{0pt}
  \setlength\parsep{0pt}
  \setlength\topsep{0pt}
  \setlength\itemsep{0pt}
 }
}{
 \end{list}
}

1 Answer 1

5

Add

\setlength{\itemindent}{\leftmargin}
\setlength{\leftmargin}{0pt}

to your list definition.

\documentclass{article}

\newenvironment{compactlist}{
 \begin{list}{{$\bullet$}}{
  \setlength\partopsep{0pt}
  \setlength\parskip{0pt}
  \setlength\parsep{0pt}
  \setlength\topsep{0pt}
  \setlength\itemsep{0pt}
  \setlength{\itemindent}{\leftmargin}
  \setlength{\leftmargin}{0pt}
 }
}{
 \end{list}
}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{compactlist}
\item \lipsum[1]
\end{compactlist}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .