|||
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.
意思是:有些期刊的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 里的其他方案进一步解决。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-13 01:43
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社