转自:https://www.cnblogs.com/billowsand/p/4420514.html
http://blog.sina.com.cn/s/blog_47737c900101j2tf.html
\begin{figure}[placement]
body of the figure
\caption{figure title}
\end{figure}
Figures are objects that are not part of the normal text, and are usually “floated” to a convenient place, like the top of a page. Figures will not be split between two pages.
The optional argument [placement] determines where LaTeX will try to place your figure. There are four places where LaTeX can possibly put a float:
h Here - at the position in the text where the figure environment appears.
t Top - at the top of a text page.
b Bottom - at the bottom of a text page.
p Page of floats - on a separate float page, which is a page containing no text, only floats.
The standard report and article styles use the default placement tbp.
The body of the figure is made up of whatever text, LaTeX commands, etc., you wish. The\caption command allows you to title your figure.
在Latex的使用过程中,很多人需要载入一些具有一定白边或者边框的图片。特别是用matlab生成的很多图片。大部分人的做法是通过使用pdf工具去裁减。这样做很麻烦,并且对于一些批量的,大小相同的图片而言,就更加麻烦。在这里,可以直接使用Latex的图片裁减功能,方便实用。
示例
\includegraphics[width=0.5\textwidth,trim=50 50 50 50,clip]{figures/logo.pdf}
在此示例中,width制定了图片的缩放比例,trim指定了需要在上下左右裁去的图片宽度,clip表示不显示采取的图片。
特别地, 使用“trim”命令,不如在pdf文件中直接裁剪好控制尺寸。