Custom Table of Contents

R

Robert R. Rahl

Version: MS Word for Macintosh 11.4.2
Operating System: Mac OS X 10.3.9 (Panther)
Processor: PowerPC G4

I am trying to create a customized Table of Contents using two styles,
the built-in Heading 1 and a custom style named Chapter. A typical
chapter starts out, for example, "Chapter 1" (formatted using the style
Chapter) followed by a paragraph mark, then "Childhood" formatted using
style Heading 1.

I would like the TOC to display as follows.

Chapter 1 Childhood...........................3
Chapter 2 Adolescence........................12
Chapter 3 Adulthood..........................21
Chapter 4 Old Age............................30
Epilogue Hereafter...........................39

I have modified the TOC field code as follows:

{ TOC\t"Chapter,1,Heading 1,1"}

This results in the following output.

Chapter 1............................3
Childhood............................3
Chapter 2...........................12
Adolescence.........................12
Chapter 3...........................21
Adulthood...........................21
Chapter 4...........................30
Old Age.............................30
Epilogue............................39
Hereafter...........................39

Is there any way to get the two styles to appear on the same line?

Any help is appreciated.

Robert
 
D

Daiya Mitchell

Hi Robert,

As you have it set up, you would have to manually edit the TOC to get
them on the same line. They are two different entries, so Word puts them
on two separate lines. There's no way to tell Word "these are really two
halves of the same entry even though the computer code clearly says they
are two different things but I need Word to pretend that isn't so."

I'd suggest a different approach--and I'd mess with this on a copy of
the document so you can safely experiment. Various options:

****Method 1--this is fairly manual but easy to customize to get
*exactly* what you want:

Keep using the Chapter style and Heading 1 style in the doc as you are,
but don't build the TOC from styles at all. Instead, at each chapter
title, use a hidden TC field to tell Word exactly what you want to see
in the TOC. For details on how, see "TOC entries that don't appear in
the document" here:
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm
With only six chapters, this seems pretty feasible to me, though manual
is not ordinarily the best route.

Manually created TC fields are required because your document is
actually not consistent--"Chapter 1: Childhood" is not the same as
"Epilogue", yet they are serving the same structural purpose. Computers
have a tough time automating things that aren't consistent. If not for
that, I would have suggested either of these two approaches:

****Method 2

Build the TOC *solely* from Heading 1 (ignore the Chapter style). This
will give you, temporarily:
Childhood.............3
Adolescence........12
etc

Now, go to Format | Style and select TOC 1. Set it to be a Numbered
style. Click Customize. In the field that shows the number, type
"Chapter" before it. Now, when the TOC is created, it will automatically
prefix each Heading 1 chapter title with "Chapter [Number]".

Unfortunately, that will jack up Epilogue, but it may or may not be an
acceptable compromise to have Chapter 5: Epilogue.


****Method 3

I probably would have set the document up in the first place without
using the custom Chapter style at all, and instead setting Heading 1 as
a numbered style with a prefix "Chapter", and using a line break to
separate the two. In that case, a TOC built from Heading 1 *should* pull
the Chapter prefix, the number, and the text into the same line, and
convert the line break to a space or tab.

In that case, you can use a custom Heading 1-Alternate (formatted to be
identical except for the numbering) to format Epilogue and Hereafter in
the document, and then build your TOC from both Heading 1 and from
Heading 1-Alternate, and assign both of them to use TOC1.

You might not like that approach if you are formatting Chapter 1 in 30pt
Lucida Handwriting and Childhood in 48pt Arial Bold, as such drastic
changes would be difficult, perhaps impossible.

As the link I gave will show, there are many other ways to customize the
TOC. :)

hope that helps,
Daiya
 
R

Robert R. Rahl

Dear Daiya,

This is all enormously helpful, including the link to TOC Tips and
Tricks. I'll have to play around to come up with the best solution but I
can tell already that there is one.

The book I'm editing (for a friend)is actually nine chapters plus
introduction and epilogue. The examples I gave were totally made up just
to give you an idea of what I was talking about. Up until now I have
been generating the TOC with Heading 1 alone and then manually adding in
"Introduction, Chapter 1, Chapter 2, ..., Epilogue." That works fine
but this book is going to go through so many iterations that it occurred
to me that there might be a way of automating the process.

