【转载】解决latex里面的:Bibliography not compatible with author-year citation

转载自:https://blog.sciencenet.cn/blog-2044952-1055483.html

Latex中利用.bib文件添加参考 出现如下问题:

Package natbib Error: Bibliography not compatible with author-year citations.(natbib) Press to continue in numerical citation style.

按照网上方法(主要参考以下网址),有以下方案:

http://blog.csdn.net/sweet_dew/article/details/43451475

http://bbs.ctex.org/forum.php?mod=viewthread&tid=60702

1、把参考文件的year补全。为了测试本人只用一个参考文献,信息都全,还是编译不通过。

2、加入natbib包,具体方法:修改

usepackage[square,sort,comma]{natbib}

为:

usepackage[square,sort,comma,numbers]{natbib}

本人按照这种方法加入后出现新错误:option clash for package natbib. 意思是natbib的option配置冲突,可别的地方没有使用natbib呀。再找发现这里给了原因:

Actually, this suggestion is what I was looking for! Some journal document classes load natbib without the citation style option, and that may give rise to OP’s error message even when numeric citations are being used. In those cases setcitestyle{number} resolves the issue.

(来源:https://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations)

意思是:有些期刊的document class已经默认加载了natbib包,当再次加入usepackage[…]{natbib},这就导致配置冲突,即option clash for package natbib。遇到这种问题跳过此方案,往下看。

虽然document class已经默认加载了natbib包,但是没有进行引用样式配置,这就导致"Bibliography not compatible with author-year citations"问题。根据这段描述提供的解决方法,即在documentclass{}[]后加入setcitestyle{}配置来设置样式,问题解决。

当然,对于期刊没有默认加载natbib包的情况,建议参照https://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations 里的其他方案进一步解决。

转载本文请联系原作者获取授权,同时请注明本文来自姚亚兵科学网博客。
链接地址:https://blog.sciencenet.cn/blog-2044952-1055483.html

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值