How to include PNG file in LaTeX

在LaTeX中,如果直接写:
\usepackage{graphicx}
\begin{document}
\begin{figure}
\includegraphics{test.png}
\end{figure}
\end{document}
这样就会出问题 一般是:

! LaTex Error: File ‘test.bb’ not found.
而用PdfLaTeX就没有问题 为什么呢?今天终于搞清楚了。因为png,jpg不同于eps,点阵图形里面没有包涵boundary信息,所以LaTeX没法确定边界于是就出错了。解决的方法是:
1.

\usepackage[pdftex]{graphicx}


2. 先执行一下ebb命令定好bb值

是以为记

Share and Enjoy:
  • Digg
  • del.icio.us
  • Slashdot
  • E-mail this story to a friend!
  • Facebook
  • Google
  • Live
  • MySpace
  • Technorati
  • TwitThis

No Comment

No comments yet

Leave a reply


为了防止恶意的垃圾评论脚本,请输入以下图片里面的数学方程式的答案。
防垃圾评论问题