Indexing: The word "tab" breaks the index

D

Dave E

Word 2007 SP2

I'm indexing a number of terms that have subentries called "tab". For
example, "security tab", "general tab", "setup tab", and so on. For each of
these items, the "tab" subentry is located on a different page than its main
entry. So the index really needs these "tab" entries. However, the word
"tab" causes the index to misbehave: the generated index entry doesn't place
the page number where it should go.

Here's an example of what the index entry looks like:

security
settings..............45
tab67
trends................13

Notice that the dotted leader is missing for the "tab" subentry. Here's how
it should look:

security
settings..............45
tab.....................67
trends................13

If I change the description of the "tab" subentry to anything else, then it
works fine ("atab", "tabz", etc.). This looks buggy to me, since the index
should add the term (the word "tab" in this case), the tab character and
leader (not the word "tab", but an actual tab character), and then the
properly aligned page number.

This only happens with subentries. Just to test it, I added a main entry
called "tab" and that entry looks fine in the index.

Any ideas?

Version: Word 2007 (12.0.6504.5000) SP2 MSO (12.0.6425.1000)
 
P

Peter T. Daniels

The word "tab" is so short that it doesn't extend past the first tab
stop in the style for index entries. You probably don't need that tab
stop at all (you only need the right-tab at the right edge of the
style, in order to get the dot leader), so just delete it from the
subindex entry style.
 
D

Dave E

You're getting close. You're right that it's not that the word "tab" is a
reserved word. I tried it with other short words "iii" and it did the same
thing. So cool, you identified the problem. I'm not sure how to solve it
though (at least not with the tab settings).

The style for the subentry doesn't include _any_ tabs at all. I looked at
the settings for the main entry ("Index 1") and the subentry ("Index 2") and
neither of them have any tabs defined in the style. I turned on the Reveal
Formatting pane and there's only the one right-aligned tab for the index
entries.

The only other thing I can think of to fix it is to remove the hanging
indent (.17") for the "Index 2" style. I guess that style doesn't really
need the hanging indent; it would be pretty lame if your index entry were so
long that it wrapped the line.

Yes - That fixed it. It feels like a hack, but it's fixed. Good call,
Peter, on the length of the string.

- Dave
 
P

Peter T. Daniels

If a paragraph has _no_ tab stops, then tabbing automatically goes to
every 0.5" (unless the default has been changed), but that shouldn't
be involved here, because how can you have a dot leader unless you
have a right-tab at the right margin?

And if Index 2 isn't indented, how does the reader know that they're
sub-entries?
 
D

Dave E

Hi Peter,

Yeah, you'd think it works like that, but some of the formatting comes from
the {INDEX ...} controls. If you create the index using the Index dialog
when you insert the field code, then the dialog's options add switches to the
field code that control some of the formatting. The \e switch defines the
separator (in this case, the tab). The options also control the leader (the
dots) and the right-alignment of the page number.

One of the options is also "Indented". So depending on the settings in the
{INDEX ...} field code, the formatting of the "Index n" styles may or may not
be supplemented (not totally overridden, but appended).

The result, in my case, is that the combination of the "Index 2" style with
no tabs and an indent of .17" (but no hanging indent) plus the settings in
the INDEX field codes creates a happily functioning index.

Thanks again for sleuthing the length of the string as the culprit. The
false connection between the index entry called "tab" and the misbehavior of
the actual tabs had me chasing down the wrong rabbit hole.
 
S

Stefan Blom

See if the Index 2 style has acquired an extra tab stop (to the left of the
tab stop that you actually want). If so, you could just drag it off the
ruler using the mouse pointer; the style will update automatically (unless
you changed that setting, enabled by default, for the Index styles).
 
S

Stefan Blom

Hmm, rereading an earlier message of yours, I realize that the issue was the
tab stop that Word automatically adds to the hanging indent. But rather than
removing the hanging indent, you could make it smaller (dragging the indent
indicator on the ruler should update the style).
 
S

Suzanne S. Barnhill

You should be able to keep the hanging indent and lose the tab. In Tools |
Options | Compatibility, check the box for "Don't add automatic tab stop for
hanging indent." Be aware, however, that this will affect the entire
document; if you have numbered/bulleted styles with hanging indents, you may
need to add tab stops to those styles to make them work right.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
S

Stefan Blom

Hmm, I have noticed that compatibility option but never figured out what it
was good for, so I'll keep this in mind for the future. It shouldn't affect
numbered paragraphs as you usually do add tab stops to them if you set them
up correctly (via the numbering dialog box that is), but it will definitely
affect other paragraphs that make use of hanging indents.
 

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