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 ................................. 5Chapter 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 .............................. 1How do I format this table of content to look like the one is on the top.
3 Answers
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.
4You 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.
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 blaTOC:
TABLE OF CONTENTS
Heading_1..........1 Heading_2........1 Heading_2........2Go 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 blaTOC:
TABLE OF CONTENTS
1 Heading_1...........1 1.1 Heading_2.......1 1.2 Heading_2.......2Not 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.