Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the bibtex library to reference. Everything works fine but ideally I would like the reference section generated by bibtex to have the ordered number like \section{} generates.

For example,

\section{abstract}
\section{Intro}
\section{conclusion}
\section{reference}

would give a the labels 1,2,3,4 but I am using bibtex to generate the reference section:

 \section{abstract}
 \section{Intro}
 \section{conclusion}
 \bibliography{my_.bib_file_name}

This generates labels 1,2,3 but not the next number. Please let me know if there is a nice way to do this, thanks!

share|improve this question
    
What document class are you using? –  egreg Jan 1 '13 at 22:57
    
Thanks for the reply! The problem with \addcontentsline is that there is not an ordered number next to the entry in the TOC. @egreg i am using article as my document class. –  u-will-neva-no Jan 1 '13 at 23:48

1 Answer 1

up vote 5 down vote accepted

The tocbibind package can help you there. The option numbib will make the references into a ordinary section in the article class.

\documentclass{article}

\usepackage[numbib]{tocbibind}

\begin{document}

\section{Abstract}
\section{Intro}
\section{Conclusion}
\nocite{*}
\bibliographystyle{plain}
\bibliography{test}

\end{document}
share|improve this answer
    
nice! I found another way to do it also but do not understand how it is working. The code is shown here: \renewcommand{\refname}{\section{References}}. Thanks for everyone help! –  u-will-neva-no Jan 2 '13 at 0:27
4  
@u-will-neva-no I recommend against that: \refname is the title that shall be used for the references, and if no other language is used, this will be, well, References. Squeezing a \section into it will produce a a new section whereever this title for the references is used, and that is something quite undersirable. –  mafp Jan 2 '13 at 0:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.