答案1
将第一段放在其自己的框中,并使用\parfillskip
使最后一行完全填满。
\documentclass[12pt, a4paper]{article}
\usepackage[a4paper, includeheadfoot, margin=2.54cm]{geometry}
\begin{document}
\section{The Koch snowflake}
\parbox{\textwidth}{The \emph{Koch snowflake}, one of the first fractals,
is based on the work by the Swedish mathematician Helge von Koch [1]. It is
what we get if we start with an equilateral triangle \parfillskip=0pt}
\begin{figure}[ht]
\centering some pretty pictures here
\end{figure}
Some more text.
\end{document}
事实上这\parbox
并不是必需的,而是一个几乎不需要输入太多内容的解决方案——您必须将段落放在它自己的组中以阻止其\parfillskip
泄漏到文档的其余部分,并在\par
组结束之前明确结束该段落——但这可能对想要将其放入宏定义中的人有用。
{The \emph{Koch snowflake}, one of the first fractals,
is based on the work by the Swedish mathematician Helge von Koch [1]. It is
what we get if we start with an equilateral triangle \parfillskip=0pt\par}
注意,我把你的例子变成了最低限度工作示例 - 主要是因为我不喜欢当打字员!以后,请将您的代码复制粘贴到问题中,这样我们就可以在答案中复制粘贴并编辑它!