2

I'm trying to use elsarticle-num-ident.bst, an exact copy of

C:\Program Files (x86)\MiKTeX 2.9\bibtex\bst\elsarticle\elsarticle-num.bst 

but every time I run LyX, I get the bibtex error

I couldn't open style file elsarticle-num-ident.bst

This is despite reconfiguring LyX and restarting, and despite running MixTex's Settings/Options' "Refresh FNDB" as Administrator. It also doesn't work if I put the .bst file in the same folder as the .lyx file.

How should I help lyx/bibtex/Mixtex find the .bst file?

Once I get the identical copy to work, I plan to edit it to not print URLs, as suggested by mico.

Related questions:

2 Answers 2

4

You should create a LocalTeXMF root directory, say in your personal directory. Whatever the exact name you give it, you have to declare it via MiKTeX Options, Roots tab, Add button. Everything you'll put in this directory must respect the TeX Directory Structure (TDS).

In this root, copy the .bst file as \LocalTeXMF\bibtex\bst\elsarticle\elsarticle-num-ident.bst, then refresh the FNDB. That's all.

3
  • Why shouldn't it be in the main root? Jul 16, 2015 at 16:38
  • 4
    It could be overwritten or deleted on updates. As a rule of thumb, one should separate the main root, that is part of the distribution, and personal/local roots. TeX Live creates one automatically, with MiKTeX, you have to do it by yourself.
    – Bernard
    Jul 16, 2015 at 16:58
  • Thanks. I'll try to make it a subdirectory of my LyX file, which should also help with portability of that document. Jul 16, 2015 at 20:46
0

My error was that I wasn't using an EXACT copy of elsarticle-num.bst. I was using the one I downloaded from Elsevier. Using an exact copy fixed my problem.

1
  • 2
    You shouldn't put it the main Root directory, as I explain in my answer.
    – Bernard
    Jul 16, 2015 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .