# the new template doesn't work well

I was going crazy with the LyX and MikTeX configuration for a new class,I think I have done it matching the step! but None I get

here what i've done:

Get a copy of the class file, and copy it into a folder with the same name into `C:\Users\AppData\Roaming\MiKTeX\2.8\tex\latex.` So, for `ociamthesis.cls`, you should have a folder called `ociamthesis` within `C:\Users\\AppData\Roaming\MiKTeX\2.8\tex\latex`. This is Windows Vista / Windows 7 specific, you will soon see why… Create a new file and paste the following into it:

``````% Do not delete the line below; configure depends on this
\DeclareLaTeXClass[xxx]{article (xxx)}
Input general definitions
``````

Input `stdclass.inc` replacing xxx with the class name (without the .cls extension).

In my case, xxx is `eethesis`, and the code above becomes:

``````% Do not delete the line below; configure depends on this
\DeclareLaTeXClass[ociamthesis]{report (ociamthesis)}
Input general definitions
Input stdclass.inc
``````

Thanks goes out to Adding a new class in LyX for this.

Save this file to ```C:\Program Files\LyX16\Resources\layouts```, naming it `ociamthesis.layout`. In a command prompt (type cmd in start menu), type texhash. What you will now see it doing is iterating through several folders for new classes, one of which (`C:\Users\AppData\Roaming\MiKTeX\2.8\`) is where we copied the ociamthesis.cls class file into. Within Lyx, hit Tools > Reconfigure, then restart Lyx.

but when I try to run, I get this error message : LaTeX Error :

``````File 'ociamthesis.sty' not found
``````

Can anyone help me?

-

1. you add a `.cls` file while your error message miss a `.sty`. If you quoted the error message correctly, your lyx configuration is probably wrong.
2. If the error message actually says that the `cls` is not found then either your root (`C:\User\...\2.8`) is either not a known root of miktex or you didn't update its FNDB. Check in miktex settings if the root is listed (check "show miktex roots) and update the FNDB. If you have a multiuser setup do it in user and admin mode.
You didn't say if your error message actually miss a .sty or .cls. I can't help you if you got the lyx part wrong. But to test the miktex part: Make with an editor a small latex document `test.tex` which starts with `\documentclass{ociamthesis}` and compile it on the command line with `latex test`. If `ociamthesis.cls` is found the miktex part is ok. –  Ulrike Fischer Jun 11 '11 at 10:22