4

I am trying to format my report in following way using automatic TOC

Table of Contents

Chapter 1: Introduction to PHP ..................... 1

   1.1. Introduction .............................. 1
   1.2. Variables ................................. 5

Chapter 2: Loops ................................... 15

Contents

Chapter 1

Introduction to PHP

Introduction (Sub heading)

Everything is perfect except formating the TOC. Currently the table of contents looks like

Table of Contents
   Chapter 1: ......................................... 1
   Introduction to PHP ................................ 1
       1.1. Introduction .............................. 1

How do I format this table of content to look like the one is on the top.

3 Answers 3

-1

I'm pretty sure you can just edit it yourself in that little blue thingy or there should be an option to convert it to text.

4
  • 1
    Yes, I can do it but then when I update it next time all changes will be lost :)
    – Maximus
    Sep 1, 2010 at 18:07
  • 1
    Ah yes...I remember that from when I tried that. Best idea is to finish your report before you do any formatting crap...
    – digitxp
    Sep 1, 2010 at 18:26
  • I don't see how this could work, if you update your table, the changes will be lost Nov 3, 2011 at 22:05
  • This is a mere workaround, not a solution, @Wayne Johnston's solution is Ok though.
    – Vinzz
    Oct 9, 2012 at 13:20
3

You can edit the table styles. Each time you generate the Table of Contents (TOC) it will use the new style.

  • Select the References Tab and click Table of Contents
  • Select the Insert New Table of Contents from the bottom of the menu.
  • Choose the Format that's the best match for what you want as a starting point
  • If you want to make more changes, click Modify
  • Select the level of the TOC that you want to change; there is one for each level in the TOC
  • Click Modify (on the second dialog)
  • Change the formatting of the style. You can do a lot from this dialog, but if you need more control, click the Format button at the bottom.
  • Click OK to save the changes.
  • Repeat for other levels of the TOC.

Later on if you want to modify the styles, you can do this from the Styles dialog. Press Ctrl+Alt+Shift+S or click on the thingy in the lower right corner of the Styles tool on the Home tab.

If you wind up creating a lot of documents where you want the same styles, you can create your own template file. You can save styles in a template file so when you create a new document all those styles will be available to you.

0

With this solution, you will have numbers on both heading and in table of contents.

Before:

Content of document:

Heading_1
  Heading_2
    bla bla bla
    bla bla bla

  Heading_2
    bla bla bla
    bla bla bla

TOC:

TABLE OF CONTENTS
Heading_1..........1
  Heading_2........1
  Heading_2........2

Go to home > click the little arrow next to the multi-level list icon > choose a style under List library.

Then go to References > Table of contents > Automatic table 1 or 2, or refresh your table.

You should have this:

Content of document:

1 Heading_1
  1.1 Heading_2
    bla bla bla
    bla bla bla

  1.2 Heading_2
    bla bla bla
    bla bla bla

TOC:

TABLE OF CONTENTS
1 Heading_1...........1
  1.1 Heading_2.......1
  1.2 Heading_2.......2

Not that if your table of contents is numbered (so your first heading_1 starts at 2), you can do the folowing:

select the TABLE OF CONTENT text in your TOC > right click > unselect the numbering icon. Then update your table.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .