使用 bibtex、ieeetr 風格對引文進行分組

使用 bibtex、ieeetr 風格對引文進行分組

我正在使用bibtex, 和參考書目風格ieeetr來創建我的參考文獻。我已經閱讀了 IEEE 風格手冊,我知道我應該將引文放在單獨的括號中,例如,[3], [4]

然而,我知道它們在連續時應該用連字符連接,例如,以 3 個或更多為一組,[5]-[10]ieetr樣式似乎不會自動執行此操作。有任何想法嗎?我已經嘗試過使用該cite包。

微量元素:

\documentclass{article} 
\usepackage{cite} 
\begin{document} 
This is my text, and here are some citations \cite{article1}, \cite{article2}, \cite{article3}.
\bibliography{examplebib} 
\bibliographystyle{ieeetr} 
\end{document}

和圍脖檔案“examplebib.bib”

@article{article1,
  author    = {Doe, John},
  title     = {Title of article},
  journal   = {journal of article},
  year      = {2017},
  volume    = {11},
  number    = {1},
  pages     = {11--13},
  publisher = {Journal Publisher},
}
@article{article2,
  author    = {Doe, John},
  title     = {Title of article},
  journal   = {journal of article},
  year      = {2017},
  volume    = {11},
  number    = {1},
  pages     = {11--13},
  publisher = {Journal Publisher},
}
@article{article3,
  author    = {Doe, John},
  title     = {Title of article},
  journal   = {journal of article},
  year      = {2017},
  volume    = {11},
  number    = {1},
  pages     = {11--13},
  publisher = {Journal Publisher},
}

答案1

使用以下套件可以實現此引用樣式的近似值natbib

\usepackage[numbers,sort&compress]{natbib}
\setcitestyle{square,citesep={],[}}
\bibliographystyle{IEEEtranN}

然後你就可以使用\cite{article1,article3}get [1],[3]。然而,任何連續的範圍\cite{article1,article2,article3}仍然給出[1-3]。此行為是硬編碼的,如果不重新定義命令就無法更改\cite

另一種選擇是biblatexbiblatex-ieee包(請參閱這個答案為什麼babel需要):

\documentclass{article} 
\usepackage[english]{babel}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\addbibresource{examplebib.bib}

\begin{document}
This is my text, and here are some citations \cite{article1,article2,article3}.
\printbibliography
\end{document}

當您使用該套件的 1.2d 版本biblatex-ieee(來自CTAN)。壓縮不適用於 1.1n,這是我的 TeXLive 發行版提供的版本。

相關內容