TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I've figured it out and posted a proposed answer. – raxacoricofallapatorius Feb 7 '12 at 19:05
up vote 2 down vote accepted

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".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.