Closed GoogleCodeExporter closed 9 years ago
Ah, yes. I think this means that your document class needs to explicitly say
"dvips" in
its options. If not, let me know, and I'll fiddle with it.
Original comment by shiblon
on 15 Nov 2009 at 4:38
Try this, also:
Create a Makefile.ini file with the following line:
LATEX := latex -output-format dvi
If that doesn't work, change "latex" to "pdftex" and let me know what happens.
Original comment by shiblon
on 15 Nov 2009 at 4:42
Incidentally, I think that issue 17 is related to this one. Are you using
hyperref by any
chance? If so, you need to specify the ps2pdf option to make it compatible
with the
makefile.
Original comment by shiblon
on 19 Nov 2009 at 7:04
Hi, Yes I'm using hyperref. I did resolve the problem by changing the ?= latex
line
in the makefile to pdflatex. I did test the suggestions you proposed in comment2
without success. Hence pdflatex is now the default compiler in my Makefile.
Thanks
Original comment by uduo...@gmail.com
on 19 Nov 2009 at 8:46
Be aware that changing the compiler name to pdflatex is not going to work for
you
with this makefile. Here's how you fix this:
- change the ?= line back to latex
(by the way, don't change ?= lines in the makefile since they can be overridden in
your own Makefile.ini instead)
- change your hyperref package to include "ps2pdf" as one of the options, e.g.
\usepackage[ps2pdf]{hyperref}
Everything should work after that. "latex" is just a link to "pdflatex" on
many
systems, but it knows how it's invoked (via argv[0]) and changes options in
important
ways when it is run as "latex" vs. "pdflatex". The makefile only works with a
dvi-
>ps->pdf translation, so changing to pdflatex is definitely going to break
stuff
unless you explicitly tell it to change the output format as described above.
In short, I think this entire issue boils down to the missing "ps2pdf" option
in the
hyperref package. Fix that and everything should work fine.
Original comment by shiblon
on 19 Nov 2009 at 8:53
[deleted comment]
changing the option in hyperref to ps2pdf and changing the LATEX ?= pdflatex
line
back to LATEX ?= latex yeilds the same errors.
! 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.
make: *** [uduthesis.dvi] Error 1
! 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.
make: *** [uduthesis.dvi] Error 1
and won't compile. strange when i change it back to pdflatex, everything
compiles OK.
Also, pdflatex works well with both ps2pdf and pdflatex option in hyperref.
I've attached the log and the abridged tex source showing the preamble of the
document for your perusal.(rename texfile.tex > uduthesis.tex)
Original comment by uduo...@gmail.com
on 20 Nov 2009 at 1:12
Attachments:
Wow, I'm totally baffled, but gratified that you got it working for you.
So, again, I would suggest that you *not* edit the makefile directly, since
then you'll
have to be super careful if you ever update it. Instead, create a file called
"Makefile.ini" in the same directory, and put the following line in it:
LATEX := pdflatex
The ?= construct in the makefile means "set this if it hasn't already been set
outside",
and it will include your Makefile.ini in the right way, allowing you to do
these kinds of
overrides safely, while not having to worry about patching every new version of
the
makefile as it comes down.
Best wishes, and I'm glad you got it working.
Original comment by shiblon
on 20 Nov 2009 at 2:49
BTW, I uploaded r26679dd06711 which changes the default build strategy to
pdflatex.
HTH. Marking fixed - if it works, grand.
You can get the pdflatex version 2.2.0-alpha1 from the downloads page if you
want to
give it a spin. It probably has bugs.
Original comment by shiblon
on 9 Mar 2010 at 8:24
The same error occurs for me,
! 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.
but when I comment \usepackage{graphicx} latex command works fine, but pdflatex
command works fine without commenting \usepackage{graphicx}.
I am using the latest version of texlive in ubuntu 10.10 and I use texmaker as
the tex editor if it helps!
I need to generate a post script file and a dvi with Images
please help me!
Original comment by Rusiru.B...@gmail.com
on 10 Jan 2011 at 6:01
Original issue reported on code.google.com by
uduo...@gmail.com
on 14 Nov 2009 at 5:01Attachments: