我使用的是 IEEE 的样式文件 (.bst)。当我引用多个参考文献时,例如:
\cite{ref1, ref2,ref3}
我预期得到 [1,2,3] 或 [1-3],但我得到的却是 [1],[2],[3]。我想知道我的样式文件是否有问题,如果有,我该如何修复它以使所有引用都放在一对括号中?
感谢帮助!
答案1
compress
加载包时使用该选项natbib
。默认情况下,IEEE 和大多数使用数字引用的期刊都规定所有引用必须按照它们在论文中出现的顺序进行编号。因此,您可能也希望包含该sort
选项
\usepackage[sort&compress, numbers]{natbib}
\begin{filecontents*}{sample.bib}
@article{aldaoudeyeh2016,
title={{Photovoltaic-battery scheme to enhance PV array characteristics in partial shading conditions}},
author={Aldaoudeyeh, Al-Motasem I},
journal={IET Renewable Power Generation},
volume={10},
number={1},
pages={108--115},
year={2016},
publisher={IET}
}
@ARTICLE{wu2017,
title={{Assessing Impact of Renewable Energy Integration on System Strength Using Site-Dependent Short Circuit Ratio}},
author={Wu, Di and Li, Gangan and Javadi, Milad and Malyscheff, Alexander M and Hong, Mingguo and Jiang, John Ning},
journal={IEEE Transactions on Sustainable Energy},
year={2017},
publisher={IEEE}
}
@article{wu2019,
title={A method to identify weak points of interconnection of renewable energy resources},
author={Wu, Di and Aldaoudeyeh, Al Motasem and Javadi, Milad and Ma, Feng and Tan, Jin and Jiang, John N and others},
journal={International Journal of Electrical Power \& Energy Systems},
volume={110},
pages={72--82},
year={2019},
publisher={Elsevier}
}
\end{filecontents*}
\documentclass[]{IEEEtran}
\usepackage[x11names]{xcolor}
\usepackage[sort&compress, numbers]{natbib}
\usepackage{hyperref}
\hypersetup{citecolor=DodgerBlue3, citebordercolor=DodgerBlue3, colorlinks=true}
\begin{document}
\cite{aldaoudeyeh2016,wu2019,wu2017}
\newpage
\bibliographystyle{IEEEtran}
\bibliography{sample}
\end{document}
答案2
这里有一个小问题,你不应该在 \cite{a,b,c} 中的逗号后留空格以获得所需的结果,并且应该包含包 sitesort.sty