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.

  • 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? – kiss my armpit May 22 '12 at 15:37
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.