1

I want to align my text under the symbol ":" or another, for example I want something like that :

 First thing : Blablablabla ...
               Blablabla
 Second : blablablabla
          blabla

And I don't know how to do it, I tried many environments, like {enumerate} or {itemize} or {description} but none of them worked.

How can I do something like I want ?

Thank you.


Thank you, but it didn't help me much : in fact I want to write what I want before having the remaing text aligned, for example for the references in an article :

[Friedman1967] Here there is the reference
               which is long.
[Zu2014] Here is an other, the alignment is different.
         but it is stil coherent. 

I do not know if I am very clear sorry.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Mickael
  • 11

1 Answers1

2

One way to obtain the desired alignment is to define a custom macro:

enter image description here

Notes:

  • The showframe package was used just to show the page margins. It is not needed in your actual use case.

Code:

\documentclass{article}
\usepackage{showframe}

\newlength{\LabelWidth} \newcommand*{\AlignedText}[2]{% \par\noindent\textbf{#1:} \settowidth{\LabelWidth}{\textbf{#1} }% \parbox[t]{\dimexpr\linewidth-\LabelWidth-\parsep\relax}{#2\strut}% }

\begin{document} \AlignedText{Friedman1967}{Here is the reference which is quite long and spills onto a second line.} \AlignedText{Zu2014}{Here is an other, the alignment is different, but it is still coherent, and also takes more than one line.} \end{document}

Peter Grill
  • 223,288