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 在软件已经执行破解仍然出现,是因为工程是破解前建立的,要先执行 ...
随机推荐
- uva 10986
ford 超时 使用优先队列的Dijkstra 算法 //#include <cstdio> //#include <cstring> //#include <algo ...
- openssl安装问题导致nginx添加ssl模块失败
问题:./nginx: undefined symbol: EVP_rc4_hmac_md5 sudo vi /etc/ld.so.conf #把openssl安装路径加入sudo ldconfig ...
- CSU1327+贪心+模拟
题意简单,中文题目 方法:对于一个数 从左往右找相同的数 ,有就改变靠右的,同时把该数的右边全置0 注意!!!!n<0!!! /* */ #include<algorithm> #i ...
- HDU4628+状态压缩DP
/* 状态压缩DP dp[ i ]:达到i状态的最小step. 题意:每次可以去掉一个回文串,求最少几步能取完. */ #include<stdio.h> #include<stri ...
- Qt4.6.2已编译二进制版本在VS2005中的问题
结论1:如果你想把Qt4.6.2安装在VS2005中,又不想花时间编译,请下载和安装qt-win-opensource-4.6.2-vs2008,并单独编译“QT安装路径/src/winmain/” ...
- windows8.1下安装.NET Framework 3.5
今天安装Arcgis10.2提示需要安装.NET Framework 3.5.校园网的网速,你懂的.所以,在线安装不太现实. 在线安装方法: 如何在 Windows 8 上安装 .NET Framew ...
- 【转】五种开源协议的比较(BSD, Apache, GPL, LGPL, MIT)
当 Adobe.Microsoft.Sun 等一系列巨头开始表现出对”开源”的青睐时,”开源”的时代即将到来! 现今存在的开源协议很多,而经过 Open Source Initiative 组织通过批 ...
- NuGet相关的文章
NuGet学习笔记(1)——初识NuGet及快速安装使用http://www.cnblogs.com/zhwl/p/3377510.html NuGet学习笔记(2) 使用图形化界面打包自己的类库ht ...
- 同步or异步
一.什么是同步?什么是异步? 同步:如果有多个任务要执行,这些任务必须逐个执行,一个任务的执行会导致整个流程的暂时等待,这些任务没有办法并发地执行: 异步:如果有多个任务要执行,这些任务可以并发执行, ...
- 使用PHP处理POST上传时$_FILES数组为何为空
在做一个简单的表单上传测试时,服务端的php脚本中,$_FILES数组为空;这样就不能获取从浏览器上传的信息.什么原因呢? 通过Google,找到下面这个web: php上传文件$_FILES数组为空 ...