
Quiero alinear mi texto bajo el símbolo ":" u otro, por ejemplo quiero algo así:
First thing : Blablablabla ...
Blablabla
Second : blablablabla
blabla
Y no sé cómo hacerlo, probé muchos entornos, como {enumerate} o {itemize} o {description} pero ninguno funcionó.
¿Cómo puedo hacer algo como quiero?
Gracias.
Gracias, pero no me ayudó mucho: de hecho quiero escribir lo que quiero antes de alinear el texto restante, por ejemplo para las referencias de un artículo:
[Friedman1967] Here there is the reference
which is long.
[Zu2014] Here is an other, the alignment is different.
but it is stil coherent.
No sé si soy muy claro lo siento.
Respuesta1
Una forma de obtener la alineación deseada es definir una macro personalizada:
Notas:
- El
showframe
paquete se usó solo para mostrar los márgenes de la página. No es necesario en su 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}