Page LayoutFormatting Table of Contents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
pooley343
Posts: 17
Joined: Mon Oct 20, 2008 2:53 pm

Formatting Table of Contents

Post by pooley343 »

Hello there,

I have some sections that are not numbered using the \section*{SECTION_NAME} command. But I want them to appear in the table of contents.

I have used the \addcontentsline{toc}{section}{SECTION_NAME} command which does add the correct section but the page number that it gives is that of the table of contents not the page the section is on.

Does anyone know why this is the case and/or can fix it.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
pooley343
Posts: 17
Joined: Mon Oct 20, 2008 2:53 pm

Re: Formatting Table of Contents

Post by pooley343 »

It's ok, I've solved it.

I had put the commands just before the \include tableofcontents command which is where is takes its reference.

By moving the command to just after the \section{} command then it picks up the correct page number.
Post Reply