I'm using \emph to denominate diagrams in my text, and, since they are referenced as almost like mathematical variables, I would like to keep them visually tight. However, LaTeX seems to go in the opposite direction and try really hard to put the maximum amount of justification space around my emphasized text, which looks even worse, since it is slanted text.
I'm thinking that the best solution would be to isolate text inside \emph from the process of justification, but I don't know if it would generate other problems, or if it would look even worse. Does anyone have any ideas?
Here is an example, note the amount of space between the words "Dia." and "1" right next to the diagrams:
Here's the code which generated that thing of beauty, even though I don't think it is very relevant for this specific problem — I'm using babel in Portuguese and sidecap here —:
\begin{SCfigure}[][h!]
\begin{subfigure}[t]{.29\textwidth}
\includegraphics[width=1\textwidth]{2 - Problema 4 - Dia 1}
\caption*{\emph{Dia. 1. Correto}}
\end{subfigure}
\hfill
\begin{subfigure}[t]{.29\textwidth}
\includegraphics[width=1\textwidth]{2 - Problema 4 - Dia 2}
\caption*{\emph{Dia. 2. Errado}}
\end{subfigure}
\hfill
\caption*{\textbf{Resposta ao Problema 4}\\\\Preto 1 no \emph{Dia. 1} captura duas pedras.\\\\Se Preto joga 1 no \emph{Dia. 2}, Branco pode resgatar suas pedras estendendo em 2.}
\end{SCfigure}
\pagebreak
\begin{itemize}
\item[\textbf{Resposta ao Problema 5}]
Preto 1 no \emph{Dia. 1} captura duas pedras.
Se Preto estende para 1 no \emph{Dia. 2}, Branco pode resgatar suas pedras conectando em 2.
\item[\textbf{Resposta ao Problema 6}]
Preto 1 no \emph{Dia. 1} captura as duas pedras marcadas.
Se Preto estende para 1 no \emph{Dia. 2}, Branco pode resgatar suas duas pedras capturando as duas pedras pretas com 2.
\item[\textbf{Resposta ao Problema 7}]
Preto 1 no \emph{Dia. 1} captura duas pedras.
Se Preto faz atari com 1 em \emph{Dia. 2}, Branco pode resgatar suas pedras e capturar duas do Preto com 2.
\end{itemize}

Dia. 1is not an end-of-sentence period, rather an abbreviation (ofDiagrama?), useDia.\@ 1instead: that will make the space after the period the same width as other inter-word spaces – Phelype Oleinik Sep 23 '21 at 01:35\@? But besides that, do you know if there's a way of locking the spacing insideDia. 1to a minimum and have the rest be justified? – psygo Sep 23 '21 at 01:38\hspace{<some amount>}, which won't stretch. Something like\DeclareRobustCommand{\fixedwidthspace}{\leavevmode\nobreak\hspace{\fontdimen2\font}}(\fontdimen2\fontis the natural width of a space). – Phelype Oleinik Sep 23 '21 at 01:48\raggedright. (This is a subjective decision.) – barbara beeton Sep 23 '21 at 02:11