I want to have right and left- aligned text on the same line. I tried the \hfill
command, but my problem is, if the right-aligned text is to long and the line breaks, the rest is left aligned, even if I use \raggedright
.
Additionally I want a comment on the right side, wich is always in the first line, but the rest of the text before (after linebreak) should be aligned right under this comment. I don't know, if I can achive this with tables and how. It is important, that the space between the "left" text and the right one can vary from paragraph to paragraph, because I want as few linebreaks as possible.
Does anyone have a solution for this? The following example shows the problem with the left-aligned text after linebreaks - I want it on the right side and the italic-styled comment on the first line at the right side.
\documentclass[c6paper,DIV=14,pagesize=auto,fontsize=8pt]{scrbook}
\begin{document}
\textbf{I} Some Name \hfill {\raggedright \tiny Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
\textbf{II} Another Name \hfill {\raggedright \tiny Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum elit}
\noindent \textbf{IIa} Variant of Another Name\hfill {\raggedright \tiny Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
\end{document}