I'm trying to make a new document class, following the docs
from LyX 1.1.5, where in 6.2.2 it says:

"For the sake of example we'll assume that the style file is
called myclass.sty and it is meant to be used with report.cls
which is a standard class.

   cp report.layout ~/.lyx/layouts/myclass.layout

Then edit myclass.layout and change the line:

   \DeclareLaTeXClass{report}

to read

   \DeclareLaTeXClass[report, myclass.sty]{report (myclass)}

then add:

  Preamble
     \usepackage{myclass}
  EndPreamble

near the top of the file.
  Start LyX and... [reconfigure, etc...]"

I did all that, verbatim, except that the copy line was:

  cp /usr/share/lyx/layouts/report.layout ~/.lyx/layouts/myclass.layout

because that's my LyXDir, and there was, indeed a report.layout there.
When I restart LyX and select the Layout->Document popup, I don't see
"report (myclass)" as I expect.

I must say, I'm a bit confused by the mention first of "myclass.sty"
and then the subsequent instruction saying "myclass.layout."  I
tried renaming myclass.layout to myclass.sty, with no effect.
The file "report.sty" in /usr/share/texmf/tex/latex/base/report.sty
doesn't have a line \DeclareLaTeXClass{report} in it, so I assume
the .layout file above is what I should be starting with.

What should I do next?

Jim

Reply via email to