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 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}
share|improve this question

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer
    
Awesome! Thanks :) –  Nagel May 5 '12 at 17:39

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}
share|improve this answer
    
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 '12 at 18:25

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.