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?
-
2Did 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...– AndiWJul 17, 2020 at 22:42
2 Answers
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 \unskip
s allow for \hspace
plus a space character preceding the gap.
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... :-(