Hi all,
I am a new LaTeX user - I use MikTeX and TeXnicCenter.
I used \tableofcontents command, and got the table of contents page with 'Contents' heading, but none of the sections are showing. The sections themselves were \sections and have been automatically numbered and all.
The same thing goes for \listoffigures. A blank page with only 'List of Figures' title appears.
What could have I done wrong? Please help!!!
SL
General ⇒ Table of Contents problem
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Table of Contents problem
I always use \addcontentsline{toc}{heading name(like section chapter etc.)}{title of section...}
you can also define a new command like
\newcommand{\chap}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
so that you can then add a chapter called Preliminaries by
\chap{Preliminaries}
That always forces it to work...also try to run latex twice to get the TOC references correct. Happens if you are using the \section*{} unnumbered version.
good luck!
you can also define a new command like
\newcommand{\chap}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
so that you can then add a chapter called Preliminaries by
\chap{Preliminaries}
That always forces it to work...also try to run latex twice to get the TOC references correct. Happens if you are using the \section*{} unnumbered version.
good luck!
Table of Contents problem
Thanks for your reply, but unfortunately it didn't work :( Still blank under 'Contents'lilbill wrote:I always use \addcontentsline{toc}{heading name(like section chapter etc.)}{title of section...}
you can also define a new command like
\newcommand{\chap}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
so that you can then add a chapter called Preliminaries by
\chap{Preliminaries}
That always forces it to work...also try to run latex twice to get the TOC references correct
good luck!
\tableofcontents or \addcontentsline or \listoffigures are supposed to work but they don't in my document.... :( :( :(
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Table of Contents problem
Hi leeau,
did you change the tocdepth counter? It determines what entries will be shown in the toc.
Do you have a line like
inside your code? Or could you post your document preamble here for examination?
Stefan
did you change the tocdepth counter? It determines what entries will be shown in the toc.
Do you have a line like
Code: Select all
\setcounter{tocdepth}{0}
Stefan
LaTeX.org admin
Table of Contents problem
Hi leeau,
If Stefan_K's suggestion does not work, then please post a minimal working example showing the undesired behaviour. Having relevant information about your code helps us to provide effective help.
If Stefan_K's suggestion does not work, then please post a minimal working example showing the undesired behaviour. Having relevant information about your code helps us to provide effective help.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Table of Contents problem
Check puntuation ( e.g. " _ [ etc are not allowed and though they impact funnily enough the toc generating process).
Good luck.
Good luck.