Table of Contents: spacing before page numbers

S

Scott Klemmer

Hi,
I have a question about table of contents formatting.
(Yes, I have read
http://word.mvps.org/FAQs/Formatting/TOCSwitches.htm.)

I would like to format it with three spaces (or a roughly
equivalent amount of space in another manner) between the
chapter name and the page number. In other words:

My table of contents currently reads:
1 INTRODUCTION 1

I would like it to read:
1 INTRODUCTION 1

I do not want to use a tab, because a tab aligns the
number to a specific location. Rather, I am trying to
specify a uniform amount of space between the chapter
name and page number. Thanks!
+scott
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Scott,

Select the table of contents and press Ctrl+Shift+F9 to unlink it. Then do
a wildcard replace with

(^t)([0-9]{1,})(^13)

in the find what control and

\2\3

in the Replace with control (that's three spaces + \2\3)

Don't save the document after doing this, or at least save it with another
name as the first step in this procedure unlinks the table of contents from
the headings up which it is based, so that it will no longer update.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
S

Suzanne S. Barnhill

Just don't believe Word's Help, which implies that you can in fact define
this using the \p switch. While I haven't tested this in Word 2003, I can
attest that it does not work in any version up through Word 2002. The Help
text says:

\p "Separators"
Specifies the characters that separate an entry and its page number. For
example, the field { TOC \p "--" }, with an em dash, displays a result such
as "Selecting Text--53." The default is a tab with leader dots. You can use
up to five characters, which must be enclosed in quotation marks.

No matter how many characters you include, you get just one. If, however,
you could get the field to use an em space, this might accomplish what you
want (it's roughly equivalent to three regular spaces).
 
S

Scott Klemmer

Thanks Suzanne!
Unfortunately, I can't figure out how to get Word to
insert an em space. How can I do this?
+scott
 
S

Suzanne S. Barnhill

I know there is a keyboard shortcut for it, but I don't know what the
built-in one is because I've modified mine to Alt+Ctrl+M. Check the Special
Characters tab of Insert | Symbol.
 
S

Scott Klemmer

Thanks Suzanne!
I modified the field code so that the character after
\p is an em space. However, when Word formats the table,
it places a '#' character where the em space should be.
Same problem with an en space. Both of these characters
appear properly when directly inserted into the document.
Any other thoughts?
 
S

Suzanne S. Barnhill

Yeah, I was afraid of that. Em space and en spaces are philosophical
concepts that Word doesn't totally support. <g> I guess I'm out of ideas
then.
 

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