
我剛開始學習如何使用 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}
因為它不認識它)
這不是你想要的嗎?