latex中插入图片的一个备忘

来源:互联网 发布:淘宝商城分销平台 编辑:程序博客网 时间:2024/04/26 14:25

1:今天写latex要插入一个png,之前明明使用类似这种就没问题的:

\begin{figure}
 \centering
  \includegraphics[width=\textwidth]{lstm.png}
\end{figure}


当然必须要有:\usepackage{graphicx} 。总是报错:cannot determine size of graphics in  lstm.png(no Bounding Box)


2:上网搜索了很多方法,先开始是用>bmeps -c lstm.png lstm.eps,转换成eps,转换成功后,使用latex-div 然后来查看发现pes所在位置上面很多空白。

3:最后不知道在哪找到了个方法 直接用这个解决:


 \begin{figure}[htb]
 \centering
  \includegraphics[width=\textwidth]{lstm}
\end{figure}


多了一个htb

0 0