Eli Brosh wrote:
I am trying to  include a pdf file in a LyX document.
I have the TeX-Live package installed in my computer. If I understand
correctly, it includes pdfpages.

I put the phrase "\usepackage{pdfpages}" in the LateX preamble for the
Afterwards, I wrote in ERT: \includepdf[pages=1-11]{filename.pdf}
The filename.pdf is saved in the same folder as the LyX document.

Now, when I try to view the document as dvi, I get the error message:
Package pdfpages Error:You produce DVI output but pdf output
Undefined control sequence.
Missing $ inserted
Extra }, or forgotten $.
Missing $ inserted.

When I try to produce a pdf output, I get the error message:
LyX: Cannot view file
File does not exist:

What is wrong ?
Is there an easy way to insert the pdf file into the LyX document ?
Please, try to give a simple and specific answer as I am new to LyX, as well
as to LaTeX .
I use Ubuntu Feisty (quite new to linux as well).


You might try putting an absolute path to the PDF file in the ERT entry.

Also, as far as I know, only pdflatex works with pdfpages. When I try to view DVI, I get no error message, but the DVI file has blank pages where the inserted pages should go. That in turn means that dvipdfm does the same thing trying to produce PDF output. I also get blank pages with ps2pdf.


Reply via email to