I want to access the reference number directly, without making use of natbib or bibtex, but it doesn't work, it always adds the brackets [] around the number.
The reason: for multiple citations it is nice to write [1-3] instead of [1,2,3]. How can I get [1-3] with thebibliography alone?
// solution: adding the package cite via \usepackage{cite}
in the preamble automatically converts citations from [1,2,3] to [1-3] which is what I wanted.
Here is the MWE:
\documentclass[12pt, letterpaper]{article}\usepackage[colorlinks=true]{hyperref}\begin{document}Here is a sentence that refers to Refs.~\cite{ref1,ref2,ref3}.I would also like to refer to these references as [1--3].The closest I can get is \cite{ref1}--\cite{ref3}.\begin{thebibliography}{5pt} \bibitem{ref1} J.~Doe, Some title 1. \bibitem{ref2} J.~Doe, Some title 2. \bibitem{ref3} J.~Doe, Some title 3.\end{thebibliography}\end{document}