[Tex/LaTex] Installing new .bst files

bibliographiesbibtexnatbib

I am having trouble changing bibliography styles. I have the elsarticle package in the following directory: C:\Program Files (x86)\MiKTeX 2.9\tex\latex\elsarticle. Inside of this directory is the file model1a-num-names.bst (can be obtained from http://www.elsevier.com/framework_authors/misc/model1-num-names.bst).

I changed my bibliography style to \bibliographystyle{model1a-num-names} and then recompiled my main document (after deleting all of the auxiliary files: .bbl, .log etc.).

It compiles fine, but there are question marks where the reference numbers should be. The warnings produced in the log file are of the following type:

Package natbib Warning: Citation `Lehockey1998' on page 1 undefined on input li
ne 31.

And

Package natbib Warning: There were undefined citations.

If I change back to \bibliographystyle{plain}, then it will compile fine and the references will show up. If I change again to \bibliographystyle{model1a-num-names}, and try to compile it compiles fine but there are no changes to the bibliography style (i.e. it doesn't seem to be actually using the model1a-num-names.bst file).

I have also noted, that for some reason every time it compiles it creates an empty tmpbib.tex file for some reason (maybe this has nothing to do with my problem, but I thought it was weird).

Other things I have tried are All Programs->MikTex 2.9->Maintenance->Settings, and then clicking Refresh FNDB. I also tried All Programs->MikTex 2.9->Maintenance (Admin)->Settings (Admin), and clicking Refresh FNDB. Still no luck.

Any ideas on how I can use model1a-num-names.bst with the elsarticle document class? I don't know if this is a LaTeX problem, or a TeXWorks problem, or a MiKTeX problem, so I hope this is an appropriate forum to ask.

Here is a minimal working example:

\documentclass[preprint,12pt]{elsarticle}

\usepackage[nodots]{numcompress}

\biboptions{sort&compress}

\journal{A Journal}

\begin{document}

\begin{frontmatter}

\title{My Title}

\author[myaddr]{Author 1}
\author[myaddr]{Author 2}
\address[myaddr]{An Address}

\begin{abstract}
Here's an abstract.
\end{abstract}

\begin{keyword}
keyword1 \sep keyword2 \sep keyword3
\end{keyword}

\end{frontmatter}
\section{Introduction}
\label{intro}

I would like to cite~\cite{Lehockey1998,Lehockey1997,Norton1996,Lehockey1999}. I would also like to cite~\cite{Lehockey1998,Lehockey1997,Thaveeprungsriporn1997,Lehockey1999,Gupta2004,Tan2008,Tan2008a}.

\bibliographystyle{model1a-num-names}
%\bibliographystyle{plain}
\bibliography{MyReferences}

\end{document}

Here is a corresponding .bib file:

@article{Lehockey1997,
author = {Lehockey, E M and Palumbo, G},
doi = {10.1016/S0921-5093(97)00126-3},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Lehockey, Palumbo/Lehockey, Palumbo - On the creep behaviour of grain boundary engineered nickel 1 - 1997.pdf:pdf},
issn = {09215093},
journal = {Materials Science and Engineering: A},
month = sep,
number = {2},
pages = {168--172},
title = {{On the creep behaviour of grain boundary engineered nickel 1}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0921509397001263},
volume = {237},
year = {1997}
}
@article{Lehockey1998,
author = {Lehockey, E M and Palumbo, G and Lin, P},
doi = {10.1007/s11661-998-0214-y},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Lehockey, Palumbo, Lin/Lehockey, Palumbo, Lin - Improving the weldability and service performance of nickel-and iron-based superalloys by grain boundary engineering - 1998.pdf:pdf},
issn = {1073-5623},
journal = {Metallurgical and Materials Transactions A},
month = dec,
number = {12},
pages = {3069--3079},
title = {{Improving the weldability and service performance of nickel-and iron-based superalloys by grain boundary engineering}},
url = {http://www.springerlink.com/index/10.1007/s11661-998-0214-y},
volume = {29},
year = {1998}
}
@article{Lehockey1999,
author = {Lehockey, E M and Limoges, D and Palumbo, G and Sklarchuk, J and Tomantschger, K and Vincze, A},
doi = {10.1016/S0378-7753(99)00015-4},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Lehockey et al/Lehockey et al. - On improving the corrosion and growth resistance of positive Pb-acid battery grids by grain boundary engineering - 1999.pdf:pdf},
issn = {03787753},
journal = {Journal of Power Sources},
keywords = {grain boundary engineering,ignition,intergranular corrosion,lighting,starting},
month = mar,
number = {1-2},
pages = {79--83},
title = {{On improving the corrosion and growth resistance of positive Pb-acid battery grids by grain boundary engineering}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0378775399000154},
volume = {78},
year = {1999}
}
@article{Norton1996,
author = {Norton, D. P. and Goyal, A. and Budai, J. D. and Christen, D. K. and Kroeger, D. M. and Specht, E. D. and He, Q. and Saffian, B. and Paranthaman, M. and Klabunde, C. E. and Lee, D. F. and Sales, B. C. and List, F. A.},
doi = {10.1126/science.274.5288.755},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Norton et al/Norton et al. - Epitaxial YBa2Cu3O7 on Biaxially Textured Nickel (001) An Approach to Superconducting Tapes with High Critical Current Density - 1996.pdf:pdf},
issn = {0036-8075},
journal = {Science},
month = nov,
number = {5288},
pages = {755--757},
title = {{Epitaxial YBa2Cu3O7 on Biaxially Textured Nickel (001): An Approach to Superconducting Tapes with High Critical Current Density}},
url = {http://www.sciencemag.org/cgi/doi/10.1126/science.274.5288.755},
volume = {274},
year = {1996}
}
@article{Thaveeprungsriporn1997,
author = {Thaveeprungsriporn, Visit and Was, Gary S.},
doi = {10.1007/s11661-997-0167-6},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Thaveeprungsriporn, Was/Thaveeprungsriporn, Was - The role of coincidence-site-lattice boundaries in creep of Ni-16Cr-9Fe at 360 °C - 1997.pdf:pdf},
issn = {1073-5623},
journal = {Metallurgical and Materials Transactions A},
month = oct,
number = {10},
pages = {2101--2112},
title = {{The role of coincidence-site-lattice boundaries in creep of Ni-16Cr-9Fe at 360 °C}},
url = {http://www.springerlink.com/index/78285142G7358665.pdf http://www.springerlink.com/index/10.1007/s11661-997-0167-6},
volume = {28},
year = {1997}
}
@article{Gupta2004,
author = {Gupta, Gaurav and Was, Gary S. and Alexandreanu, Bogdan},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Gupta, Was, Alexandreanu/Gupta, Was, Alexandreanu - Grain boundary engineering of ferritic-martensitic alloy T91 - 2004.pdf:pdf},
journal = {Metallurgical and Materials Transactions A},
number = {February},
pages = {717--719},
title = {{Grain boundary engineering of ferritic-martensitic alloy T91}},
url = {http://www.springerlink.com/index/X78241U5601Q0510.pdf},
volume = {35},
year = {2004}
}
@article{Tan2008,
author = {Tan, L and Ren, X and Sridharan, K and Allen, T.R.},
doi = {10.1016/j.corsci.2008.08.024},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Tan et al/Tan et al. - Corrosion behavior of Ni-base alloys for advanced high temperature water-cooled nuclear plants - 2008.pdf:pdf},
issn = {0010938X},
journal = {Corrosion Science},
month = nov,
number = {11},
pages = {3056--3062},
publisher = {Elsevier Ltd},
title = {{Corrosion behavior of Ni-base alloys for advanced high temperature water-cooled nuclear plants}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0010938X08003363},
volume = {50},
year = {2008}
}
@article{Tan2008a,
author = {Tan, L and Sridharan, K and Allen, T.R. and Nanstad, R.K. and McClintock, D.A.},
doi = {10.1016/j.jnucmat.2007.08.015},
file = {:C$\backslash$:/Users/Ollie/Documents/Mendeley Desktop/Tan et al/Tan et al. - Microstructure tailoring for property improvements by grain boundary engineering - 2008.pdf:pdf},
issn = {00223115},
journal = {Journal of Nuclear Materials},
month = feb,
number = {1-2},
pages = {270--280},
title = {{Microstructure tailoring for property improvements by grain boundary engineering}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0022311507009646},
volume = {374},
year = {2008}
}

Also, I am using TeXWorks with MiKTeX 2.9 on Windows 7.

Best Answer

The problem seemed to be an incorrect installation of the elsarticle package. MikTex tries to install the package from the CTAN repository, but the elsarticle package on CTAN is out of date. The most up to date version is available at http://www.elsevier.com/wps/find/authorsview.authors/elsarticle. In order to correctly install it one should download the .zip file, then create a "C:\Local Tex Files" directory and follow the instructions here (Q2 at http://docs.miktex.org/faq/maintenance.html#styfiles) and here (http://docs.miktex.org/manual/localadditions.html) in order to make the correct directory structure and place the .sty, .cls, and .bst files in the appropriate sub-directories (follow instructions after Fig. 4.4 on the second link), and finally register the directory (the rest of the instructions under the second link).