Solution for Latex error: "Cannot determine size of graphic"
I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this error: "Cannot determine size of graphic"
My graphic is exported from PowerPoint, so I have tried both .pdf and .png. I get the same errors for both.
Sample code:
\begin{figure}[htb]
\begin{center}
\leavevmode
\includegraphics[width=0.8\textwidth]{graph.png}
\end{center}
\end{figure}
Error:

Answers:
The DVI producing latex doesn't support reading the size of PNG, JPG or PDF images. You need to use pdflatex for this.
Actually latex is pdflatex in DVI mode in modern distributions, but it can read the sizes only in PDF mode for some reason.
You are however able to state the natural size of the images using natwidth and natheight which will make latex compile without error.
The produced DVI file will only link to the PDF and the DVI-to-PDF converter will need to include it in the final PDF.
AFAIK dvpdf doesn't support this but dvipdfm does.
Do it like the picture's method:

Solution for Latex error: "Cannot determine size of graphic"的更多相关文章
- Latex Error cannot determine the size of graphic 报错的解决的方法
Latex Error cannot determine the size of graphic 报错的解决的方法 插入jpg文件老是会报错... 追究了半天,原来是编译的命令又问题,不应该使用 la ...
- Solution for latex error:”Unknown graphics extension: .eps“ or "Can not find XXX"
Sample code: \begin{figure*} \centering % Requires \usepackage{graphicx} \includegraphics[width=7in] ...
- Selenium2学习-041-chromedriver:org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status from unexpected alert open
今天在写WebDriver处理弹出框(alert.confirm.prompt)演示实例脚本分发给朋友时,在其执行时未能成功执行,对应的部分错误详情如下: org.openqa.selenium.We ...
- Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D
Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...
- ERROR Cannot determine the location of the VS Common Tools Folder
参考:ERROR Cannot determine the location of the VS Common Tools Folder http://blog.csdn.net/m3728975 ...
- Fatal error: Allowed memory size of 8388608 bytes exhausted
这两天安装bugfree,更换了一个数据量较大的库,结果打开bug详情页要么是空白页,要么就报如题的错误,错误信息还包括C:\wamp\www\bugfree\Include\Class\ADOLit ...
- [问题解决] LaTex Error:Unknown graphics extension:.eps
错误:编译的时候显示:“!LaTex Error:Unknown graphics extension:.eps” 发生场景:Latex写论文 解决方案: latex eps.texdvi2ps ep ...
- nuxt npm run dev 报错Solution to the "Error: listen EADDRINUSE 127.0.0.1:8080"
Solution to the "Error: listen EADDRINUSE 127.0.0.1:8080" Hello, Just sharing a solution t ...
- *** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
*** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED 在软件已经执行破解仍然出现,是因为工程是破解前建立的,要先执行 ...
随机推荐
- smarty foreach 最全用法
<?php$search_condition = "where name like '$foo%' ";$sql = 'select contact_id, name, ni ...
- 关于NGUI中的自适应和对齐机制
原地址:http://blog.sina.com.cn/s/blog_62df69790101gy7t.html 1 关于美术效果图 美术出效果图总是基于某个固定尺寸.移动设备的分辨率却有太多不同的方 ...
- 正确使用STL-MAP中Erase函数
一切尽在代码中. #include <iostream> #include <map> #include <string> using namespace std ...
- android dialog 原来dialog对话框也有自己的按键监听事件 onKeyDown方法
探讨在一个activity中按menu键时弹出自己定义的dialog(自定义菜单对话框)时,再按一次手机的menu键发现这个自定义的dialog菜单并没有关闭,原来是这个dialog内部也有onKey ...
- Top命令内存占用剖析
原文: http://yalung929.blog.163.com/blog/static/203898225201212981731971/ 引 言: top命令作为Linux下最常用的性能分析工具 ...
- 李洪强iOS开发之宏定义方法来初始化一个单例对象
单例的使用: .m 为了方便实用,只要将以下代码定义在header文件或者.pch文件即可: // .h #define singleton_interface(class) + (instancet ...
- Qt之高级网络操作(HTTP/FTP快速上手)Qt之QHttpPart和QHttpMultiPart
http://blog.csdn.net/u011012932/article/details/52535755 http://blog.csdn.net/u011012932/article/det ...
- *JRebel 热部署
Jrebel是一套商业Java开发软件,可快速实现热部署,节省大量重启时间,提高开发效率. 去IDEA的插件官网下载插件:http://plugins.jetbrains.com/plugin/444 ...
- centos安装异常解决方法
VMware系统安装Centos7后,第一次启动出现以下异常信息: Initial setup of CentOS Linux (core) ) [x] Creat user ) [!] Licens ...
- JavaScript定时器详解及实例
JS里设定延时: 使用SetInterval和设定延时函数setTimeout 很类似.setTimeout 运用在延迟一段时间,再进行某项操作. setTimeout("function& ...