3

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.

2
  • Is it necessary that this list be able to break across the page boundary? If not, you should look into the enumitem package.
    – Werner
    Commented May 22, 2012 at 15:37
  • description environment helps? Commented May 22, 2012 at 15:37

1 Answer 1

4

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

You must log in to answer this question.

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