Thanks for your very generous reply.

Robert

Daiya said:
Hi Robert,

As you have it set up, you would have to manually edit the TOC to get
them on the same line. They are two different entries, so Word puts them
on two separate lines. There's no way to tell Word "these are really two
halves of the same entry even though the computer code clearly says they
are two different things but I need Word to pretend that isn't so."

I'd suggest a different approach--and I'd mess with this on a copy of
the document so you can safely experiment. Various options:

****Method 1--this is fairly manual but easy to customize to get
*exactly* what you want:

Keep using the Chapter style and Heading 1 style in the doc as you are,
but don't build the TOC from styles at all. Instead, at each chapter
title, use a hidden TC field to tell Word exactly what you want to see
in the TOC. For details on how, see "TOC entries that don't appear in
the document" here:
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm
With only six chapters, this seems pretty feasible to me, though manual
is not ordinarily the best route.

Manually created TC fields are required because your document is
actually not consistent--"Chapter 1: Childhood" is not the same as
"Epilogue", yet they are serving the same structural purpose. Computers
have a tough time automating things that aren't consistent. If not for
that, I would have suggested either of these two approaches:

****Method 2

Build the TOC *solely* from Heading 1 (ignore the Chapter style). This
will give you, temporarily:
Childhood.............3
Adolescence........12
etc

Now, go to Format | Style and select TOC 1. Set it to be a Numbered
style. Click Customize. In the field that shows the number, type
"Chapter" before it. Now, when the TOC is created, it will automatically
prefix each Heading 1 chapter title with "Chapter [Number]".

Unfortunately, that will jack up Epilogue, but it may or may not be an
acceptable compromise to have Chapter 5: Epilogue.


****Method 3

I probably would have set the document up in the first place without
using the custom Chapter style at all, and instead setting Heading 1 as
a numbered style with a prefix "Chapter", and using a line break to
separate the two. In that case, a TOC built from Heading 1 *should* pull
the Chapter prefix, the number, and the text into the same line, and
convert the line break to a space or tab.

In that case, you can use a custom Heading 1-Alternate (formatted to be
identical except for the numbering) to format Epilogue and Hereafter in
the document, and then build your TOC from both Heading 1 and from
Heading 1-Alternate, and assign both of them to use TOC1.

You might not like that approach if you are formatting Chapter 1 in 30pt
Lucida Handwriting and Childhood in 48pt Arial Bold, as such drastic
changes would be difficult, perhaps impossible.

As the link I gave will show, there are many other ways to customize the
TOC. :)

hope that helps,
Daiya


Version: MS Word for Macintosh 11.4.2
Operating System: Mac OS X 10.3.9 (Panther)
Processor: PowerPC G4

I am trying to create a customized Table of Contents using two styles,
the built-in Heading 1 and a custom style named Chapter. A typical
chapter starts out, for example, "Chapter 1" (formatted using the
style Chapter) followed by a paragraph mark, then "Childhood"
formatted using style Heading 1.

I would like the TOC to display as follows.

Chapter 1 Childhood...........................3
Chapter 2 Adolescence........................12
Chapter 3 Adulthood..........................21
Chapter 4 Old Age............................30
Epilogue Hereafter...........................39

I have modified the TOC field code as follows:

{ TOC\t"Chapter,1,Heading 1,1"}

This results in the following output.

Chapter 1............................3
Childhood............................3
Chapter 2...........................12
Adolescence.........................12
Chapter 3...........................21
Adulthood...........................21
Chapter 4...........................30
Old Age.............................30
Epilogue............................39
Hereafter...........................39

Is there any way to get the two styles to appear on the same line?

Any help is appreciated.

Robert
 
D

Daiya Mitchell

Right. You'll definitely be able to automate it, it just depends on the
overall look of the book and which adjustments you want to make.

Note that the TOC Tips and Tricks is written for WinWord--all the
principles should be the same for the Mac, the menu commands should be
the same (99%), but any keyboard shortcuts are probably not the same.
Probably everything relevant to this question is either in that article,
or linked from it, but holler if you run into more questions.

Glad that helped.
Daiya
 

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