On 03/13/2012 07:13 AM, Thibaud Hulin wrote:
Hi,
Lyx can't find my new class. I use Ubuntu Natty and this package that
contains bst and cls files :
http://dn.revuesonline.com/revues/HermesLatex.zip
I copied cls file in those folders :
/usr/local/share/texmf/tex/latex/hermes/
/usr/share/texmf/tex/latex/hermes
~/texmf/
Then I rebuilt the base with texhash :
|sudo texhash
texhash: Updating /usr/local/share/texmf/ls-R...
texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
texhash: Updating /var/lib/texmf/ls-R-TEXLIVE...
texhash: Updating /var/lib/texmf/ls-R...
texhash: Done.|
Then with Lyx, I do Tools/Reconfigure and restart it, but when I see
the list of class (Tools/Information tex) I don't find my
hermes-journal class.
You need a "layout file" for this class, if LyX is to be able to use it.
This looks to be a modification of the article class, with other
packages loaded automatically, including amsmath, amsthm, etc. So the
following ought to get you started at least:
# \DeclareLaTeXClass{Hermes}
Format 31
Input article.layout
Input theorems-ams.module
ProvidesModule theorems-ams
Put that in a file called hermes-journal.layout, and put that file in
your local LyX layout directory, by default: $HOME/.lyx/layouts/. Then
reconfigure. If there are customized commands from this class you want
to use, you'll need to add some code for them, too.
Richard