Alinhamento de texto em itens específicos

Alinhamento de texto em itens específicos

Quero alinhar meu texto sob o símbolo ":" ou outro, por exemplo quero algo assim:

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

E não sei como fazer, tentei vários ambientes, como {enumerate} ou {itemize} ou {description} mas nenhum deles funcionou.

Como posso fazer algo como eu quero?

Obrigado.


Obrigado, mas não me ajudou muito: na verdade quero escrever o que quero antes de alinhar o restante do texto, por exemplo para as referências de um artigo:

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

Não sei se fui muito claro, desculpe.

Responder1

Uma forma de obter o alinhamento desejado é definir uma macro personalizada:

insira a descrição da imagem aqui

Notas:

  • O showframepacote foi usado apenas para mostrar as margens da página. Não é necessário no seu caso de uso real.

Código:

\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}

informação relacionada