使用 abbrvunsrtnat.bst 压缩多个引用时出现问题

使用 abbrvunsrtnat.bst 压缩多个引用时出现问题

abbrvnat.bst我在修改使用未分类的缩写参考列表时遇到了问题natbib。非常感谢@Marco Daniel他的精彩回答。他通过创建完美地解决了我的问题abbrvunsrtnat.bst

目前,我在使用 压缩多个引文时遇到了问题abbrvunsrtnat.bst。例如,我无法看到[8,17-20]引文列表[8,17,18,19,20]。我尝试了packagesort&compress选项natlib,但没有任何改变。我在classicthesispackage 中使用了所有这些。

例如,以下代码不会产生压缩引用。

\documentclass[
                twoside, openright, titlepage, numbers=noenddot, headinclude,
                footinclude=true, cleardoublepage=empty,
                BCOR=5mm, paper=letter, fontsize=11pt,
                dottedtoc,
                ngerman, american,
                ]{scrreprt} 
\usepackage[position=t,singlelinecheck=off,font={it}]{subfig}
\usepackage[eulerchapternumbers,
                    listings,
                    pdfspacing,
                    subfig,
                    beramono,
                    parts]{classicthesis}

\usepackage[numbers,sort&compress]{natbib}

\begin{document}
\cite{article-full,book-full,misc-full}
\bibliographystyle{abbrvunsrtnat}
\bibliography{Ahmad}
\end{document}

以下是结果文档。

在此处输入图片描述

以下是日志\listfiles

*File List*
    scrreprt.cls    2012/07/29 v3.11b KOMA-Script document class (report)
    scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent ba
    sics and keyval usage)
     scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent 
    basics and keyval usage)
      keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
    scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)
    tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)
    scrsize11pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (11pt)
    typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)
      subfig.sty    2005/06/28 ver: 1.3 subfig package
     caption.sty    2013/04/14 v3.3-73 Customizing captions (AR)
    caption3.sty    2013/04/14 v1.5-71 caption3 kernel (AR)
    classicthesis.sty    2012/08/12 v4.1 Typographic style for a classic-looking th
    esis
      ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
    listings.sty    2007/02/22 1.4 (Carsten Heinz)
     lstmisc.sty    2007/02/22 1.4 (Carsten Heinz)
    listings.cfg    2007/02/22 1.4 listings configuration
       ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
    hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
    hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
    hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
      hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)
    infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
    ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
      ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
     intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
    etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
    kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
    kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
    pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
    pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
    bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
      bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
    uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
    letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
     hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)
    xcolor-patch.sty    2011/01/30 xcolor patch
    atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
    atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
    refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
     hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
     ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
     auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
    kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
      pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
    hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
         url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
     hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
    rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
      xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
       color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
      pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
    dvipsnam.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
    mathpazo.sty    2005/04/12 PSNFSS-v9.2a Palatino w/ Pazo Math (D.Puga, WaS) 
    beramono.sty    2004/01/31 (WaS)
    microtype.sty    2013/03/13 v2.5 Micro-typographical refinements (RS)
    microtype-pdftex.def    2013/03/13 v2.5 Definitions specific to pdftex (RS)
    microtype.cfg    2013/03/13 v2.5 microtype main configuration file (RS)
    booktabs.sty    2005/04/14 v1.61803 publication quality tables
    textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)
    scrpage2.sty    2010/04/22 v2.5 LaTeX2e KOMA-Script package
    titlesec.sty    2011/12/15 v2.10.0 Sectioning titles
     tocloft.sty    2013/05/02 v2.3f parameterised ToC, etc., typesetting
     scrtime.sty    2012/07/29 v3.11b KOMA-Script package (time of LaTeX run)
    remreset.sty    
      natbib.sty    2000/07/24 7.0a (PWD)
     ot1pplj.fd    2004/09/06 font definitions for OT1/pplj.
     nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
    gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
       alaki.out
       alaki.out
    supp-pdf.mkii
      mt-ppl.cfg    2005/11/16 v1.6 microtype config. file: Palatino (RS)
       alaki.bbl

有人可以帮助我使用压缩引用列表abbrvunsrtnat.bst吗?

答案1

以下对我有用:

\documentclass{article}
\usepackage[numbers,sort&compress]{natbib}

\begin{document}
\cite{article-full,book-full,misc-full}
\bibliographystyle{abbrvunsrtnat}
\bibliography{Ahmad}
\end{document}

示例输出

答案2

问题是由 的错误版本引起的natbib,即natbib.sty 2000/07/24 7.0a (PWD)。我不得不手动将其更新为 natbib 2010/09/13 8.31b (PWD, AO)。另一件事是,我安装了目录中带有版本jfm的软件包。我删除了目录中的文件,因为它与新版本冲突。之后它运行正常,我的引文被很好地压缩了。natbib2000/07/24 7.0a (PWD)natbib.styjfm

非常感谢与@mafp 的聊天。

相关内容