Table of contents does not include all heading levels

B

bhamgraham

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)

I used heading styles to create 5 levels of headings (I modified Heading 1->Heading 5 to match APA heading styles). I then created a TOC by modifying the classic TOC style. (Again, I modified this three level standard TOC to match APA's five heading levels.)

I went to the Insert menu, clicked "Index and Tables", clicked "Show levels" box, and selected "5" levels. In the preview box, I see all five levels of the TOC formatted correctly -- listing Heading 1, Heading 2, Heading 3, etc. in the correct places.

I also went to the "organizer" to confirm that all five heading levels were available to my document.

However, when I create (or update) the TOC, only the first two levels are included in the TOC.

How do I get the TOC to include all five levels of heading styles? I appreciate any help you may provide. I'm very frustrated!
 
R

Rob Schneider

I'm not sure what you mean by "create 5 levels of headings" and the
modifications you refer to. Do you have new heading styles, or are you
using the existing standard style names and just changing the formatting?

If with a new document, and no changes to styles, can you create a
document with 5 levels of styles and a corresponding TOC? You've
discovered the right place to define this: Menu: Insert/Index and
Tables, Tab: Table of Contents, Button: Options. However, I don't know
what you mean by "Organizer" as I am not familiar with that nomenclature
for driving Word.

--rms

www.rmschneider.com
 
C

CyberTaz

Have you re-examined the definitions of Heading 3, 4, & 5? It's possible
that the Levels assignment was altered during the editing of the Styles.

I'd also check to confirm that the correct Styles are actually applied to
the corresponding content.

If all appears to be in order there's a possibility that there is some
degree of corruption in the document. Do you have Track Changes turned on,
or are there unresolved changes still in the document?

Another consideration is whether your installation of Office is fully
updated (12.2.1).

I have a short (40-odd pages) document I've been testing with here & can't
repro what you're experiencing. All 5 levels are included in the TOC &
retained when updated -- even after making direct formatting changes to some
of the headings which have the Heading styles applied to them.

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
B

bhamgraham

I sent the following message to each of your e-mail addresses since this site doesn't allow screen shots. . .just in case, I'm posting it here as well.
--------------------------------------------------
Thank you so much for your replies, Rob and Bob. I am clearly not good at speaking in "tech terms," so I apologize if my explanation didn't make sense.

Bob. . .I think I've tried the formatting suggestions you make, but it is likely that I'm still missing something due to ignorance. (For example, I think I've "re-examined the definitions of headings 3, 4, and 5 via steps 1 and 8 below, but I'm not sure!) I will check to make sure that my version of Word is completely up to date. How do I check to see if there are "unresolved changes" in the document? Let me try again below with screen shots!

1. To create my heading styles, I used Heading 1 and Heading 2 from the styles that are immediately available (List: Available Styles) when you pull up "styles" via the "view --> formatting palette" menu. I modified each heading to match the formatting required by APA (first level centered bold, second level flush with left margin bold, etc.) Then, I clicked on the box that allows you to see ALL available styles (Lisa: All Styles). This provided a wider range of styles from which I could choose. There I found Heading 3, heading 4, and heading 5.

2. I added the appropriate heading style to each heading in my document. I used all five heading levels.

3. In the document elements area, I clicked on the first TOC style -- classic, I believe. Word created a table of contents including only the first two levels of headings and, of course, the TOC was formatted according to the standard classic style (since I hadn't modified it yet).

4. I went to the Insert menu, clicked "Index and Tables" and proceeded to modify each level of the TOC (TOC1 through TOC5) according to APA formatting (no boldface, all 12pt Book Antiqua font, each level indented .5" beyond the one above, etc.)

5. I changed the "tab leader" to "none."

6. I clicked "Show levels" box, and selected "5" levels. In the preview box, I see all five levels of the TOC formatted correctly -- listing Heading 1, Heading 2, Heading 3, etc. in the correct places.

7. I hit 'OK'

The program asked me if I wanted to update the entire table in my document, and I indicated that it should do so. The formatting changed appropriately, but still only 2 heading levels were included.

8. Based on advice from a fellow student, "Table of Contents Options" to make sure I labeled them 1, 2, 3, 4, 5 corresponding to heading 1, heading 2, . . .I clicked okay. (I tried to create a TOC with the "table entry fields" box check and unchecked. This did not seem to affect the outcome."

9. During one of my many attempts to create the TOC, a screen called "Organizer" appeared automatically -- it came up as the program was creating the TOC. One one side were styles available in my document and on the other were styles available in Normal. In the middle were three options -- copy, delete, or rename. I scanned both lists to confirm that Headings 1-5 were on both lists and then just hit "close."

I'm happy to send my document if you are able to look at it and help me. I warn you, though it is over 135 pages of academic writing. . .might put you to sleep before you can even begin to look over it. :)

Thank you, thank you, thank you for responding to my inquiry!

Warmly,
Lisa Graham
 
J

John McGhie

The key to this is to understand how a Table of Contents works.

As Bob says, there can only be three things wrong:

* Either the field codes have not been corrected to pick up levels 3, 4,
and 5, or
* the text in the document is not formatted with Headings 3, 4, and 5, or
* someone has stuffed up Headings 3, 4, and 5 so they are NOT "Level 3",
Level 4" or "Level 5".

1) Start by checking the field codes in the TOC field. Right-click the
Table of Contents, and you should see something like:
{ TOC \o "1-5" \h \z \u }

You can change it to be simply:
{ TOC \o "1-5" }

Warning: Change the text inside the braces, but be careful not to damage
the braces themselves. They're not braces, they are "Field Bounding
Characters" ‹ typed braces won't work.

To understand what you are doing, you need to look up the field codes for
the TOC field.

One of the major bugs in Word 2008 is that the documentation is woefully
incomplete. The description of the hundreds of field codes is entirely
missing from the Help. The Word 2003 topic is quite sufficient for this
purpose, and it is here:
http://office.microsoft.com/en-us/word/HP051861971033.aspx

On that web page, expand the two plus signs to show the "Instructions" and
"Switches" and all of a sudden you will become an expert in Word Tables of
Contents :)

2) The next thing to check is the actual headings in the text for levels 3,
4, and 5 to make sure that the paragraph (including the paragraph marker at
the end) is in fact formatted with "Heading 3" style.

There's a major bug in the design of Word's formatting mechanism: if you
have some text selected, but not a whole paragraph, when you apply a style,
Word applies a fake style that doesn't work. If this has happened, simply
re-apply the correct style, taking care to select the whole paragraph.

3) If that appears correct, then check the formatting of Headings 3, 4, and
5. Use Format>Style>Modify>Paragraph... You will see a drop-down labelled
"Outline Level" at the top right. It should be greyed out, and the number
should match the Heading style name, so Heading 4 should have an Outline
Level 4 showing.

