LaTeX: Adding a custom class in LyX 1.6.8 for Mac OS

Having planned to submit an article to the open access  Computational Linguistics Journal, I was facing a new challenge: articles appearing in this journal are typeset using LaTeX. I had heard of it but never used it so far, so the concept was rather blurred. A friend of mine even suggested to do the conversion for me in order to save me the trouble of installing and configuring a LaTeX distro on my computer. Was it so complicated? Actually, it is not that straightforward to make it work.

I first installed an OpenOffice extension called writer2latex, but I was not really satisfied with the way it worked, maybe just because I didn’t know yet what I had to do with my documents. Then, I came across LyX.  According to the authors, it is a document processor that adopts an approach to writing based on what we mean (WYSIWYM), as opposed to what we see (WYSIWYG).

I followed the instructions (which were pretty clear) and installed everything I needed on my Mac OS (Snow Leopard) to make LyX run, and it did! I could apply what I meant, that is, this was a title, and this was a subsection, or that was a subsubsection, and so on. My next challenge was to use the journal style file (clv2.cls), and since the process is not just copy and paste, so here is how to proceed (thanks to Piyush Goel).

  1. Copy the clv2.cls file in your latex directory. To find where it is go to LyX > Tools > TeX Information > LaTeX Classes > Show path. For me it was /Users/sylvie/Library/texmf/tex/latex/lyx/.

  2. Make a .layout file with the same name (clv2.layout) with the following content:
    #% Do not delete the line below; configure depends on this
    # \DeclareLaTeXClass[clv2]{manuscript (clv2)}
    # Input general definitions
    Input stdclass.inc

    Note that you can change the term manuscript to review or article, as you like.

  3. Copy the clv2.layout file into your package content. For me it was Applications > LyX > Contents > Resources > layouts > clv2.layout.
  4. Open a terminal and on the command prompt write sudo texhash (LaTeX will be reconfigured).
  5. Open LyX, and then go to LyX > Reconfigure, and Restart Lyx.
  6. Go to Document > Settings > Document Class > manuscript (clv2)
  7. To view the document with the new class, go to File > View > PDF(pdflatex)

And here I am, working on my article, and being able to finally apply the Computational Linguistics LaTeX clv2.cls class.