参考引文从短划线变为连字符

参考引文从短划线变为连字符

我目前正在使用一个cite包。为了将参考文献引用改为 [1-3],但我想将短划线改为连字符。

这是我的示例文件:

\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}

答案1

您可以使用以下方式更改输出\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}

在这里,我保留了默认包含的惩罚,cite因此仍然不鼓励在连字符处断开。

相关内容