If the box is not greyed out, or it's not showing Outline Level 4, then what
you are looking at is a fake style. Reformat the text to which it is
applied with the "real" Heading 4, then delete the fake one from the
document styles list. (Note: replace it first, then delete the bad one,
otherwise when you delete the bad style, everything formatted with it will
turn to Normal style).

You can actually use that effect: when I am hunting these problems, I
temporarily turn Normal style bright pink. Since I never use Normal style
in a document, all the bad formatting instantly turns flaming pink and I can
see it easily.

There you go: There can be only three causes for the effect you are seeing.
I have listed them in order of likelihood :)

Cheers


Version: 2008
Operating System: Mac OS X 10.5 (Leopard)

I used heading styles to create 5 levels of headings (I modified Heading
1->Heading 5 to match APA heading styles). I then created a TOC by modifying
the classic TOC style. (Again, I modified this three level standard TOC to
match APA's five heading levels.)

I went to the Insert menu, clicked "Index and Tables", clicked "Show levels"
box, and selected "5" levels. In the preview box, I see all five levels of the
TOC formatted correctly -- listing Heading 1, Heading 2, Heading 3, etc. in
the correct places.

I also went to the "organizer" to confirm that all five heading levels were
available to my document.

However, when I create (or update) the TOC, only the first two levels are
included in the TOC.

How do I get the TOC to include all five levels of heading styles? I
appreciate any help you may provide. I'm very frustrated!

This email is my business email -- Please do not email me about forum
matters unless you intend to pay!

--

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 
R

Rob Schneider

Lisa,

No email received.

Why are you "creating" heading styles? The styles should already exist.
All you have to do is apply the styles to a paragraph.

Did you try the experiment I suggested so that you can learn how TOC's
work. I'll be more explicit.

1. Open a new document
2. at the top, put in the text "=rand(5,5)" (without quote marks to
enter random text
3. At the beginning of each paragraph enter a heading paragraph
4. Apply Heading 1, Heading 2, heading 3, Heading 4, and Heading 5
styles to these new paragraph.
5. At the top of the document create an empty paragraph
6. Menu: Insert/Index and Tables, Tab: Table of Contents, Button:
Options. Put, in sequence, a 1, 2, 3, 4, and 5 respectively in for ach
of the Heading 1 to 5 style names.
7. Press OK twice.

Does this create a TOC?
If No ... then
a. you did not do as above, or
b. there is indeed a bug with Word

If Yes ... then learn from that.

Make sense?

Editorial notes: isn't 5 levels of styles excessive. Hard for the
reader to "stack" up the hierarchy while reading. Some of the best
technical writing in the world has no more than 3.

--rms
 
J

John McGhie

Hi Lisa:

I sent the following message to each of your e-mail addresses since this site
doesn't allow screen shots. . .just in case, I'm posting it here as well.

That's good thinking: if it has ANYTHING other than unformatted text in it,
my Virus and Spam filters will simply dump it, sight unseen :)
3. In the document elements area, I clicked on the first TOC style -- classic,
I believe. Word created a table of contents including only the first two
levels of headings and, of course, the TOC was formatted according to the
standard classic style (since I hadn't modified it yet).

In my judgement, you should steer clear of all those Document Elements.
They tend to use ill-advised techniques that can display strange
side-effects at the least convenient moment.

Instead, insert a Table of Contents using Insert>Index and Tables>Table of
Contents...

Now this bit is IMPORTANT: Choose the "From Template" style!!

Again, due to slackness, this is NOT documented, but if you use ANY style
other than "From Template" you cannot control the TOC. Word will replace
the TOC every time it regenerates it, wiping out any changes you have made.

This mechanism, and the whole of the "Elements Gallery" come from the "You
poor silly little things, you can't understand complicated things like word
processors, step out of the way and we will do this for you!!" School of
Software Design.

The nadir of this design was Windows Vista and Office 2007. I hope the
experience has been sufficiently painful (I don't think they "sold" more
than ONE copy of either to any businesses...) that Microsoft has learned
NEVER to do this again :)

If you use Insert>Index and Tables>Table of Contents, you actually insert
the raw TOC field I described in my previous post. From that moment, YOU
are fully in control :)
4. I went to the Insert menu, clicked "Index and Tables" and proceeded to
modify each level of the TOC (TOC1 through TOC5) according to APA formatting
(no boldface, all 12pt Book Antiqua font, each level indented .5" beyond the
one above, etc.)

