GeneralNumbering Reference Section in TOC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
cheburns
Posts: 5
Joined: Sun Mar 08, 2009 9:50 pm

Numbering Reference Section in TOC

Post by cheburns »

So I'm pretty new to latex and am writing my thesis with it. I created a reference section with

\begin{thebibliography}{99}
\addcontentsline{toc}{section}{References}

so that it would be included in my table of contents. It is there, but it isn't numbered like all of the other major sections. ie the format

1 Intro
1.1 blah
1.2 blah
2 Paper
2.1 blah
2.1 blah
Reference

How can I either get rid of the main section numbering (while leaving the subsection 1.1 1.2 etc) or make it so the reference section gets numbered.

Thanks
Chris

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Numbering Reference Section in TOC

Post by localghost »

Assuming that you are using a standard class, I suggest to use the tocbibind package.

Code: Select all

\usepackage[nottoc,notlof,notlot,numbib]{tocbibind}
For other document classes there would be built-in features.


Best regards
thorsten¹
cheburns
Posts: 5
Joined: Sun Mar 08, 2009 9:50 pm

Re: Numbering Reference Section in TOC

Post by cheburns »

I added that line of code to the beginning of my document (in the preamble) and it didn't fix the problem and produced 2 Errors with the following message:

! LaTeX Error: File 'tocbibind.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:

! Emergency Stop.
<read *>

Any idea whats going on.

Thanks for the feedback
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Numbering Reference Section in TOC

Post by localghost »

Code: Select all

! LaTeX Error: File 'tocbibind.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:

! Emergency Stop.
<read *>
The error message already says it in the very first line. The package is not installed on your system. Start the package manager of your LaTeX distribution and install it.
Post Reply