This question already has an answer here:

Is there a way to let Latex automatically insert a line break not when it runs out of space, but earlier so that the lines in that paragraph have roughly equal length? In my case, I am trying to create this effect with a sentence that is just a little longer than one line. To make sure I have more than two words in the second line of my centered environment.

Such a function exists in Adobe InDesign, for example; it's called "Balance Ragged Lines" there.

OK, thanks for the comments, I got it right in one case. In the other case, the @flushglue just deletes my margins for that paragraph:

\clubpenalty = 10000
\widowpenalty = 10000
\usepackage{array, bm, booktabs, microtype, paralist, subfig, todonotes, verbatim}
{\csname @flushglue\endcsname=0pt plus .25\textwidth
Does this statement resonate with your own interpretation of Hamlet?

If you remove the flushright command, the additional margins will be applied.

Is there a way to get both?

marked as duplicate by Werner, Xavier, T. Verron, David Carlisle, Mico Jun 8 '13 at 11:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Probably your question has already an answer. See Is there a way to avoid short lines?. – karlkoeller Jun 8 '13 at 6:03
  • as @karlkoeller comments this is essentially a duplicate of the linked question, it's worth noting that where I used center there you could also use flushleft if you wanted the lines all to start at the left margin, the same \@flushglue is used in both environments. – David Carlisle Jun 8 '13 at 10:44
  • I changed the question slightly. – chaosflaws Jun 8 '13 at 11:10