RubinYao的个人博客分享 http://blog.sciencenet.cn/u/RubinYao

博文

解决:Bibliography not compatible with author-year citation

已有 33064 次阅读 2017-5-17 16:16 |个人分类:latex|系统分类:科研笔记| LaTex


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


Package natbib Error: Bibliography not compatible with author-year citations.(natbib) Press <return> 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://wap.sciencenet.cn/blog-2044952-1055483.html

上一篇:endnote中错误码及解决方法收集
收藏 IP: 115.155.86.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-28 23:19

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部