[Tex/LaTex] IEEEtran bibliography style won’t compress in-text citation

bibtexcitingieeetran

I cannot get IEEEtran in-text citations to format properly. I am getting citation compressions looking like [1-5] instead of [1]-[5] as it is in IEEE journals. I have bibliographies after each chapter so I'm using \usepackage{chapterbib}. Also, I could only get any citation compression with \usepackage[noadjust]{cite}. Without this, my citations would look like [1,2,3,4,5]. Any ideas on where I'm going wrong? I am using a custom document class instead of the IEEE class.

This is the code in the parent .tex file

\usepackage{chapterbib}    
\usepackage[noadjust]{cite}

This is the code within each chapter .tex

\cite{author1,author2,author3,author4,author5}

\bibliographystyle{IEEEtran}    
\bibliography{IEEEabrv,bibfile}

Best Answer

With \usepackage{chapterbib} and \usepackage{cite}, you can customize the in text citation with

\renewcommand\citeform[1]{[#1]}

\renewcommand\citeleft{}

\renewcommand\citeright{}

Answer graciously provided by Donald Arseneau