使用 bibunits 包的精简参考

使用 bibunits 包的精简参考

我正在使用 bibunits 包在类似书籍的项目中的每一章末尾生成参考文献。但是,我不知道如何生成精简的引文,例如 [1-5],而不是 [1, 2, 3, 4, 5]。有人能帮我吗?

这是我的 MWE:

\documentclass[12pt, openright, twoside, a4paper, chapter=TITLE]{memoir}
\usepackage{lipsum}
\usepackage[sectionbib]{bibunits}
    \bibliographyunit[\chapter] %... activates each chapter as a local bibliography unit
    \defaultbibliographystyle{unsrt}
    \defaultbibliography{_bib}
    \renewcommand{\bibsection}{\section*{References}}

\begin{document}

\chapter{First chapter}
\section{Just a simple example}
In this paragraph I would like to cite the references.~\cite{Ref1, Ref2, Ref3}
However, I would like them to be compressed in the form [1-3], instead of [1, 2, 3].
Imagine how cumbersome gets when there are many many references, such as this case.~\cite{Ref1, Ref2, Ref3, Ref4, Ref5}
Don't you agree that it would be much nicer if it showed in the form [1-5]?
And what about the case of this citation?~\cite{Ref1, Ref3, Ref4, Ref5}
In my humble opinion, it would be nicer to have [1, 3-5] instead.
So, please, help me to figure it out.
Thank you very much!

\putbib
\end{document}

这是我的文件中的内容_bib.bib

@article{Ref1,
    title       = {Title of the Fisrt Reference},
    author      = {Author One Junior},
    journal     = {The Scientif Journal You Know},
    volume      = {1},
    number      = {10},
    pages       = {100},
    year        = {2001},
    }

@article{Ref2,
    title       = {Title of the Second Reference},
    author      = {Author Two Brilliant},
    journal     = {Guess it},
    volume      = {2},
    number      = {20},
    pages       = {200},
    year        = {2002},
    }

@article{Ref3,
    title       = {Third's Reference Title},
    author      = {Third Author McDonald},
    journal     = {The Journal of What},
    volume      = {3},
    number      = {30},
    pages       = {300},
    year        = {2003},
    publisher   = {The Scientif Journal You Know}
    }

@article{Ref4,
    title       = {And there it goes: fourth!},
    author      = {Bob Fourth Author},
    journal     = {Eureka},
    volume      = {4},
    number      = {40},
    pages       = {400},
    year        = {2004},
    }

@article{Ref5,
    title       = {Fifth and last one},
    author      = {Jack Have Five},
    journal     = {The Scientif Journal You Don't Know},
    volume      = {5},
    number      = {60},
    pages       = {500},
    year        = {2005},
    }

希望你们能解决这个问题。非常感谢!!

答案1

您可能需要cite软件包。在bibunits文档中,它说与软件包兼容cite

\usepackage{cite}

在此处输入图片描述

相关内容