h1

Word: Text surrounding a cross-reference shows in list of tables

September 7, 2022

One of my clients contacted me about some weirdness she was experiencing with some table cross-references (x-refs) in Word. Some table captions weren’t listed in the list of table at the beginning of the document—instead, the text surrounding the x-refs to these captions was listed. To explain this better, here’s what was showing in the list of tables (I’ve blurred out some text to preserve anonymity; click each image to view it larger): 

As you can see in the screenshot, the first instance of Table 10-10 reports the caption correctly, but the second one is in bold AND it shows 5 lines of the surrounding text AND other table numbers (x-refs) are mentioned in that text. Table 10-12 and Table 10-13 are both correct. This is not something I’ve ever seen before, as far as I know.

My first step was to click the link to that incorrect line item in the list of tables. I then reset the paragraph to the default style by selecting it and pressing Ctrl+spacebar, just in case there was an errant style that was causing the problem.

And then I noticed that while the first two x-refs (Table 10-10 and Table 10-11) in the text were both full fields (as evidenced by the grey shading, shown below; ignore the other grey for the blurring), the next x-ref for Table 10-11 wasn’t—only the section and table numbers had the grey shading that indicated they were fields, not the entire table number and the word ‘Table’, as you should see with a correct table x-ref. (As an aside, I always show field shading in a Word document as it shows me where the fields are and is thus a visual reminder NOT to touch them when writing or editing; in Word for Windows, you turn on field shading under File > Options > Advanced > Show Document Content — set Field Shading to Always.)

To confirm these were different types of fields, I right clicked on each and selected Toggle Field Codes. This confirmed that I was looking at quite different field types. Table and other x-refs should start with { Ref , which is what the first two showed, but the third one had different types of field codes, one for each number, as shown in the screenshot below.

And I recognised that the types of field codes for the incorrect one were the same field codes used in table captions, NOT table x-refs. (Don’t forget to right click in the fields again and select Toggle Field Codes to show them as they should be.)

I think I know how it happened—someone COPIED the table number part of a caption, pasted it and then restyled it like the surrounding text, thinking that was all they had to do to insert a x-ref. But of course, it isn’t a true x-ref—just a copy of the caption, which is why the sentence it was in was appearing in the list of tables.

The solution was to remove the incorrect text and fields and replace them with correctly inserted x-refs. Once I did this, I updated the list of tables and everything was fine again.

(Note: You may also have to update all the fields in the document too as it’s likely that the copied caption caused the other caption numbers to update and they are likely incorrect. In my case, I had to update the fields twice—once to get the caption numbering correct, then a second time to get the x-refs to those caption numbers correct. But typically you only need to update the fields once.)

See also:

And for solving other table of contents weirdness, see these blogs posts too:

[Links last checked September 2022]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: