# Issue with inserting a custom cover page

I am a beginner of latex and I use lyx as my tool. I finished my document with Lyx and found a cover page template from here(the first template in the page)

I copied the code into my lyx file in the beginning of the page. As instructions says I copied the title page code and then the \titleGP code snippet. But it says it is wrong in compile time. Why is that?

• Welcome to TeX.SX. Which error do you get exactly? It works fine here, with the default settings in LyX. – Torbjørn T. Dec 2 '14 at 11:00
• Where should I put that code. In preamble mode?? – vigamage Dec 2 '14 at 11:08
•  \inputencoding{latin1} \documentclass {book} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. – vigamage Dec 2 '14 at 11:11

First, go to Document --> Settings --> LaTeX preamble and paste in everything from the preamble of that template. That means everything between, but not including, \documentclass{book} and \begin{document}. (Lines 29 to 64 in the template)
Second, exit the document settings, add an ERT (Insert --> TeX code, or Ctrl + L) at the start of your document, and type \thispagestyle{empty}\titleGP in this.