TOC blues: page number alignment and font

A

Alex Leibovici

I have a long (300 pages) document for which I defined 7 header styles
with numbering and then a TOC to collect the headers.

I did many changes in the header stiles and I have elliminated the
first level from TOC.

I have now two problems:

- the "right align page numbers" is now greyed out and the page
numbers are not aligned to the right.

- if I change the font in the header styles TOC2 - TOC7 (not using
TOC1 any more), it has an effect on the font of the page number, but
not of the header text.

In a small test document with the original predefined headings
everything works OK.

TIA

Alex
 
C

Cindy M -WordMVP-

Hi Alex,
I have a long (300 pages) document for which I defined 7 header styles
with numbering and then a TOC to collect the headers.

I did many changes in the header stiles and I have elliminated the
first level from TOC.

I have now two problems:

- the "right align page numbers" is now greyed out and the page
numbers are not aligned to the right.

- if I change the font in the header styles TOC2 - TOC7 (not using
TOC1 any more), it has an effect on the font of the page number, but
not of the header text.
I'd expect the font to NOT change in a TOC if the font has been applied
directly to the text (instead of through a style). Are you sure you
didn't select the text and apply the font?

I just tried a quick test, setting up a document with a heading levels,
building a TOC without the first level. The numbers right-aligned with
no problems. In order to give you any helpful advice, we need to be able
to reproduce the problem, or at least better understand what you've
done. could you please tell us

1. the version of Word

2. the exact steps you've taken in defining the styles, applying them to
your headers, and definiing and creating the TOC. Or if you can
reproduce this in a NEW document, the (minimal number of) steps to
reproduce it?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
A

Alex Leibovici

Hi Alex,


I'd expect the font to NOT change in a TOC if the font has been applied
directly to the text (instead of through a style). Are you sure you
didn't select the text and apply the font?

The document's headings were *initially* formatted by directly
applying the font to text, but afterwards I applied the header styles.
All headers are now defined through styles.
I just tried a quick test, setting up a document with a heading levels,
building a TOC without the first level. The numbers right-aligned with
no problems.

As I mentioned in my post, in a test document everything works OK for
me too.

I suspect my document is in some way corrupt.
In order to give you any helpful advice, we need to be able
to reproduce the problem, or at least better understand what you've
done. could you please tell us

1. the version of Word

The version is 2002 (XP) plus SP3.
2. the exact steps you've taken in defining the styles, applying them to
your headers, and definiing and creating the TOC. Or if you can
reproduce this in a NEW document, the (minimal number of) steps to
reproduce it?

Unfortunately, I can't list the exact steps (which lead to what I
believe to be a document corruption), because I was trying various
things - which I don't quite remember.

I have cleanedmy long document from normal text - it is now just with
the headers and TOC, and the problem persists.

It is now 430KB long (just 60KB zipped); would you like to look into
it? It wold be fantastic!!! .... if you have the time...!!!

Regards

Alex
 
C

Cindy M -WordMVP-

Hi Alex,
The document's headings were *initially* formatted by directly
applying the font to text, but afterwards I applied the header styles.
All headers are now defined through styles.
Did you first remove any direct formatting? (Ctrl+Q, Ctrl+Spacebar)? If
not, then that might explain some of what you're seeing.
As I mentioned in my post, in a test document everything works OK for
me too.

I suspect my document is in some way corrupt.
Sounds like it. (If I don't first go through the "obvious", it always turns
out to have been something like that. Of course, when I do, then it's not!)

On the chance that it's "an easy fix": try copying everything except the
last paragraph mark to a new document, then recreate the TOC. Any
difference?

If not, give Word 2002, try saving as HTML, close, re-open and recreate the
TOC.

If that doesn't help, try the same with RTF file format.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
A

Alex

Cindy,

It turns out that the problem was the switch /p " " in the TOC
field: when I take it out, everything (!!!) works: page numbers are
right-aligned, I am able to change the TOCn's individual fonts and
other settings, etc.

The /p " " keeps coming back because of the option "right align page
numbers" being always grayed. I have to take out this /p switch every
time; it is strange, but I can live with this.

The trick with converting to HTM, RTF and the one with the last
paragraph mark didn't work.

Thanks for your help, Cindy

Kind regards

Alex
 
S

Suzanne S. Barnhill

The \p switch is used to specify the separator between entry and page
number, so it's easy to see why it would cause this problem, harder to
understand why it's being inserted.
 
S

Stefan Blom

When you created the TOC, did you choose a "Format" in the Index and
Tables dialog box? If you selected the "Modern" format then the "Right
align page numbers" option would indeed be greyed out.
 
A

Alex Leibovici

When you created the TOC, did you choose a "Format" in the Index and
Tables dialog box? If you selected the "Modern" format then the "Right
align page numbers" option would indeed be greyed out.

I've selected "From template", and the option "Right align page
numbers" is greyed out, as it is for "Modern". For anyone but "From
template" the Modify option is also grayed out, that is why I choose
"From template"

However, when I create a TOC in an empty document, "Right align page
numbers" is active !!

Alex
 
S

Stefan Blom

If the problem is with a single document, it might be a good idea to
try and copy the entire document except for the final paragraph mark
into a new file, in order to get rid of possible corruption. For more,
see the section titled "How can I fix a corrupt document?" in the
article at http://word.mvps.org/faqs/apperrors/CorruptDoc.htm .
 

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