安装新的 .bst 文件

安装新的 .bst 文件

我无法更改参考书目样式。我的 elsarticle 包位于以下目录中:C:\Program Files (x86)\MiKTeX 2.9\tex\latex\elsarticle。此目录中有文件model1a-num-names.bst(可从http://www.elsevier.com/framework_authors/misc/model1-num-names.bst)。

我将我的参考书目样式改为\bibliographystyle{model1a-num-names},然后重新编译了我的主文档(删除所有辅助文件后:.bbl.log等等)。

编译正常,但引用编号应该出现的地方有问号。日志文件中产生的警告类型如下:

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

Package natbib Warning: There were undefined citations.

如果我改回\bibliographystyle{plain},那么它将编译成功,并且参考文献将显示出来。如果我再次改回\bibliographystyle{model1a-num-names},并尝试编译,它将编译成功,但参考书目样式没有任何变化(即它似乎没有实际使用该model1a-num-names.bst文件)。

我还注意到,由于某种原因,每次编译时它都会创建一个空tmpbib.tex文件(也许这与我的问题无关,但我认为这很奇怪)。

我尝试过的其他方法是“所有程序”->“MikTex 2.9”->“维护”->“设置”,然后单击“刷新 FNDB”。我还尝试过“所有程序”->“MikTex 2.9”->“维护(管理员)”->“设置(管理员),然后单击“刷新 FNDB”。还是没用。

关于如何使用文档类,您有什么想法model1a-num-names.bstelsarticle?我不知道这是 LaTeX 问题、TeXWorks 问题还是 MiKTeX 问题,所以我希望这是一个适合提问的论坛。

这是一个最小的工作示例:

\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}

以下是相应的.bib 文件:

@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}
}

另外,我在 Windows 7 上使用带有 MiKTeX 2.9 的 TeXWorks。

答案1

问题似乎是 elsarticle 包安装不正确。MikTex 尝试从 CTAN 存储库安装该包,但 CTAN 上的 elsarticle 包已过期。最新版本可在http://www.elsevier.com/wps/find/authorsview.authors/elsarticle。为了正确安装它,应该下载 .zip 文件,然后创建一个“C:\Local Tex Files”目录并按照此处的说明进行操作(Q2 athttp://docs.miktex.org/faq/maintenance.html#styfiles) 和这里 (http://docs.miktex.org/manual/localadditions.html) 来制作正确的目录结构并将 .sty、.cls 和 .bst 文件放在适当的子目录中(按照第二个链接上图 4.4 之后的说明进行操作),最后注册目录(第二个链接下的其余说明)。

相关内容