没有自动生成带参考的数字

没有自动生成带参考的数字

我刚刚开始学习如何使用 LaTeX。

我在 Win7 上使用 Texmaker4.0.1 和 MiKTeX2.9。

一切都很好,直到我到达引用部分。我试图在每个引用项前面获取一个序列号,但它不起作用。

这是我的代码:

\documentclass[11pt]{article}
\usepackage{colacl}
\usepackage[numbers]{natbib}
\sloppy

\title{Report}
\author{Z.Pyyyy}

\begin{document}
\maketitle
\begin{abstract}
Hello, world.
\end{abstract}

\section{Chapter 1}
Text, Text\cite{Pan}.

\begin{thebibliography}{100}
  \bibitem{Boney96} Boney, L., Tewfik, A.H., and Hamdy, K.N., ``Digital Watermarks for Audio Signals," \emph{Proceedings of the Third IEEE International Conference on Multimedia}, pp. 473-480, June 1996.
  \bibitem{MG} Goossens, M., Mittelbach, F., Samarin, \emph{A LaTeX Companion}, Addison-Wesley, Reading, MA, 1994.
  \bibitem{HK} Kopka, H., Daly P.W., \emph{A Guide to LaTeX}, Addison-Wesley, Reading, MA, 1999.
  \bibitem{Pan} Pan, D., ``A Tutorial on MPEG/Audio Compression," \emph{IEEE Multimedia}, Vol.2, pp.60-74, Summer 1998.
\end{thebibliography}

\end{document}

我得到了这样的结果:

Report
Z.Pyyyy

Abstract
Hello, world.

Chapter 1
Text, Text[4].

Reference
Boney, L., Tewfik, A.H., and Hamdy, K.N., "Digital Watermarks for Audio Signals", Proceedings of the Third IEEE International Conference on Multimedia}, pp. 473-480, June 1996.
Goossens, M., Mittelbach, F., Samarin, A LaTeX Companion, Addison-Wesley, Reading, MA, 1994.
Kopka, H., Daly P.W., A Guide to LaTeX, Addison-Wesley, Reading, MA, 1999.
Pan, D., ``A Tutorial on MPEG/Audio Compression," IEEE Multimedia, Vol.2, pp.60-74, Summer 1998.

我希望它是这样的:

...
Reference
[1] Boney, L., Tewfik, A.H., and Hamdy, K.N., "Digital Watermarks for Audio Signals", Proceedings of the Third IEEE International Conference on Multimedia}, pp. 473-480, June 1996.
[2] Goossens, M., Mittelbach, F., Samarin, A LaTeX Companion, Addison-Wesley, Reading, MA, 1994.
[3] Kopka, H., Daly P.W., A Guide to LaTeX, Addison-Wesley, Reading, MA, 1999.
[4] Pan, D., ``A Tutorial on MPEG/Audio Compression," IEEE Multimedia, Vol.2, pp.60-74, Summer 1998.

有人能帮帮我吗?

PS:还有一个快速问题,参考文献和引文有什么区别?

答案1

colacl您在代码中加载的包会阻止任何引用编号,thebibliography因为它重新定义了\@biblabel。以下内容通过 覆盖了该重新定义colacl.sty

在此处输入图片描述

\documentclass[11pt]{article}

\usepackage{colacl}
\usepackage[numbers]{natbib}

\makeatletter
\def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}
\makeatother

\sloppy
\title{Report}
\author{Z.Pyyyy}

\begin{document}
\maketitle
\begin{abstract}
Hello, world.
\end{abstract}

\section{Chapter 1}
Text, Text\cite{Pan}.

\begin{thebibliography}{100}
  \bibitem{Boney96} Boney, L., Tewfik, A.H., and Hamdy, K.N., ``Digital Watermarks for Audio Signals," \emph{Proceedings of the Third IEEE International Conference on Multimedia}, pp. 473-480, June 1996.
  \bibitem{MG} Goossens, M., Mittelbach, F., Samarin, \emph{A LaTeX Companion}, Addison-Wesley, Reading, MA, 1994.
  \bibitem{HK} Kopka, H., Daly P.W., \emph{A Guide to LaTeX}, Addison-Wesley, Reading, MA, 1999.
  \bibitem{Pan} Pan, D., ``A Tutorial on MPEG/Audio Compression," \emph{IEEE Multimedia}, Vol.2, pp.60-74, Summer 1998.
\end{thebibliography}

\end{document}

答案2

我编译了你的代码,得到了这个......

\usepackage{colacl}(因为它无法识别它,所以我必须发表评论)

这难道不是你想要的吗?

你的代码

相关内容