# Including Xfig figures with LaTeX formulas into Lyx documents

I want to include in a Lyx document an Xfig figure with some LaTeX formulas. Following this guide I can do this in ordinary .tex documents: I export my Xfig figure as a "Combined PDF/LaTeX (both parts)" file and I simply include it in the .tex document with the \input{file_name.pdf_t} command. So far so good! Anyway, when I try to do this same thing in my Lyx document (both writing explicitly the \input{ } command and through the Insert->File->Child_Document menu) I get the following error:

\includegraphics {file_name.pdf}% The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

So, does someone now how to fix this? How can I include my figures with latex equations into Lyx?

• i'm not a lyx user, but it's not "permitted" to \input a pdf file directly into a latex document. the \includegraphics command as cited in the error message is the proper method. Feb 27, 2014 at 13:55
• Hi! Well, in fact, the argument of \input, file_name.pdf_t, is not a .pdf but an ordinary text file. To be more precise, file_name.pdf_t is a .tex file of the form \begin{figures} ... \includegraphics{file_name.pdf} ... \end{figures}`, which tells latex to take the (real) .pdf file, file_name.pdf (without equations), and display on it some latex equations..! Feb 27, 2014 at 14:08