Friday, July 9, 2010

A problem and a solution using elsarticle.cls



I tried to resubmit one of my revised article to the Elsevier's Editorial Team and the following error occurred which hindered me to resubmit it:

---------------------------
Package pdftex.def Error: pdfmode expected, but DVI mode detected!
(pdftex.def) If you are using 'latex', then call pdflatex'.
(pdftex.def) Otherwise check and correct the driver option. Error
recovery mode by switching to PDF mode.
See the pdftex.def package documentation for explanation.
---------------------------

This error was really annoying, since the deadline was very close...

Fortunately, after some hours inspection, I found that the cause of the error was that the 'pdftex' module was changed in the editorial system. The new version of 'pdftex' now tries to detect if the pdf mode is set correctly in the document. (I didn't bother about it before as everything was fine.)

In other to help 'pdftex' in the decision (it believed that I wanted to use DVI mode but I didn't) I put the '\pdfoutput=1' line just before the document class definition:

---------------------------
\pdfoutput=1
\documentclass[pdftex,preprint,number,12pt]{elsarticle}
---------------------------

So now, everything goes fine as previously.