2
\documentclass{book}
\usepackage{graphicx}
\usepackage{epstopdf}
\begin{document}
\includegraphics*[50pt,500pt][400pt,750pt]{figs/ch3/pda_anbn.eps}
\end{document}

Error says the \includegraphics line is undefined. I'm using Miktex 2.9.

Specifically the error message is "! Undefined control sequence.<argument> ...onverted-to.pdf image\GPT@AttrShort\ifx \GPT@print \ltx@empty... ...500pt][400pt,750pt]{figs/ch3/pda_anbn.eps}".

Note: I see the pdf is being generated, in the same folder, from the eps. So epstopdf is working. Could it be something wrong with the includegraphics syntax?

9
  • I removed the two optional arguments, then there were no errors. Can someone suggest a way to make it work with the args? Mar 23, 2015 at 1:42
  • Well, \includegraphics can't take that many arguments. Or arguments in that form. What are you trying to do exactly?
    – cfr
    Mar 23, 2015 at 2:04
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – cfr
    Mar 23, 2015 at 2:04
  • @cfr,I'm pretty sure \includegraphics can. See graphics. I have this original doc that uses that syntax and it works. I'm converting it to use the epstopdf and graphicx packages. graphicx manual says it should be backwards compatible with that syntax, but that could be wrong. Mar 23, 2015 at 2:11
  • 1
    It looks like a bug in the pdftex driver as it doesn't even work with graphics. So you should contact @HeikoOberdiek. On the other side: It doesn't make much sense to load graphicx and not to use its syntax and its extended capabilities. Mar 23, 2015 at 8:34

1 Answer 1

3

pdfTeX consists of TeX and the driver part, which produces PDF. Therefore it is able to detect the bounding/media boxes of the included image files. A manual specifying of the bounding box does not make much sense:

  • The user would have to determine the bounding box values. What's the bounding box of a PNG file? What is the bounding box of the fifth page of a ten page PDF file?

  • What's the bounding box, if the image file was given without extension and there are several choices with different internal bounding boxes?

  • What happens, if the image file changes. Who updates the bounding box data in the TeX file?

  • How to deal with rounding errors?

  • What is the interpretation of a user "lie", if the specified bounding box differs from the actual bounding box?

Therefore the driver pdftex.def does not support the manual specification of the bounding box, because it is not needed. If the user wants to have a portion of the image, there are options viewport and trim to specify this wish in a cleaner way. Option bb is treated as viewport with a warning.

Nevertheless the actual error of the two optional argument form of \includegraphics is a bug. A fix will have to replace it by a better error message or by a similar behavior as option bb. (I have not yet analyzed the internals.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .