6

I have a parbox which is right-justified. When the words do not fill an entire number of lines, the last line is incomplete:

\documentclass[preview]{standalone}

\begin{document}

\fbox{\parbox{10cm}{\raggedleft Some text some text some text some text some text}}

\fbox{\parbox{10cm}{\raggedleft Some text some text some text  some text some text some text some text some text some text}}

\end{document}

what I can do

Instead of that, I would like the last line to be complete, and the first one incomplete

what I would like to do

Of course I can do that manually with \linebreak, but can it be done automatically by LaTeX?

1 Answer 1

7

enter image description here

\documentclass[preview]{standalone}

\begin{document}

\fbox{\parbox{10cm}{\raggedleft Some text some text some text some text some text}}

\fbox{\parbox{10cm}{\raggedleft Some text some text some text  some text some text some text some text some text some text}}


\fbox{\parbox{10cm}{\raggedleft
\parfillskip-\leftskip\hfill
Some text some text some text  some text some text some text some text some text some text}}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .