2. Copy bmvc2k.cls file into the new folder
3. Create file bmvc2k.layout with the content
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[xxx]{article (xxx)}
# Input general definitions
Input stdclass.inc
Replace xxx with the class name (here is bmvc2k)
4. Copy the bmvc2k.layout to the folder C:\Program Files\LyX 1.6.9\Resources\layouts
5. In command prompt (type cmd in start menu), type texhash.
6. In LyX, Tools->Reconfigure, and then restart LyX
7. Open new document and set the new class: DOcument > Settings and select bmvc. If cannot see it, using Local Layout to pen the bmvc2k.layout file in LyX 1.6.9\Resources\layouts
References
[1] Add new class for Linux
[2] Add new class for Windows Vista/Windows 7
[3] For windows
-------------------------------------------------------
Content from [3] is stored here for reservation
Adding custom class files (.cls) to Lyx in Windows Vista / Windows 7 environment
by Paul Kiddie • February 22, 2010 • lyx, TeX, windows • 9 Comments
\documentclass{class} in the preamble (before \begin{document}), using these custom classes isn’t so straightforward in Lyx, so I’ll describe the steps required. I’m using the eethesis.cls class file as an example, which you can obtain from http://www.latex-site.info/.
This class file aids in the presentation of a thesis or progress report
which meets the requirements of formatting at the University Of
Birmingham, UK.There are a couple of posts I ran across which deal with this specific issue, here and here. None were specific to Windows Vista/Windows 7, so I’ll deal with that here. This assumes version 2.8 of Miktex and version 1.6 of Lyx. If you are using an earlier or later versions, replace with the correct version numbers where I’ve used them.
- Get a copy of the class file, and copy it into a folder with the same name into
C:\Users\your_user_name\AppData\Roaming\MiKTeX\2.8\tex\latex. So, foreethesis.cls, you should have a folder calledeethesiswithinC:\Users\your_user_name\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.increplacingxxxwith the class name (without the .cls extension). In my case,xxxiseethesis, and the code above becomes:
#% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[eethesis]{article (eethesis)} # Input general definitions Input stdclass.incThanks goes out to http://wastedmonkeys.com/2007/09/27/adding-a-new-class-in-lyx-windows for this. - Save this file to
C:\Program Files\LyX16\Resources\layouts, naming iteethesis.layout. - In a command prompt (type
cmdin start menu), typetexhash. What you will now see it doing is iterating through several folders for new classes, one of which (C:\Users\your_user_name\AppData\Roaming\MiKTeX\2.8\) is where we copied theeethesis.clsclass file into. - Within Lyx, hit Tools > Reconfigure, then restart Lyx.
- Open a document and click Document > Settings. Click on ‘Document Class’, expand the drop down menu and you should see ‘
article (xxx)’ is visible, and usable, (like below) within the drop down menu.


Không có nhận xét nào:
Đăng nhận xét