[texhax] Reference format [5-7]

bnb at ams.org bnb at ams.org
Fri Jul 11 17:06:22 CEST 2014


On Fri, 11 Jul 2014, Mike Makai wrote:

    I am using amsbook style, and my problem is how coud make consequtive references to items 5,6, and 7 appear as [5-7] in the printed text. The main point: the hyphen should be within the \left [ and \right]. 

the cite package will do what you want.
here's a test file that demonstrates it.

\documentclass{amsbook}
\usepackage{cite}
\begin{document}
Here we want to cite several consecutive items:
\cite{d,e,f}
\bibliographystyle{amsplain}
\begin{thebibliography}{10}
\bibitem{a} Dummy bib item 1.
\bibitem{b} Dummy bib item 2.
\bibitem{c} Dummy bib item 3.
\bibitem{d} Dummy bib item 4.
\bibitem{e} Dummy bib item 5.
\bibitem{f} Dummy bib item 6.
\bibitem{g} Dummy bib item 7.
\end{thebibliography}
\end{document}

just be aware that if your cites are grouped,
they won't be linked separately if you're also
using hyperref.
						-- bb



More information about the texhax mailing list