Questions tagged [table-of-contents]

{table-of-contents} is about the creation or modification of the Table of Contents or similar listings like List of Figures and List of Tables as well as custom lists. Popular packages are {tocloft}, {titletoc}, {tocbasic}, {minitoc} and {etoc}.

Contents

  1. What's the ToC ................................................ 1
  2. How to ToC ..................................................... 2
    • Customizing the ToC ......................................... 3

What's the ToC

The Table of Contents, usually shortened as just ToC, is a list of all document divisions (usually just the numbered ones but this can be ovrerriden) used in the current document.

How to ToC

In LaTeX, the ToC it's generated by the \tableofcontents command. Its default format is defined by the class being used although such format can be customized. The tag is about creation and/or modification of not just the ToC but also similar lists like List of Figures (LoF) and List of Tables (LoT) which are lists of the all numbered captioned float types in the document, so all floats can have its own list.

Customizin the ToC

Popular packages for formattin the ToC are: , , and . Also the class provides out-of-the-box macros to customize such Lists, therefore without need of the former listed packages. The KOMA-Script classes () uses package to customize such Lists. is similar to but uses a different strategy and does not support other ToC like content such as LoF and LoT.

7188 questions
94
votes
3 answers

Insert list of figures in the table of contents

Is it possible to create a list of all the figures at the end of a document (this I can do) and make it appear in the table of contents? So in the the table of content there will be a line saying List of figures ... 19 for example?
lpostula
  • 1,391
66
votes
1 answer

Setting TOC depth not working

I'm using a \documentclass[11pt]{book} document. I have tried to define a TOC with a maximum depth of 4 with: \setcounter{secnumdepth}{4} \setcounter{tocdepth}{4} \tableofcontents The resulting pdf document doesn't take into account my setting and…
65
votes
1 answer

How to hide/show section levels in the table of contents?

I have a table of contents (\tableofcontents) in my document. How can I hide subsections in it? I want that only names of sections are displayed there.
Lucky_girl
  • 1,365
34
votes
1 answer

Table of Contents with additional description of entries

I would like to achieve table of contents with additional description for chapters/sections (see screenshot). What way would you go to achieve this? I'm wondering if it is possible to wrap the \chapter, \section etc. commands with custom taking 2…
Jakub
  • 553
33
votes
2 answers

How can I reproduce this beautiful table of contents?

I stumbled upon this TOC today: I really like its structure and simplicity. The page numbers are right behind the entries, and not unnecessarily remote as they often are. The separation between chapter numbering on the left and titles on the right…
Ingo
  • 20,035
29
votes
2 answers

How to get lines with dots in the table of contents for sections?

Possible Duplicate: Changing the TOC style of an Article document-class When I use \tableofcontents, It uses ... as a filler between title and page number for subsections, How I can force it to fill space between title of sections and page…
Real Dreams
  • 8,298
  • 12
  • 56
  • 78
28
votes
2 answers

Making a table of contents for a book

I'd like to know how to create a table of contents in LaTeX. For example, if I were to write a book, I would want something like this Contents Chapter 1 1.1 Real Analysis .............. 1 1.2 Role of LUB Axiom........... 3 How do I…
Chandru1
27
votes
1 answer

Adding the word "APPENDIX" to Table of Contents in LaTeX

My appendix style looks like this: \newboolean{@@inappendix} \newcommand{\@@appendixname}{Appendices} \renewcommand{\appendix}{\par \setboolean{@@inappendix}{true} \setcounter{chapter}{0}% \setcounter{section}{0}% % …
user1215357
27
votes
4 answers

Is there an easy way to tag content in a LaTeX document?

I am writing a document which will contain many small (approximately a page) snippets of text, potentially organized in sections or subsections. To each such section, I would like to attach several "tags" from a predefined list. At a different place…
26
votes
2 answers

How do I add dots in TOC?

I want to add dots that would fill the space from section/subsection name to the page number in TOC. How do I do that?
user1996
25
votes
3 answers

Two tables of content

See the min expl below. I would like to have two ToC: one giving only the rough structure of the document and a second one giving all the details down to subsubsections. The code pasted below should do just that but the second ToC is not displayed…
lpdbw
  • 8,330
21
votes
1 answer

How to force a Table of Contents to start new page

My table of contents is around 1 and 2/3 pages long, but the first page ends with 6.8 The Forecast . . . . . . . . . . . . . 54 7 Quality Control 57 7.1 Process Control . . . . . . . . . . . . . 57 But I would like the 7 Quality Control to start…
DannyBland
  • 1,141
19
votes
2 answers

Adding the preface to contents

I'm trying to add the preface to the contents along with the page on the far right. I had written it as following: \chapter*{Preface} but it does not appear on the contents. If I write it as \chapter{Preface} then it would be the first chapter of…
Tolaso
  • 193
19
votes
2 answers

How to include table of contents into a table of contents

I would like to know how to include table of contents into a table of contents.... I have an example of how to spoof it into the toc - using \phantomsection - but it seems like when i have a long document the link goes a bit wrong - ie. it links to…
JPH
  • 557
  • 1
  • 4
  • 13
17
votes
3 answers

TOC Text - numbers alignment

I am using \tableofcontents to create TOC in my document. however it is appearing as shown in the image. As the numbers increase the gap between the number and text is reducing. Thanks for your help Aku
Aku
  • 11,026
1
2 3
66 67