6

I am currently using a cite package. In order to make the reference citation into [1-3] but I want to change the en dash to hyphen.

Here is my sample file:

\documentclass{article}
\usepackage{cite}

\begin{document}

\title{Sample File}
\date{}
\maketitle
\cite{CR1,CR2,CR3} - current output

[1-3] - required output
%I want my output to be hyphen not en dash

\begin{thebibliography}{00}

\bibitem{CR1}
Author 1, title, journaltitle , year

\bibitem{CR2}
Author 2, title, journaltitle, year

\bibitem{CR3}
Author 3, title, journaltitle, year

\bibitem{CR4}
Author 4, title, journaltitle, year

\end{thebibliography}
\end{document}
jeecabz
  • 1,448

1 Answers1

7

You can alter the output here using \citedash

\documentclass{article}
\usepackage{cite}
% \show\citedash % => \hbox {--}\penalty \citepunctpenalty
\renewcommand*{\citedash}{\hbox{-}\penalty\citepunctpenalty}
\begin{document}

\title{Sample File}
\date{}
\maketitle
\cite{CR1,CR2,CR3} - current output

[1-3] - required output
%I want my output to be hyphen not en dash

\begin{thebibliography}{00}

\bibitem{CR1}
Author 1, title, journaltitle , year

\bibitem{CR2}
Author 2, title, journaltitle, year

\bibitem{CR3}
Author 3, title, journaltitle, year

\bibitem{CR4}
Author 4, title, journaltitle, year

\end{thebibliography}
\end{document}

Here, I've kept the penalty that cite includes by default so that breaking at the hyphen is still discouraged.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036