Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a thesys Using LyX, it worked fine up to now. I need to insert a PDF of 4 pages in Appendix, so I looked for a solution. Here in StackOverflow I found a possible solution, using a pdfpages package and a command to add the file. Unfortunately this solution doesn't work, lyx reports the following error: !pdfTeX error: pdflatex (file test.pdf): cannot find image file

I package is correctly declared in preample, file test.pdf is in the same folder of my thesys files. I tried to substitute the file with a 1 page PDF, and change \includepdf{test.pdf} with \includepdf{test} and \includepdf{./test.pdf}. The resulting error is always the same :-(

Is there a solution? Is it really possible importing a PDF in LyX? Thanks in advance

share|improve this question
add comment

migrated from stackoverflow.com Mar 7 '12 at 13:20

This question came from our site for professional and enthusiast programmers.

1 Answer

I would suggest undoing your changes to the preamble and going to

Insert -> File -> External Material

Then under Template change to "PDF pages" then use browse to find your pdf.

I agree with the above statement because I followed it with success, but in order to insert more than one page like you said that you have under the description in the "PDF pages" if you want all of the pages you need to go to the "LaTeX and LYX Options" tab and in the options bar paste "pages=-". You should also remember that whenever you edit the preamble, you need to immediately go to Tools -> Reconfigure then restart the program in order for the changes to apply, otherwise your problems will not go away. After that, while I don't know how you have your line in the Appendix section set-up, but I used the "standard" set-up; I have not experimented further, but I don't see how the other set-ups would make a difference.

I hope this helps, I wish you luck.

share|improve this answer
    
Really tnaks Xu Wang for your help, now my appendix.Lyx file loads the PDF correctly. However, when I try to launch view - PDF (pdflatex) from the main file, thesys.lyx, it returns this error: Latex error: option clash in package graphicX I checked in the thesys.lyx preample wheter the package pdfpages was present, but it seems ok. If I exclude appendix.lyx from files loaded by thesys.lyx, View - PDF (pdflatex) loads it correctly (obviouslly without appendix). Why this wrong behavior? –  user900978 Mar 7 '12 at 13:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.