图像移动后删除文本中的空白

图像移动后删除文本中的空白

我正在写一篇论文,有大约 80 个图表。文本以一行空格引出图表:

....text text text text.

\begin{figure}[h]
....
\end{figure}

More text, and so on...

我的问题是,有时,可能总共 3 次,一旦将图形放置在合适的位置,LaTeX 就会决定不再将文本拼接在一起。

所以:

    This is example text this is example text this is example text this is
example text this is example text this is example text this is example text
this is example text.

    Text begins again, this is example text this is example text this is
example text this is example text this is example text this is example text
this is example text.

代替:

 This is example text this is example text this is example text this is
example text this is example text this is example text this is example text
this is example text.
    Text begins again, this is example text this is example text this is
example text this is example text this is example text this is example text
this is example text.

当我放置整页图时,情况变得更糟。空白大约有 4 行。

无论如何,无论代码是否相同,相似的图形有时都会发生这种情况,有时不会。有没有办法强制拼接图形代码两侧的文本?

答案1

如本例所示,在浮点数周围留一个空行时,应该不会有多余的空间。

在此处输入图片描述

\documentclass{article}

\begin{document}

\setlength\baselineskip{20pt}
\setlength\parskip{30pt}
\setlength\unitlength{50pt}


aaaa1\begin{picture}(0,0)
\put(0,0){\line(1,0){1}}
\put(0,-1){\line(1,0){1}}
\put(0,-2){\line(1,0){1}}
\put(0,-3){\line(1,0){1}}
\put(0,-4){\line(1,0){1}}
\end{picture}

aaaa2

\begin{figure}[p]xxx\end{figure}

aaaa3


aaaa4


aaaa5


\end{document}

相关内容