0

Consider this MWE:

\documentclass[10pt,journal,compsoc]{IEEEtran}
\hyphenation{veryverylongword}
\begin{document}
\textbf{The word word word word word.} The word-veryverylongword word word word word.
\end{document}

This produces:

enter image description here

What I want it to produce is:

enter image description here

I can do that by using

\textbf{The word word word word word.} \hfill \makebox{The word}-veryverylongword word word word word.

which, however, is a bit hacky. Is there some less tedious and error-prone way of accomplishing this? Maybe, some command I can put at the place were I want the additional spacing to be concentrated at, like in this case before "The"?

1 Answer 1

1

the class seems to have set \frenchspacing so the space after . isn't enlarged at all, you ca use \nonfrenchspacing (the latex default) to allow more stretch there, or you can set \xspaceskip to specify arbitrray space after a full stop

enter image description here


\documentclass[10pt,journal,compsoc]{IEEEtran}
\hyphenation{veryverylongword}

\begin{document}

\textbf{The word word word word word.} The word-veryverylongword word word word word.
\nonfrenchspacing


\textbf{The word word word word word.} The word-veryverylongword word word word word.

\xspaceskip=.3em plus 10em
\textbf{The word word word word word.} The word-veryverylongword word word word word.
\end{document}
1
  • Do add a clue about how to allow hyphenation of the veryverylongword (if that's hyphenatable except for the hyphen preceding it). Jul 20, 2021 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .