我有一个右对齐的 parbox。当单词未填满整行时,最后一行是不完整的:
\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}
相反,我希望最后一行是完整的,而第一行不完整
当然,我可以使用 手动完成\linebreak
,但是 LaTeX 可以自动完成吗?
答案1
\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}