Hello,
I use the following packages:
%%%% Citations and Reference packages
\usepackage[sort&compress]{natbib}
\usepackage{chapterbib}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=green]{hyperref}
And I cite reference using the following:
\citep{ref1, ref2, ref3, ref4, ref5, ref6}
My reference appear in text as:
[1, 2, 3, 4, 5]
Not
[1-5]
As they should.
Anyone know why?
BibTeX, biblatex and biber ⇒ Sort&Compress Doesn't Compress
NEW: TikZ book now 40% off at Amazon.com for a short time.
Sort&Compress Doesn't Compress
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Sort&Compress Doesn't Compress
Here is as close to a MWE as you can get without me sending your my .bib file all the rest.
Code: Select all
%%%% Citations and Reference packages
\documentclass[a4paper,oneside,11pt,titlepage]{book}
\usepackage[sort&compress]{natbib}
\usepackage{chapterbib}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=green]{hyperref}
\begin{document}
\mainmatter
\chaper{One}
Reference \citep{Key1, Key2, Key3, Key4}. % Key1 - 4 refer to bibtek reference keys
%%%% References at End of Chapter
\clearpage
\addcontentsline{toc}{section}{References}
\bibliographystyle{ThesisBibStyle} % My style file created using custombib
\bibliography{references} % database of my references exsists in my root dir
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
Re: Sort&Compress Doesn't Compress
I realise that the problem is to do with hyperref.
When that package isn't included, it sorts and compresses fine.
Someone suggested using \usepackage{hypernat} to make them compatable.
http://www.tex.ac.uk/tex-archive/help/C ... ernat.html
However no matter which order I include this package in it throws up errors. Probably something do to with incompatability with chapterbib.
Plz help me sort this out.
When that package isn't included, it sorts and compresses fine.
Someone suggested using \usepackage{hypernat} to make them compatable.
http://www.tex.ac.uk/tex-archive/help/C ... ernat.html
However no matter which order I include this package in it throws up errors. Probably something do to with incompatability with chapterbib.
Plz help me sort this out.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Sort&Compress Doesn't Compress
Most recent we had a similar discussion regarding cite and hyperref [1]. I worked out an example with natbib that is working for me. You may test it and report the result. I assume the chapterbib package might be the cause for the misbehaviour.
[1] View topic: hyperref and cite
Best regards
Thorsten
[1] View topic: hyperref and cite
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10