General ⇒ Table of Contents problem
Table of Contents problem
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Table of Contents problem
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Table of Contents problem
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
Table of Contents problem
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.
Table of Contents problem
Good luck.