Manual linebreak with justification but without empty line afterwards
if the last line of your paragraph is really nearly full, you can get it to end flush right by the following approach.
wrap the paragraph in braces.
end the paragraph with these commands (inside the braces):
\unskip\parfillskip 0pt \par
update: a mechanism that doesn't require braces.
before the paragraph, insert
\startsquarepar
at the end of the paragraph, insert
\stopsquarepar
define these two commands in the preamble as follows:
\newcommand{\startsquarepar}{% \par\begingroup \parfillskip 0pt \relax} \newcommand{\stopsquarepar}{% \par\endgroup}
it's not necessary to have blank lines either before or after either of these commands
(the grouping and included \par
ensures that that's not a problem), but readability
and "good practice" suggests that a blank line before \startsquarepar
and one after
\stopsquarepar
is a good idea.
blank lines within the scope of \startsquarepar
and \stopsquarepar
will start new
paragraphs as expected, and all paragraphs within this scope will end flush right --
whether or not there's the right amount of material in each paragraph to avoid excessive spacing.
why didn't i use \begin...
and \end...
? while there are no "strings" attached to
\begin...
, latex has co-opted the use of \end...
for its own purposes in defining
environments. if you really prefer the \begin ... \end
terminology and environment
syntax, it's easy to transform the two command definitions given into a single
environment definition. (but left as an exercise to the reader.)
edit: one final suggestion from egreg's comment (to keep it from getting lost).
{{\parfillskip0pt\par}}
can be a useful for a manual solution as it
doesn't need bracing the paragraph.
It is as simple as getting rid of the empty line in your code
\documentclass{article}
\begin{document}
Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah blah blah
blah blah blah Blah blah blah blah blah blah blah blah. \linebreak
Blah blah blah blah blah blah blah blah blah Blah blah blah blah blah blah blah blah
blah blah Blah blah blah blah.
\end{document}
Which produces
Empty line ends the paragraph, just like the \par
command. \linebreak
switches to next line within the same paragraph.