General ⇒ Package pdftex.def Error
-
- Posts: 2
- Joined: Tue Apr 12, 2011 11:11 am
Package pdftex.def Error
For a very long time, I've been trying to get rid of an really annoying error. I have downloaded a nice looking template, where some elements are build up on the package pstricks. The issue is, that i want the output to be PDF. My editor is Texmaker, an when i run the LaTeX, i get the error message:
! Package pdftex.def Error: PDF mode expected, but DVI mode detected!
(pdftex.def) If you are using `latex', then call `pdflatex'.
(pdftex.def) Otherwise check and correct the driver options.
(pdftex.def) Error recovery by switching to PDF mode.
If I then run the pdflatex instead, it runs with the error saying:
! LaTeX Error: You have run the document with pdflatex, but PSTricks
requires latex->dvips->ps2pdf or alternatively the use
of the package `auto-pst-pdf'. Then you can run
`pdflatex -shell-escape <file>' (TeX Live)
How can i get rid of the error.
Best regards,
Andreas
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Package pdftex.def Error
I just got the same error. I am not sure if this might be the reason, but I installed the 64bit version of Miktex 2.9. On another computer I still have the 32bit version and the same project does not lead to an error.
Regards
Peter
Re: Package pdftex.def Error
In my case the problem is somewhere in between the versions 2.8 and 2.9 of miktex - it had nothing to do with the bit-version.
In particular the error disappeared when I removed the following inlcusion line:
\usepackage{pst-all}
which apparently is ment to be used when compiling to ps. Miktex version 2.8 was OK with including this package, but 2.9 doesn't like it...
Regards
Peter