# How to make justified alignment of text have as little space between the words as possible?

I've noticed there's always unnecessary space generated between the words when justified alignment of text is used (be it one or another package that does the alignment). I can definitely see all this empty space on each line making some space(?) for additional word (or two; depending on the width of a text container). Is there a way to tune things up a bit to make text justification more compact? What is your solution?

\documentclass[border=0.5mm]{standalone}
\usepackage{ragged2e}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path node[draw,text width=3cm]
{\begin{justify}this is just some text this is just some text this is just some text\end{justify}};
\end{tikzpicture}
\end{document}


Looks about the same with TikZ' align=justify

when contents of tikzpicture are

\path node[draw,align=justify,text width=3cm]
{this is just some text this is just some text this is just some text};


### EDIT: Following are examples of how different ways of justifying text result in different inter-word spacing.

\path node[draw,text width=50mm]
{\begin{justify}test \lipsum hello\end{justify}};


# VS.

\path node[draw,align=justify,text width=50mm]
{\begin{justify}test \lipsum hello\end{justify}};


# results in

• the large example basically just demonstrates the difference between default spacing and \frenchspacing. the answer using microtype is probably the only effective mechanism to comptess the text automatically. – barbara beeton Dec 4 '17 at 17:09

You can use \fussy, but in small text width this can lead to overfull line.

\documentclass[border=0.5mm]{standalone}
\usepackage{ragged2e}
\usepackage{tikz}
\usepackage{microtype}
\begin{document}
\begin{tikzpicture}
\path node[draw,text width=3cm,align=justify]
{\fussy this is just some text this is just some text this is just some text\par};
\end{tikzpicture}
\end{document}


• Fussy will never produce too much space. But you need the \par at the end so that tex doesn't go back to sloppy at the end of the paragraph. – Ulrike Fischer Dec 5 '17 at 8:05
• I'm currently reviewing my comments and ran across this answer. The only problem I see is that when \lipsum is used instead of short text, some of the words do not fit inside the 50mm constrain set for node width. In case you decide to take a look, here is the code: (pastebin.com/raw/htPDXcQJ). If \fussy without \justifying is used, the text doesn't go out of bounds but is not justified (which is a downside). Thank you. – bp2017 Dec 2 '19 at 6:17