I use LaTeX2e. My question is: Can you have a command which adds vertical glue (or increases \parskip-glue) if the next thing that happens is starting new paragraph?
Something like:
\documentclass{article}
\newcommand{\AddVerticalGlueIfParagraphEndsHere}[1]{....????....}
\begin{document}
% Here nothing shall happen at all because
% \AddVerticalGlueIfParagraphEndsHere
% is in the middle of a paragraph:
text text\AddVerticalGlueIfParagraphEndsHere{2cm} text text
text text text text text text text text
text text text text text text text text text text text text text
% Following \parskip-glue shall be increased by 2cm in comparison
% to what it usually is because
% \AddVerticalGlueIfParagraphEndsHere
% is the last thing before starting a new paragraph:
text text text text text text text text text text text text text
text \begingroup text text\AddVerticalGlueIfParagraphEndsHere{2cm}%
\endgroup\csname @firstofone\endcsname{\emppty}\relax
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text
% Here normal \parskip-glue:
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text
\end{document}
\everyparbecause that is not "group-resistent". – Jewdokija Nov 25 '19 at 01:11\futurlet. For example,\futurlet\a\b\parwill\let\a=\parthen expand\b, which can contain\ifx\par\a ... \fi. – John Kormylo Nov 25 '19 at 05:09