You can't do that, unless your TOC is "From Template" style. From Template
stores the formatting of the TOC in the document. The other styles
overwrite the formatting each time they update.
6. I clicked "Show levels" box, and selected "5" levels. In the preview box, I
see all five levels of the TOC formatted correctly -- listing Heading 1,
Heading 2, Heading 3, etc. in the correct places.

I think if you choose a TOC from the Document Elements Gallery, some of
these settings are also overwritten. So your TOC field may have been reset
to only two levels...
8. Based on advice from a fellow student, "Table of Contents Options" to make
sure I labeled them 1, 2, 3, 4, 5 corresponding to heading 1, heading 2, . .

They were correct: that is a good idea. You do not have to, but things can
become a bit complicated if you do not :)
(I tried to create a TOC with the "table entry fields" box
check and unchecked. This did not seem to affect the outcome."

It won't, unless you have Table Entry Fields (TC Fields) in the document.
You haven't. You don't need them. And they are not documented. They are
very rarely useful. Uncheck the box, and forget about them :)
9. During one of my many attempts to create the TOC, a screen called
"Organizer" appeared automatically -- it came up as the program was creating
the TOC. One one side were styles available in my document and on the other
were styles available in Normal. In the middle were three options -- copy,
delete, or rename. I scanned both lists to confirm that Headings 1-5 were on
both lists and then just hit "close."

Organiser is a style management tool. Remember it is there, bit it is the
subject of a different course, so can we leave it aside for now? It will
never open "automatically", you have to call it up.
I'm happy to send my document if you are able to look at it and help me. I
warn you, though it is over 135 pages of academic writing. . .might put you to
sleep before you can even begin to look over it. :)

No, that's just a little one. The things we do for a living can be ten
times that size :)

I don't think you need to send the document. I think you have enough
information now to fix it yourself.

If not, email it to me, zipped, as an attachment, and I will take a look.

Cheers

This email is my business email -- Please do not email me about forum
matters unless you intend to pay!

--

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 
C

CyberTaz

John's experience here is far more extensive than mine so I will defer to
his expertise. One thing I'd interject, though: Simply based on the fact
that I haven't had the opportunity to prove otherwise :) I'm wondering if
the fact that you initially used the TOC generator in the Elements Gallery
might not be having some influence here... Especially since the Style
variations you've introduced don't comply with the default definition of the
built-in Style of the same name. That may be why the Organizer stuck its
nose in somewhere along the way.

Before you go to the extent of trying to 'fix' the current monster I think I
might first get rid of it altogether. Then use the conventional Insert>
Index & Tables method & see if you have success. If nothing else that may
help as a diagnostic tool to better identify where the real problem lies.

Regards |:>)
Bob Jones
[MVP] Office:Mac
 

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