# Is it possible to force LaTeX to stretch the last line in a paragraph to fill the complete line?

Force the word triangle to connect with the page frame, and adding even spacing between the words to make it fit nicely.

Put the first paragraph in its own box, and use \parfillskip to make the last line completely full.

\documentclass[12pt, a4paper]{article}

\begin{document}

\section{The Koch snowflake}

\parbox{\textwidth}{The \emph{Koch snowflake}, one of the first fractals,
is based on the work by the Swedish mathematician Helge von Koch [1]. It is

\begin{figure}[ht]
\centering some pretty pictures here
\end{figure}

Some more text.

\end{document}


In fact the \parbox isn't essential, but a solution without it almost as much typing - you have to put the paragraph in a group of its own to stop the \parfillskip leaking into the rest of the document, and explicitly end the paragraph with \parbefore the end of the group - but that might be useful to someone who wants to put this in a macro definition.

{The \emph{Koch snowflake}, one of the first fractals,
is based on the work by the Swedish mathematician Helge von Koch [1]. It is

• It actually suffices to do ... triangle{\parfillskip=0pt\par}. Starting a paragraph inside a group is dangerous as it scopes the effect of \everypar. This breaks , e.g., wrapfig. – Henri Menke Sep 12 '17 at 4:16