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}

2 Answers 2

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

0
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}
1
  • 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 5, 2012 at 18:25

You must log in to answer this question.

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