Is it possible to force a newline in a specific position of a paragraph but only if this does not increase the total number of lines?
I tried by using \penalty
with different values, and found that -10000 always forces the newline while -9999 does not enable the newline even if the total number of line breaks is the same.
Here is a possible test document:
\documentclass{article}
\newcommand\X[1]{
\penalty-9999 % please break here if you need to break somewhere
\textbf{(#1)}
}
\begin{document}
\begin{minipage}{5cm}
Which number?
\X{A} 5
\X{B} 7
\X{C} 4
\X{D} 3
\end{minipage}
\end{document}
\sloppy
makes the white space stretchy which makes breaking at the penalty far more likely) (you may also want to increase\linepenalty
so tex is less likely to make an extra line)