This question reminds me of the “Mathematical Reviews example” that you can find on page 106 of The TeXbook (second double dangerous bend paragraph): indeed, rather than the unnecessarily complicated and, above all, inherently unsafe test on \predisplaysize
, I would use that approach, which is much more straightforward and reliable.
The reason for which the test for the value of \predisplaysize
cannot be trusted, in general, is explained on page 188, second (double dangerous bend) paragraph. In particular, with e-TeX, simply activating the \lastlinefit
feature can cause this test to fail.
In the following code, a command named \cleverparindentspace
is defined: you use this command to insert into the current paragraph a space of width \parindent
which is “clever” in the sense that it starts a new line if the text following it does not comfortably fit into the remainder of the same line -- just what you asked, if I understood well. Anyway, once you have got the general idea, you can fine tune this command to your needs; in particular, you can calibrate TeX’s propensity to choose the “new line” alternative by changing the value of the \penalty
. The code also demonstrates the unreliability of the \predisplaysize
test.
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\newcommand*{\cleverparindentspace}{%
\unskip
\nobreak \hfil \penalty1000 \hfilneg \indent
}
\lastlinefit = 750
\begin{document}
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) One two three four five six seven eight.\cleverparindentspace
{\footnotesize\bfseries Here it is!}
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) One two three four five six seven eight. With a few words
added.\cleverparindentspace {\footnotesize\bfseries Here it is!}
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) One two three four five six seven eight. With some more words
added.\cleverparindentspace {\footnotesize\bfseries Here it is!}
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) One two three four five six seven eight. This one is just a tiny
bit longer:~a.\cleverparindentspace {\footnotesize\bfseries Here it is!}
% But consider the following:
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) One two three four five six seven eight. This one is just a tiny
bit longer: a.\cleverparindentspace {\footnotesize\bfseries Here it is!}
% You shouldn't trust \predisplaysize:
One two three four five six seven eight. Some words. Some more words. How
long is this going to last? One two three four five six seven eight. This is
incredibly boring, isn't it? (That was actually a quotation from \textsl{The
\TeX book}.) The pre-display line.
$$\verb"\predisplaysize"=\mbox{\the\predisplaysize}$$
\end{document}
Output:

\parskip
here (that is the vertical space between paragraphs, but you seem to mean a horizontal space (\parindent
perhaps?)