本系列文章由 @yhl_leo 出品,转载请注明出处。

文章链接: http://blog.csdn.net/yhl_leo/article/details/51646781


在如下使用LaTeX编译下面的文件类型:

\documentclass[journal,article,pdftex,10pt,a4paper]{IEEEtran}

出现如标题所示的Error:

Package pdftex.def Error: PDF mode expected, but DVI mode detected!(pdftex.def) If you are using `latex', then call `pdflatex'. }\@ehc

大概是因为latexpdflatex编译的差异,使用latex模式,并不能编译后者,查阅相关文档说明:

The option pdftex is for use with pdfLaTeX. If eps figure are used, remove the option pdftex and use LaTeX and dvi2pdf.

也就是说,在使用eps(内嵌式PostScript)的图片文档时,应该选用latex模式,而使用pdftex时就会出问题(解决办法可以尝试把pdftex删掉)。

另外看到网友,在如下用法下也会出现同样的问题:

\usepackage[pdftex]{graphicx}

解决办法是,把[pdftex]移除掉,graphicx包就能正常编译,而在pdftex模式下,最好把.eps文件转为.pdf格式文件。

如果使用例如\includegraphics{file}这样的命令加载显示图片文件时,前面提到的两种模式都会自动补全文件file的拓展名,latex模式会补为file.eps, 而pdftex则会补全为file.pdf(或者file.png, file.jpg)。

Package pdftex.def Error: PDF mode expected, but DVI mode detected!的更多相关文章

  1. Transaction check error: file /etc/rpm/macros.ghc-srpm from install of redhat-rpm-config-9.1.0-80.el7.centos.noarch conflicts with file from package epel-release-6-8.noarch Error Summary ----------

    ./certbot-auto certonly 报错: Transaction check error:   file /etc/rpm/macros.ghc-srpm from install of ...

  2. NuGet Install-Package报错解决Package Manager Console error - PowerShell version 2.0 is not supported. Please upgrade PowerShell to 3.0 or greater and restart Visual Studio.

    问题: Package Manager Console error - PowerShell version 2.0 is not supported. Please upgrade PowerShe ...

  3. Centos6版本使用yum报错 Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfi Setting up Install Process No package gcc available. Error: Nothing to do

    在使用Centos6版本yum时报错 Loaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds ...

  4. 【CentOS6.5】安装nginx报错:No package nginx available. Error: Nothing to do

    今天在给centos6.5安装nginx时候,提示报错No package nginx available. Error: Nothing to do, 后来百度一下,说缺少EPEL(epel是社区强 ...

  5. yum -y install pip No package pip available. Error: Nothing to do

    centos下安装pip时失败: [root@wfm ~]# yum -y install pipLoaded plugins: fastestmirror, refresh-packagekit, ...

  6. CentOS 7中安装 MySQL 出现了 No package mysql-server available. Error: Nothing to do 错误

     CentOS 7 安装 mysql-server 爬坑  发现问题 在centos 6安装 mysql-server是直接使用命令 yum -y install mysql-server ,但是在C ...

  7. tensorflow报错error,tf.concat Expected int32, got list containing Tensors of type '_Message' instead

    参考:https://stackoverflow.com/questions/41813665/tensorflow-slim-typeerror-expected-int32-got-list-co ...

  8. ios 微博登录 21338错误 sso package or sign error

    os中,是你项目的bundle id 和 连接的微博开发账户里面的bundle id 不一致造成的. 特别是,你把你注册的appKey放到你下载的官方的demo里面测试,肯定会出现这种情况, 所以,你 ...

  9. FastCGI sent in stderr: "PHP Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in

    2018-4-16 17:59:03 星期一 1. 发送带有xml参数的请求时如果是用php curl, 需要将数组形式的post data 用 http_build_query() 转换 2. 接收 ...

随机推荐

  1. 洛谷 P3398 仓鼠找sugar —— 树链剖分

    题目:https://www.luogu.org/problemnew/show/P3398 树链剖分一下,路径就变成线段树上的几个区间: 两条路径相交就是线段树上有区间相交,所以在相应位置打个标记, ...

  2. Kconfig详解-文件的基本要素 ***

    当执行make menuconfig时会出现内核的配置界面,所有配置工具都是通过读取"arch/$(ARCH)Kconfig"文件来生成配置界面,这个文件就是所有配置的总入口,它会 ...

  3. bzoj2073

    状压dp 预处理每个状态的初始值,枚举子集就行了 #include<bits/stdc++.h> using namespace std; , inf = ; int W, n; < ...

  4. MSP430:中断简介

    (5).中断应用程序举例(外部中断): void interrupt_initial() { P1DIR&=~BIT7;      //P1.7为输入 P1IE|=0x80;      //P ...

  5. Linux 用户管理(1) (/etc/passwd)

    Linux所有的用户都在/etc/passwd文件里面. 1.为什么需要用户 1)计算机及网络资源的合理分配  2)可以控制用户访问系统的权限.3)身份认证 4) 进程 以某个用户的身份来运行 2.用 ...

  6. [Swift通天遁地]九、拔剑吧-(15)搭建具有滑出、视差、3D变形等切换效果的引导页

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...

  7. xfs文件备份恢复篇一vm中linux新增磁盘

    XFS提供了 xfsdump 和 xfsrestore 工具协助备份XFS文件系统中的数据.xfsdump 按inode顺序备份一个XFS文件系统.centos7选择xfs格式作为默认文件系统,而且不 ...

  8. day03_12/13/2016_bean属性的设置之构造器方式注入

  9. [ NOIP 2002 ] TG

    \(\\\) \(\#A\) 均分纸牌 有\(N\)堆纸牌,每堆有若干张,但纸牌总数必为\(N\)的倍数.可以在任一堆上取若干张纸牌,然后移动给其左右任意一侧的纸牌堆,求将所有的牌堆牌数都变为平均值最 ...

  10. 使用WindowBuilder设计Swing程序

    Swing程序表示Java的客户端窗体程序,除了通过手动编写代码的方式设计Swing程序之外,Eclipse中还提供了一种WindowBuilder工具,该工具是一种非常好用的Swing可视化开发工具 ...