I had a problem in modifying abbrvnat.bst to have unsorted abbreviated reference list using natbib. Many thanks to @Marco Daniel for his great answer. He perfectly solved my problem by creating abbrvunsrtnat.bst.

Currently, I have a problem in compressing multiple citations by using abbrvunsrtnat.bst. For example, I am not able to see [8,17-20] when the citation list is [8,17,18,19,20]. I tried sort&compress option to natlib package but it did not change anything. I am using all these in classicthesis package.

As an example, the following code does not produce the compressed citation.

                twoside, openright, titlepage, numbers=noenddot, headinclude,
                footinclude=true, cleardoublepage=empty,
                BCOR=5mm, paper=letter, fontsize=11pt,
                ngerman, american,



The following is the resulted document.

enter image description here

Here is the log of \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
      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)
      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)
      mt-ppl.cfg    2005/11/16 v1.6 microtype config. file: Palatino (RS)

Could someone help me compress the citation list by using abbrvunsrtnat.bst?


The following works for me:



sample output

  • Thanks. Your code works perfectly. In my original question, I added a sample code which uses both natbib and classicthesis. Unfortunately, it does not produce a compressed citation.
    – user578
    May 21 '13 at 18:18
  • @Ahmad I compiled your sample code and it shows compressed citations. (classicthesis version 4.1)
    – mafp
    May 21 '13 at 18:53
  • I am using the same version but I don't get the compressed citation. Here is the information in the log file: Package: classicthesis 2012/08/12 v4.1 Typographic style for a classic-looking thesis. Could it be something else that prevents compression of citation?
    – user578
    May 21 '13 at 20:50
  • @Ahmad Sorry if I ask stupid things, but is your TeX installation up-to-date? I don't see any package that should interfere with natbib. You could put \listfiles at the very first line into your document. Then the log file will list all loaded packages with their versions. You could add this list to your question, and we can compare versions.
    – mafp
    May 21 '13 at 21:09
  • Thanks. It was my guess too. So I updated MiKTeX a few hours ago. However, I have added the file lists to the question.
    – user578
    May 21 '13 at 21:29

The problem was caused by wrong version of natbib, which was natbib.sty 2000/07/24 7.0a (PWD). I had to manually update it to natbib 2010/09/13 8.31b (PWD, AO). Another thing was that, I had installed jfm package which had natbib with the version 2000/07/24 7.0a (PWD) in its directory. I deleted the natbib.sty file in the jfm directory as it had conflict with the new version. After that it worked perfectly and my citations were nicely compressed.

Many thanks to the chat I had with @mafp.

Not the answer you're looking for? Browse other questions tagged or ask your own question.