On 03/23/2014 10:14 PM, Carlos Gonzalez wrote:
I have already installed .cls files successfully (my college provided the .cls and .sty files). The problem is that I am trying to install another .cls file (with no accompanying .sty file) that I downloaded from a professional society (ASME) that they use for all their journals.

I installed it the same way I did for the previous files. It still does not appear in the document class. The .bst file ASME provides works fine but the .cls does not. When I open Lyx and look at Tool>Tek Information>LaTeK Classes, the file is there but when I go to select the document class, it is not there. I have no idea what's going on. I have attached the provided .cls file. Can anyone tell what's going on? Thanks.

The class file is the LaTeX half of the equation. To be able to use it, LyX also needs a "layout" file for it. This is basically a file that tells LyX what resources the class file provides. (It is really not possible for LyX to parse the class file and figure this out for itself.) The problem, then, is that there is no layout file for asme2e.

Just glancing through the file, it looks to me like a pretty standard sort of article class. So it will probably be usable, if not perfect, with the layout file I am attaching. This file should be put in the directory $USERDIR/layouts/. You can find your user directory by looking at Help>About LyX. Once you have put the layout file there, you will need to reconfigure LyX by going to Tools>Reconfigure, and then restarting.

As I said, this should work to some extent, but it will need tweaking. Please see Chapter 5 of the Customization manual for how to do that. If you get it working well, let us know, and we can consider including it in future LyX versions.

Richard


#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass{article (ASME2E)}
# Article textclass definition file. Taken from initial LyX source code
# Author : Matthias Ettrich <ettr...@informatik.uni-tuebingen.de>
# Transposed by Pascal André <an...@via.ecp.fr>
# Heavily modifed and enhanced by serveral developers.

Format 35
Input stdclass.inc

SecNumDepth             3
TocDepth                3

NoStyle Chapter
NoCounter chapter
NoStyle Chapter*


Style Part
        Align                 Left
        AlignPossible         Left
        TopSep                2
        BottomSep             1.5
        Font
          Size                Larger
        EndFont
End


Style Part*
        Align                 Left
        AlignPossible         Left
        TopSep                2
        BottomSep             1.5
        Font
          Size                Larger
        EndFont
End

Reply via email to