On 29 July 2010 21:58, Alex Leith <[email protected]> wrote: > Hi > > I am using LyX 1.6.6.1 on OSX and I have an issue where I can't insert a > pdf image (loaded as a "file" "external material") into an image float. If I > place it as a stand alone object, outside an image float the document > compiles fine. But, if I place it inside an image float LyX complains with > an error in a later paragraph. > > I just noticed that if I view source, the outside pdf give this: > > % Preview source code for paragraph 75 > > > \includepdf[pages=-]{/Users/alex/Dropbox/Honours/Documents/Thesis/Images/percent_pop_change_hob} > > > whereas the inside image float pddf gives this: > > > % Preview source code for paragraph 75 > % > > \begin{figure} > > \includepdf[pages=-]{Images/percent_pop_change_hob} > > \caption{Population change in the Greater Hobart region between 2001 and > 2006 > > (image source: \citep{statistics2006hobart})} > > \end{figure} > > Note the relative path in the second bit. Why would this cause a problem > though? > > The relative path is not the problem.
The pdfpages package (which provides \includepdf) is used when inserting external material. That package basically outputs directly into the PDF output file with some transformations. It is usually used to import many pages from other documents for appendices or similar tasks. It cannot be used in a float, since that would mean LaTeX would need to change the typesetting by itself to displace it where it ends up. If you want to put a PDF figure in a float, simply use the "Insert:Graphics" menu in the float as usual (like you would do for PNG or JPEG images) and choose your PDF file. Best regards, Tennessee Carmel-Veilleux, EIT Electrical engineering masters student, ETS (http://www.etsmtl.ca) Project AREXIMAS (http://areximas.etsmtl.ca)
