I'm using the {thebibliography}{widest-label} enviroment and I would like to for the citation to appear like the following output:
code:
cite{1,2}
output:
[1-2]
I tried using a lot of packages but it is giving me errors.
My Code:
\documentclass[11pt, reqno]{jmcs-t}% cls. for J. Math. Comput. Sci.
\usepackage{amsmath, amsthm, amscd, amsfonts, amssymb, graphicx, color}
\usepackage[backref = true,colorlinks=true]{hyperref}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{xparse}
\begin{document}
\section{Introduction}
Multiple Citation cite{1,3}
\begin{thebibliography}{widest-label}
\end{thebibliography}
\bibitem{1} Author, \textit{Title}, Journal, {\bf 19} (Date), page--page.
\bibitem{2} Author, \textit{Title}, Journal., {\bf 19} (Date), page--page.
\bibitem{3} Author, \textit{Title}, Journal. Math., {\bf 19} (Date), page--page.
\end{document}
cite{1,3}
should be \cite{1,2,3}
\bibitems
need to be inside the thebibliography
environmenthyperref
after the other packageswidest-label
with the widest label, e.g. a single digit number like 3
in your example.\bf
should not be usednatbib
package, you can use the sort&compress
bib option:\documentclass[11pt, reqno]{jmcs-t}% cls. for J. Math. Comput. Sci.
\usepackage{amsmath, amsthm, amscd, amsfonts, amssymb, graphicx, color}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{xparse}
\biboptions{sort&compress}
\usepackage[backref = true,colorlinks=true]{hyperref}
\begin{document}
\section{Introduction}
Multiple Citation \cite{1,2,3}
\begin{thebibliography}{3}
\bibitem{1} Author, \textit{Title}, Journal, {\bfseries 19} (Date), page--page.
\bibitem{2} Author, \textit{Title}, Journal., {\bfseries 19} (Date), page--page.
\bibitem{3} Author, \textit{Title}, Journal. Math., {\bfseries 19} (Date), page--page.
\end{thebibliography}
\end{document}