# LYX : import blank file.lyx with a preamble

I have some problems using LyX.

So I have a blank custom cover page but I use the preamble to put some LaTeX code and do my stuff (write text, import picture, title, author, etc.). I have my `main.lyx` where I include my blank cover page.

So if I use the preview from the cover page I can the all the thing that I have done in the preamble but if I try the preview from `main.lyx` I get the error message:

Lyx : Output is Empty

No output file was generated.

I am a bit lost. Do I need to put the preamble in my `main.lyx`?

• I don't think there's currently a way to share preambles between .lyx files like you are trying. You can put the code into a .tex file and then in each .lyx file you can do e.g. `input{file.tex}`. Or you can put your code into a LyX module (see Help > Customization for this). – scottkosty Jun 20 '18 at 21:26
• Thanks you very much for your answer, i have test it and it work well – clement Jun 21 '18 at 6:41

I don't think there's currently a way to share preambles between .lyx files like you are trying (the closest thing is this request. You can put the code into a .tex file, and then in each .lyx file you can do e.g. `\input{file.tex}`. Or you can put your code into a LyX module (see Help > Customization for this).