On Mon, 31 Jul 2000, Bob Torres wrote:
> Hello all,
Hi Bob,
> I've recently started using LyX with the aim of finding a package
> robust enough to handle my dissertation writing. After writing my
> thesis in M$ Word, I'm loathe to return to it after corrupted
> chapters, etc. What's more, I find LyX quite impressive, and think it
> will be perfect for dissertation writing.
We're glad you're impressed.
> LyX so far has treated me well. Recently, though, I've run into a
> problem that I can't seem to resolve. I'm trying to make use of my
> University's LaTeX dissertation class (they say it is for LaTex 2e),
> but I'm unable to get LyX to load it. Here's what I did, as per the
> customization docs:
>
> 1. I put the class file (cornell.cls) into
> /usr/share/texmf/tex/latex/base and did texhash.
>
> 2. I created a cornell.layout file in my ~/.lyx/layouts directory.
> Since I don't want to add more than what I'm hoping the cornell.cls
> will provide, I simply made the file 2 lines: the obligatory first
> line about not deleting, and a second line which consists of
>
> \DeclareLaTeXClass [cornell, report]{cornell}
>
> I include report since cornell.cls depends on it in turn.
>
> 3. I reconfigure LyX. LyX 'sees' the new class, but gives me an
> error when I try to select it, telling me that it is unable to switch
> to the new document class.
You are perhaps a couple of lines away from a working solution.
At the moment your file doesn't contain any descriptions of the paragraph
styles. Since you say cornell depends on report you should be able to
just copy the contents of the report.layout into cornell.layout and
everything will work. It might even be possible to instead add the
following line:
Input report.layout
This should have the same effect as LyX shouldn't get confused by the
header comments in report.layout.
> I'm hoping that I won't have to "roll my own' since I find the
> documentation on doing so in the LyX manual a little confusing (this
> is surely a reflection on my limited abilities and not the docs). Am
> I missing something, or is there an easier way to import these class
> files? I did search the list - people have reported similar problems,
> but there's never been a satisfactory answer.
There may still be a need to fix the cornell.layout if for example there
are other paragraph environments that aren't in report. If cornell just
redefines the look of the existing report class then you shouldn't have to
change anything (although you might want to change the screen fonts to
match those of the output).
As for an easier way to import the class files... well it would be nice to
be able to scan a LaTeX class or style file and extract valid command and
environment names and how to represent them onscreen. This is hard enough
to do by hand let alone trying to write a script to do it. So the easiest
way is to copy an existing layout that supports most of what your new
class does and modify it.
Allan. (ARRae)