如何仅在段落结束时在水平模式材料后面添加可丢弃的垂直粘连?

如何仅在段落结束时在水平模式材料后面添加可丢弃的垂直粘连?

\parskip我使用 LaTeX2e。我的问题是:如果接下来要开始新的段落,是否可以有一个命令来添加垂直粘连(或增加-glue)?

就像是:

\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}

相关内容