My document use the nih class and layout (the latter from Rob Oakes) and
is based on the template provided with the nih for LyX zipfile. nih.cls
and nih.layout are in the same directory as the document. Windows 7.
LyX Version 2.0.6. MikTeX 2.9.
Producing pdfs (via pdflatex) works fine on linux and MacOS, but not
Windows. The problem is that on Windows c:\MikTeX\tex\latex\nih\nih.cls
is used instead of the version in the document directory. That version
includes a bunch of stuff which is in the document preamble, and so
"already defined" errors occur. Some of it really needs to be in the
preamble since it consists of stuff that vary with each document. The
nih.cls in the document directory does not contain the preamble stuff.
Is there a way to use the nih.cls in the document directory?
The LyX customization manual, section 5.1, has instructions for
installing a local copy. This seems rather involved and will not
reflect changes to the nih.cls in my document directory. I'm probably
not going to change it, but I'd rather not set things up in such a
fragile way.
I tried to use a local layout in the Document Settings | Document Class,
but this didn't change the nih.cls that was used.
Thanks.
Ross Boylan
P.S. I could change the commands in the preamble to \renewcommand, but
then things would stop working under the other OS's, since the command
is not previously defined for them. Also, \newcommands are not the only
thing in the preamble, and I'm not sure if duplicating the other stuff
is OK.