4
  1. I have this error when I try to do a 4x4 subplot. I have done many such subplots and I never had an error. It works fine for the subplot before this but the one I am doing now produces this error. Everything looks fine, I do not think there is an error in the figure environment at all! Any idea? When I try to compile the file, I have this error and no pdf is produced!

UPDATE: HERE IS THE PIECE OF CODE THAT GENERATES THE PROBLEM. Does anybody know the reason?

\begin{figure}
\centering
\subfloat[][\emph.]
{\includegraphics[width=.4\textwidth]{IdarkResponsivitythicknessLe1310b}} \quad
\subfloat[][\emph.]
{\includegraphics[width=.4\textwidth]{IdarkResponsivitythicknessLe1550bigfiber}}\quad
\subfloat[][\emph.]
{\includegraphics[width=.4\textwidth]{IdarkResponsivitythicknessLh1310b}} \quad
\subfloat[][\emph.]
{\includegraphics[width=.4\textwidth]{IdarkResponsivitythicknessLh1550bigfiber}} 

\caption{Idark.}
\label{SRtLeLh13101550}
\end{figure}
cfr
  • 198,882
Naema
  • 2,305
  • Kick out any drivers you expplicitly set like pdftex or dvips and LaTeX do its work ;-) – Johannes_B Nov 28 '14 at 17:59
  • but it works for the subplots just before the one that produces the error!! – Naema Nov 28 '14 at 18:01
  • If it does not work for a particular element, there is something different. We cannot know what it is, since we don't have acces to your machine and code. Please try to prepare a minimal working example that lets us reproduce and understand the beaviour and test possible solutions. Right now, i don't even know what you mean by subplots. – Johannes_B Nov 28 '14 at 18:04
  • I mean subfloat to produce many images in one figure – Naema Nov 28 '14 at 18:21

1 Answers1

5

This warning is thrown at package loading time of package epstopdf-base (which is loaded by package epstopdf):

\begingroup
  \def\x{pdftex.def}%
  \ifx\Gin@driver\x
  \else
    \@PackageWarningNoLine{epstopdf}{%
      Drivers other than `pdftex.def' are not supported%
    }%
    \endgroup
    \newcommand*{\epstopdfsetup}[1]{}%
    \expandafter\ETE@AtEnd
  \fi%
\endgroup

The latest time for a package to be loaded is inside \begin{document}, which finishes the LaTeX preamble. Therefore any code afterwards does not matter.

If you are not using pdfTeX (or LuaTeX) in PDF mode, then the package epstopdf is not of much use. For example, dvips can include EPS files directly, but do not know to handle PDF files. Also the methods of running external converters is quite different, they are run by the driver dvips, not inside the LaTeX job.

With other drivers than pdfTeX, the warning can either be ignored, because the automatic ending of the package would be the right thing. Also the only command \epstopdfsetup is redefined to ignore its argument.

Or a check for pdfTeX in PDF mode can be added:

\usepackage{ifpdf}
\ifpdf
  \usepackage{epstopdf}
\fi

If the TeX document depends on a different driver than pdfTeX, perhaps because the document uses packages like pstricks, then the loading of epstopdf can be removed.

Not too old TeX distributions TeX Live or MiKTeX come with configuration file graphics.cfg for package graphicx, which loads epstopdf(-base) automatically, but only if pdfTeX in PDF mode is detected and the needed shell escape feature is enabled.

Heiko Oberdiek
  • 271,626