# Specifying exact space between two words for fully justified text

Is there a way of specifying the exact space, in some given unit, between two words when the text is fully justified? I normally use \hspace{x cm} when I want to increase/decrease the space relative to the original spacing post-justification by x cm. But how can I specify an exact space such that the spacing between the words does not change, regardless of what justification does to the base spacing?

• Did you try to put the words into an hbox? Connect them with your hspace command without spaces. Just an idea - no latex available at the moment... Jul 17, 2020 at 22:42

The \hbox or \mbox solution is good. Another possibility is to eliminate existing space

\newcommand\sep[1]{%
\leavevmode\unskip\unskip
\nobreak % optional
\hspace{#1}\ignorespaces
}

specifying the exact \sep{4mm} space, in some given unit


This eliminates white space from \hspace commands or space characters before the measured gap, but ignores only space characters (or line-ends) afterwards. The \nobreak is on the assumption that you don't want a line break there. The \leavevmode makes sure you aren't berween paragraphs, preventing the \unskip commands from eliminating \vspace glue. Two \unskips allow for \hspace plus a space character preceding the gap.

• Nice to see a compliment like "The solution is good"... thx ;-) Jul 17, 2020 at 23:39
• This is exactly what I was looking for! Thank you! Jul 18, 2020 at 11:14

You could try something like

I love \mbox{big\hspace{2em}green} apples more than the small red ones.


Note: Usually it is not a good idea to fiddle with interword spacing... :-(

• @egreg answer updated - you're right... :-) Jul 18, 2020 at 7:37
• Yes, I'd upvote it again if I could. Jul 18, 2020 at 8:17