zoukankan      html  css  js  c++  java
  • Package pdftex.def Error: PDF mode expected, but DVI mode detected!


    本系列文章由 @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)。

  • 相关阅读:
    AcRxClass::addX
    string.format("%s",name)
    strcmp 与 _tcscmp
    acedinitget
    判断实体的类型 相关操作
    accmcolor
    CAD类型转换
    图的存储结构及遍历
    并查集(Union/Find)
    设计模式--缺醒适配器模式
  • 原文地址:https://www.cnblogs.com/hehehaha/p/6332126.html
Copyright © 2011-2022 走看看