3

I'm interested in making some modifications to a standard class to use as the class for many documents I'm creating, and see that one way to do this is to simply create a "wrapper class". This approach makes a lot of sense for my application and will (I think) be easy to maintain. But I can't see how to get my documents to use this class. I understand how to do this using LaTeX directly, but not using LyX.

What do I need to do to get my class to appear in the list of classes listed in Document > Settings... > Document Class?

orome
  • 10,459

1 Answers1

2

Once the wrapper class has been made available to LyX, all you have to do is create a corresponding "layout" file, myclass.layout, containing

#\DeclareLaTeXClass[myclass]{My Custom Class}
Input base-class.layout

and then choose the class for your document with

Document > Settings... > Document Class > Local Layout...

and browse to and select myclass.layout.

If you want to make the layout generally available, then it needs to be added to the LyX layouts folder on your system (e.g., ~/.lyx/layouts/ on UNIX), which will cause it to appear among the listed layouts in the Document Class dialog as "My Custom Class".

orome
  • 10,459