I was struggling with this myself, until I came across this article. I had to make a few adaptations for my setup as follows (for the purposes of this post, the unavailable document class I wanted to install was called clv2
, for which I had a clv2.cls
file):
Step 0:
This was not mentioned in the article, nor do I know if it's absolutely necessary, but I quit LyX before I started this process.
Step 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/.
When I did LyX > Tools > TeX Information > LaTeX Classes > Show path
, I saw /usr/local/texlive/2011/texmf-dist/tex/latex
There was no lyx
directory there, so I had to create one for myself. Then I copied clv2.cls
into /usr/local/texlive/2011/texmf-dist/tex/latex
Step 2:
Make a .layout file with the same name (clv2.layout)
This was very straightforward. I wanted an article
(not a manuscript
) though, so my layout file looked like this:
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[clv2]{article (clv2)}
# Input general definitions
Input stdclass.inc
Step 3:
Copy the clv2.layout file into your package content. For me it was Applications > LyX > Contents > Resources > layouts > clv2.layout
My package content was located at /Users/ashwin/Library/Application Support/LyX-2.0/layouts
, so that's where I copied clv.layout
to
Step 4:
Open a terminal and on the command prompt write sudo texhash (LaTeX will be reconfigured)
This was very straightforward. I was asked for my password, which is normal.
Step 5:
Open LyX, and then go to LyX > Reconfigure, and Restart Lyx
Again, this was very straightforward. No hitches here.
Step 6:
Go to Document > Settings > Document Class > manuscript (clv2)
Since I wanted an article
and therefore changed clv2.layout
, I found an article (clv2)
in my list of document classes.
Hope this helps
Best Answer
The following worked for me. It's a hybrid of this online how-to and my older question on how to do this on Mac OS X
Step 0: Quit LyX
Step 1:
Step 2:
Mine was in
C:\Program Files (x86)\MiKTeX 2.9\tex\latex
, where I had to create thelncs
folder (which requires admin privilege escalation). I extractedllncs.cls
andllncsdoc.sty
to this folder.Step 3:
Open up
cmd
and runtexhash
. Very straightforwardStep 4:
It wasn't obvious to me where MikTeX Settings was. This other SX post showed me what to do. Just look for
admin
in the Start Menu's search bar and you'll seeMikTeX Settings (Admin)
Step 5:
Very straighforward
Step 6:
You're done. Go do a happy dance or something