For writing with LaTeX I prefer using LyX because it hides the ugliness of LaTeX source code behind a pseudo-WYSIWYG frontend (the developers call it WYSIWYM: what you see is what you mean ). Including mathematical expressions, however, is very LaTeX minded and comfortable: you type LaTeX math constructs (stuff with _, ^, \sum, ...) and LyX directly visualises it as a pretty printed formula. For the advanced LaTeX constructions not available in LyX's interface one can always fall back om "raw LaTeX" input fields. In short, I think LyX is a very handy compromise between the power of LaTeX and the user friendliness of a WYSIWYG system.

Sometimes, for example when writing an article for a conference, one need to use a custom LaTeX document class, recommended by the conference author guidelines. The procedure to make LyX using this custom document class is non obvious and a bit involved. It is broadly explained in the LyX manual (Part Customization, Chapter 5 Installing New Document Classes, Layouts, and Templates), but here is the short version (for teTeX on Linux or related systems, I don't know about Windows):

  • Get the LaTeX document class file, e.g. funkyarticle.cls.
  • Put this class file where LaTeX could find it. I use for example the directory ~/texmf/tex/latex/ in my own home directory (it has to be precisely the ~/texmf/tex/latex/ directory structure, otherwise it does not work). That way I don't have to mess with my system (for example in directories as /usr/share/texmf/tex/latex/) as administrator. This pages is more elaborate on installing custom LaTeX stuff
  • Run texhash from the command line. This updates (La)TeX's database (it creates ls-R files, e.g. look at ~/texmf/ls-R).
  • Make a LyX layout file matching the custom LaTeX class file, e.g. funkyarticle.layout. Put it where LyX can find it, e.g. in ~/.lyx/layouts/.

    The LyX layout file declares how LyX has to format your text (LyX does not use the LaTeX layout system and settings). A very minimal LyX layout file could be this:

    #% Do not delete the line below; configure depends on this
    #  \DeclareLaTeXClass[funkyarticle]{article (funky)}
    # Input general definitions

    For conference articles I use for example something like

    #% Do not delete the line below; configure depends on this
    #  \DeclareLaTeXClass[funkyarticle]{article (funky)}
    # Input general definitions
    MaxCounter      Counter_Section
    Style Section
        Align Center
            Shape SmallCaps

    You can find more elaborate examples to base your layout file on in your global LyX layout directory (/usr/share/lyx/layouts/ in my case, search for *.layout files).

    The second line of the layout file is very important and has to be tailored to your particular case: in \DeclareLaTeXClass[foo]{bar} the foo refers to the LaTeX class file foo.cls and bar is how this class will be called in the LyX interface.

  • Start LyX and choose "Edit" > "Reconfigure". Close Lyx.

  • Restart LyX. Under "Layout" > "Document" > "Layout" > "Document class" the newly created LaTeX/LyX class should now be selectable (as "article (funky)" in our example)