When using the cite, bibuints, and hyperref packages together, there are no links from citations to the references list. How can I get the links to exist while keeping the default cite citation sorting and my customization on citepunct? Here's my MWE (you'll need your own "refs.bib" file with article1 and article2 entries):
\documentclass{report}
\usepackage{cite}
\usepackage{bibunits}
\usepackage{hyperref}
\renewcommand\citepunct{], [}
\renewcommand\citedash{]--[}
\begin{document}
\chapter*{Executive Summary}
\begin{bibunit}[ieeetr]
Second article~\cite{article2}.
\putbib[refs]
\end{bibunit}
\chapter{A Chapter}
First article~\cite{article1}.
Second article~\cite{article2}.
Both articles~\cite{article2,article1}.
\bibliographystyle{ieeetr}
\bibliography{refs}
\end{document}
I found similar questions on TeX StackExchange ([1], [2], [3]) that provide a solution to users using the natbib package, but these only partially work with cite. Specifically, when I apply the code from both answers in [1], the links work but I lose the custom citepunct rendering and the automatic sorting that cite performs when citing multiple references in the same \cite{} command. As such, \cite{article2,article1} renders as "[2, 1]" instead of the "[1], [2]" that my school requires. How can I overcome this? Thank you.
EDIT: My school uses a custom .bst (BibTeX style) file so I do not have the option of switching to BibLaTeX and Biber.
ieeetrstyle so I just used that in my MWE to keep it minimal. I updated the question to incorporate this aspect. Thank you. – possum Mar 11 '24 at 17:42\usepackage{cite}to\usepackage[numbers,square]{natbib}and (b) writing\cite{article1}, \cite{article2}to generate[1], [2]? BTW, your school's formatting requirements for citation call-outs are insane. I'm sure you're aware of this. – Mico Mar 11 '24 at 19:43natbibequivalent ofcite'scitedash; it's hard-coded on line #416 of natbib.sty (v. 8.31b) so I would need to branchnatbib. This affects having >2 citations appearing consecutively in the references list. For (b), I would need to sort all my multiple cites manually. Alternatively, I got the rightcitepunctwith package optionsnumbers,square,sort&compress,\setcitestyle{citesep={], [}}, and redefining\NAT@spacechar{}. It's doable once but not for improving the school's template, which I'd like to do. – possum Mar 11 '24 at 21:24etoolbox's\patchcmd, tested it, and found that worked! I probably would not have figured this out today without your help. Thank you! – possum Mar 11 '24 at 22:51