数字与上边距的间距

数字与上边距的间距

如何增加页边距和图形之间的间距?目前,我的图形中有一些文字,但文字对齐不正确(见屏幕截图)文本错位

以下是 MWE:

\documentclass[twocolumn,draft]{article} % For reference, I'm actually using the ieee document class, but this also reproduces the problem.
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage[backend=biber]{biblatex}
\title{\LARGE \bf
LadiDadi}


% \author{Steve Heim}
\begin{document}


\emph{Curabitur pulvinar, ex vitae congue pharetra, nibh turpis lacinia tellus, ac viverra risus ligula et odio. Vivamus non velit ut est fringilla auctor nec nec nibh. Curabitur condimentum nulla vel dolor facilisis, ut condimentum justo lobortis. In molestie odio a ex vehicula bibendum. Vivamus at arcu massa. Curabitur tempor mollis euismod. Mauris in urna ornare, malesuada tortor quis, fermentum erat. Donec vitae pellentesque ante. Integer pulvinar massa sed neque fringilla aliquam. Donec auctor, dui et vestibulum egestas, ligula ex semper augue, a vulputate mauris quam in sapien. Vivamus interdum massa non placerat varius. Proin nec turpis vel neque imperdiet porttitor id eget nunc.} \newpage

\begin{figure}[!t]
    \centering
    \text{ \medskip This Title is done in Latex}\par\medskip
    \includegraphics[width=0.95\columnwidth]{graphics/policiyGauss.pdf}
    \caption{The title is not part of the image, and is not aligned properly. Instead it sticks out a little higher (compare with text in other column) }
    \label{fig:controllers}
\end{figure}
\emph{Proin in purus libero. Aenean tempus enim at quam sagittis efficitur.
Curabitur pulvinar, ex vitae congue pharetra, nibh turpis lacinia tellus, ac viverra risus ligula et odio. Vivamus non velit ut est fringilla auctor nec nec nibh. Curabitur condimentum nulla vel dolor facilisis, ut condimentum justo lobortis. In molestie odio a ex vehicula bibendum. Vivamus at arcu massa. Curabitur tempor mollis euismod. Mauris in urna ornare, malesuada tortor quis, fermentum erat. Donec vitae pellentesque ante. Integer pulvinar massa sed neque fringilla aliquam. Donec auctor, dui et vestibulum egestas, ligula ex semper augue, a vulputate mauris quam in sapien. Vivamus interdum massa non placerat varius. Proin nec turpis vel neque imperdiet porttitor id eget nunc.}
\end{document}

在此处输入图片描述

答案1

在将浮动框添加到页面时,我们并不知道浮动框的内部结构,而在对浮动框进行排版时,我们并不知道它是否会出现在页面的顶部。

它设置在页面边界内,但第一行文本的基线在这种情况下高于正文的基线。我只需做一些事情,例如

\begin{figure}[tp]
    \centering

\smallskip

    This Title is done in Latex

请注意,\text您的示例中的本质上就是\mbox这样的,其效果是停止\medskip添加任何空格。

我将[!t]其改为[tp]您不应该经常使用!(它用于在特殊场合覆盖默认值)并且不会p大大增加浮动到文档末尾的机会)但这种改变不会影响这里的垂直间距。

在此处输入图片描述

相关内容