5

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?

6

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}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.