本文主要是介绍初学latex的文献引用\bibliographystyle使用一些状况,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
接到上级指示昨天奋战到半夜,latex的一些情况,
1,首先文献引用
主要是出现这个错误
! Package natbib Error: Bibliography not compatible with author-year citations.
(natbib) Press <return> to continue in numerical citation style.
See the natbib package documentation for explanation.
Type H <return> for immediate help.
...
昨晚一直调试都是这个错误简直崩溃了,无论你怎么调试都是错误,即使你添加的代码又删去之后(原先是通过编译的情况下),简直噩梦(而我也顺利上火了)!
一,首先消除先前错误编译的影响
上网搜索栏一些,删去源文件夹中的两个文件.aux
and the .bbl
files,这样的先前的错误编译的文件就不会对有影响了
Follow these steps:
- Delete the
.aux
and the.bbl
files - Do your changes (in the
\bibliographystyle
or in any option ofnatbib
) - Run LaTeX
- Run BibTeX
- 借鉴与这里
- 点击打开链接http://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations
\bibliography{lizhew}
\bibliography{lizhew}
\usepackage[square,sort,comma]{natbib}
to
\usepackage[square,sort,comma,numbers]{natbib}
或者%\documentclass[authoryear,preprint,review,12pt,numbers,sort&compress] 之前我也加入这个,但是很可惜是直接fatal error,
其二,在使用natbib编译书稿时,LaTex报错(但生成的PDF文件正确): Package natbib Error: Bibliography not compatible with author-year citations. (natbib) Press <return> to continue in numerical citation style.
该错误信息表示文献条目(bib文件中的内容)与“作者-年”的引用格式不兼容,即有的文献缺少author或year字段,不能用“作者-年”引用格式。有两种解决方案:
1. 确保所有文献条目均含有author字段和year字段;
2. 在调用natbib宏包时,使用numbers参数,即: \usepackage[square, comma, sort&compress, numbers]{natbib}
我采用第二种方式后,编译书稿不再出现这一错误。
出自于http://www.comdyn.cn/from-web/latex/361-package-natbib-error-bibliography-not-compatible-with-author-year-citations点击打开链接
我自己试过第二中,并且出现这个另外一个
error option clash for package natbib网上找了一边说是需要
把\usepackage[suqare] {natbib}删掉。然后把抬头改成 看这里http://blog.sina.com.cn/s/blog_ab4ebc3e0102v12y.html点击打开链接 \documentclass[authoryear,preprint,review,12pt,square,comma]{elsarticle}但是很可惜是对于我的情况是直接fatal error,
引用文献的时候有两种方式
一是:bibterm另外一种是.bib,个人倾向于第二种简单,加入这两句话\bibliographystyle{tJDE} \bibliography{lizh} 其中lizh是lizh.bib(新建一个将谷歌上面引用的bibtex粘贴过来就行)的名称,tjde根据你的模板变,不要自己自以为是的改动bibtex直接谷粉学术上面引用,就是这个
总结:最后最后自己先将那两个文件.aux
and the.bbl
files删除之后,改掉\bibliographystyle{tJDE}编译便能通过啦,原因不用多说了,(==恩说多了都是泪),自己自以为是了。
这篇关于初学latex的文献引用\bibliographystyle使用一些状况的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!