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.

How can I do something like this:

 blabla:   blabla bla bla blabla blabla bla
           blabla ...
blabla2:   blabla bla blabla bla bla blabla
           ablabla ..

I tried the tabular and array environements but it gives me long centred lines and don't return after the line reach the end of the page.

share|improve this question
    
Is it necessary that this list be able to break across the page boundary? If not, you should look into the enumitem package. –  Werner May 22 '12 at 15:37
    
description environment helps? –  stalking is prohibited May 22 '12 at 15:37

1 Answer 1

up vote 4 down vote accepted

Here are two possible options: the first one uses a tabular environment; the second column is a p{...} column so the text will wrap; the width of this column was calculated so as to guarantee that the whole construct occupies the whole \textwidth; you can find basic information about the tabular environment in every introductory guide to LaTeX and in the documentation of the array package. The second solution uses a modified description environment; the settings were made using the enumitem package. The first solution doesn't admit page breaks; the second one, does.

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}% just to generate filler text for the example

\begin{document}

\newlength\Headwd
\settowidth\Headwd{Longer Text2:}
\noindent\begin{tabular}{@{}r@{:\hspace{1em}}p{\dimexpr\textwidth-1em-\Headwd\relax}@{}}
Text1 & \lipsum[2] \\
Longer Text2 &  \lipsum[2] \\
\end{tabular}

\begin{description}[
  before={\renewcommand\makelabel[1]{\makebox[2.5cm][l]{\hfill##1:\hspace{1em}}}},
  leftmargin=*,labelsep=0pt,itemindent=-2.5cm]
\item[Text1] \lipsum[2]
\item[Longer Text2]  \lipsum[2]
\end{description}

\end{document}

enter image description here

share|improve this answer

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.