omit page number for Heading 7

A

Associates

Hi,

I was trying to omit page number for Heading 7 level 7 in my TOC but to no
avail. I want all levels to show their page number except for Heading 7.

Heading 7 is used for appendixes.

So basically this is what i would like to see in the table of contents

Chapter 1 Introduction ...........................1
....
Chapter 7 Conclusion .............................8
Appendix A Fuel Consumption Charts

So far i have tried to modify the following field by adding '\n' but to no
success

{ TOC \o "1-3" \h \z \t "Heading 7,1" \n 7-7 }

Any helps would be greatly appreciated.

Thank you in advance
 
S

Stefan Blom

The \n switch is used to omit page numbering for the specified *TOC level*.
In your case, it doesn't work since you are setting Heading 7 to be
displayed at level 1. Instead, you will have to map Heading 7 to a different
level and omit the numbering for that level. To have Heading 7 appear in the
TOC as a level 1 entry, you would then have to redefine the corresponding
TOC style to have the desired indent (and other settings).
 
A

Associates

Thanks for your reply.

I tried it with Heading 4 and it actually worked. However, for some reason,
it's been moved as if it was tabbed to the right by small margin as shown
below

Table of Contents

Chapter 1 abbbcncnc......................1
Chapter 2 afsfsfsasafsf...................2
....
Chapter 7 fassdfsfsfsf.....................3
Appendix A fasfsfasfs

I did not get the page number for the Appendix but it's as if it's been tabbed

What i did was as follows
{ TOC \o "1-4" \n 4-4 \h \z \t }

Any reason why it's not been aligned to the left just like the Chapter ones?

Thank you in advance
 
A

Associates

Thanks Stefan,

It works by setting the left margin to 0 cm as suggested by you. However i
just realised that i will have to add '\n' switch to the TOC code by hand. I
am not sure how to solve this. The thing is I have a several autotexts that
are made of templates. For example, i have autotexts called reportcoverpage,
autotexts called Chapters and so on. Then, i have a template called
reportgenerator.dot.

What this reportgenerator template does is to insert the autotexts selected
by user via userforms into the report document in orderly fashion.

In the reportcoverpage template, i have modified TOC so that it includes the
'\o' switch in the code and have it inserted as autotext called
reportcoverpage.

However, when running the reportgenerator template, it appeared that '\o'
switch was no longer there but instead, it only had { TOC \o "1-4" \h \z }.
The code got changed. I wonder if there are any ways to get around this issue.

Thank you in advance
 
S

Stefan Blom

One way is to save the TOC field itself as an AutoText entry; you can then
insert the AutoText whenever it is needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top