8

I have a bullet point list that I think would look a lot better if I could indent the second line of some of the points. This really shouldn't be hard, but I can't seem to manage. I've tried \hspace and a few other things. Any suggestions?

\documentclass{article}
\begin{document}
    \begin{list}{\labelitemi}{\leftmargin=1em}
        \item \texttt{type} --- ablah bblah cblah \\ 
        this line should start right under ``ablah'' above
            \end{list}
\end{document}
Boris
  • 38,129
Nagel
  • 234

2 Answers2

6

First, you want to indent the second line by the length of the item label, \labelwidth. Second, you want to further indent it by the length of the words \texttt{type}---. The command \phantom does this. Thus we get the following code:

\documentclass{article}
\pagestyle{empty}
\begin{document}
    \begin{list}{\labelitemi}{\leftmargin=1em}
        \item \texttt{type}---ablah bblah cblah \\ 
        \hspace{\labelwidth}\phantom{\texttt{type}---}this line should
        start right under ``ablah'' above 
            \end{list}
\end{document}

enter image description here

Boris
  • 38,129
6

If you want to add space at the beginning of a line you need to use \hspace*{}. The normal \hspace{} is ignored at the beginning of a line.

Alternatively, I would recommend using the enumitem package:

enter image description here

\documentclass{article}
\usepackage{enumitem}
\begin{document}
    \begin{itemize}
        \item [$\bullet$ \texttt{type} ---] ablah bblah cblah
        \item [] this line should start right under ``ablah'' above
     \end{itemize}
\end{document}
Peter Grill
  • 223,288
  • Thanks, Peter! Both \hspace* and enumitem might come in handy later. (I'll try to remember to up-vote your answer when my reputation allows it :) – Nagel May 05 '12 at 18:25