Posts Tagged ‘cross references’

h1

Word: Remove formatting from cross-references

March 12, 2010

Sometimes you’ll add a cross-reference to a figure or table, and part of it (the number usually) will display in bold text. Or perhaps you’ve inserted the cross-reference in a table but the font used in the table is smaller than that used in the body text, yet the cross-reference displays in the larger font.

I’m not sure what causes it but here’s how to fix it:

  1. Right-click on the cross-reference field, and select Edit Field.
  2. The Preserve formatting during updates check box should be checked — check it if it’s not, then click OK.
  3. Select the cross-reference field, and manually change the formatting to what you want it to be (remove the bold, make the font smaller or larger, or whatever formatting is ‘out of whack’). It should now hold for any future updates of that field. You can test it by updating the field.

(Hint: If you use fields a lot and need to know where they are in your document, turn on the option to always show them shaded in gray.)

See also:

[Links last checked February 2012]

h1

Word: Macro to fix Track Changes/Cross References issues and accept all field changes

October 16, 2009

The problem

When all Track Changes have not been accepted, you may not be able to insert a cross-reference to a table or figure caption correctly. Either you see multiple instances of the caption listed in the Cross Reference dialog box, OR you don’t see the caption at all, OR you see an incorrect table/figure number for the caption (e.g. you see Table 5.1 instead of Table 1.1).

This is a known issue with Word since at least Word 2000 (see the list of resources at the end of this post).

The issue

You’d think that accepting all changes would be sufficient. And it is. But accepting all changes is not appropriate where you have a document that MUST keep Track Changes on, such as one that has to go through a regulatory compliance process through all its revisions. I have been working on these types of documents. In Word 2003, it was never really an issue — double-upped cross-references were an annoyance more than anything, and we never noticed any that were missing. But as soon as my client started using Word 2007, we came across serious issues with existing table and figure captions not being listed in the Cross Reference dialog.

A little testing showed that it was related to Track Changes being on and the acceptance of all changes in the document. Armed with that knowledge, I headed off to trusty Google to try to find a solution — a solution that allowed cross-reference and caption fields (and lists of tables and figures) to be updated without affecting other parts of the document.

Solution

Macropod (clever name!), a Microsoft Word MVP, had posted a macro that solved the problem (http://www.pcreview.co.uk/forums/thread-31716892.php). It worked great, but it dropped me into the footer and into Draft view at the end of the document when it was finished. So I posted my request to the Microsoft Word Programming Discussion Group, and the ever-helpful Macropod tweaked his/her original macro to get me what I wanted, which was to return to where I was when I ran the the macro.

Here’s Macropod’s revised macro:

Sub AcceptTrackedFields()
Dim oRng As Range ' All Range objects - includes ranges in the body, Headers , Footers & Shapes
Dim Fld As Field ' Field Object
Dim oView As Variant ' The original document view
Dim SelRng As Range ' The original selection
' Turn Off Screen Updating
Application.ScreenUpdating = False
With ActiveDocument
oView = ActiveWindow.View.Type
Set SelRng = Selection.Range
' Loop through all range objects and accept tracked changes on fields
For Each oRng In .StoryRanges
Do
For Each Fld In oRng.Fields
Fld.Select
Selection.Range.Revisions.AcceptAll
Next
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
Next
End With
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
Else
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
SelRng.Select
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

Thanks heaps, Macropod! The generosity of the Microsoft MVPs and community is humbling.

See also:

Some websites that discuss this issue

See also:

[Links last checked October 2009]

h1

Word annoyance: Cross-referencing

May 28, 2009

Sometimes I wonder if Microsoft employees have ever used Word for a long document with multiple heading levels, hundreds of headings, figures and tables, and lots of cross-references to those headings, figures and tables. My experience with Word would suggest not. (I did hear that Microsoft employees use an internal XML system for their documentation, which if true, gives lie to ‘eating your own dog food!’)

So what’s my peeve this time? The Word 2003 Cross-reference dialog box (and, to an extent, the Word 2007 Cross-reference dialog box, though some things have been fixed).

What’s so annoying about it? Well, it just DOESN’T work well with long documents where you have to insert many cross-references. I’ve been working on hundreds of these types of documents since last September and there are some simple things that could improve the experience for those of us who have to use this function many times a day.

Here’s the Word 2003 dialog box, showing that there are many many headings in this document — the vertical scroll bar on the right indicates that Section 5.6 in this example is only about a quarter of the way into this document.

Word 2003 Cross reference dialog box

Word 2003 Cross reference dialog box

So how is this Word 2003 dialog box broken?

  • You cannot resize the dialog box any which way, which means that you have to continually scroll the list nine items at a time (Home and End work within it as do the page up/down keys, so that helps a little). This is sort of fixed in Word 2007 — the dialog is resizable for both height and width, but the resizing does not hold if you close the dialog box. As soon as you re-open it, it goes back to the default size.
  • The heading levels cannot be collapsed — they always open fully expanded, which makes it painful to get to Section 12 of 24 sections, for example. Again, you have to scroll to get there. This is the same in Word 2007. Surely it would be a simple thing to add expand/collapse icons for the Headings list??
  • If you select an item, then click Insert and leave the dialog open, then select another item and click Insert again, the next time you try to do this, you lose the scroll bar and end up at the top of the list. Now you either have to close the dialog and start again, or use the page up/down etc. keys to navigate to the next cross-reference (the scroll bar is inactive) OR — here’s a tip — click in the scroll bar BEFORE you select the second and subsequent items, then you won’t lose it. It’s an extra click but quicker than having to scroll using the keyboard or closing and re-opening the dialog box. This appears to be fixed in Word 2007, based on the little testing I did.
  • The Insert reference to option does not hold between various Reference types. For example, if I choose Only label and number for a Figure, then I insert some figure cross-references, everything is fine. But if I then insert switch reference type to a Table (perhaps also selecting Only label and number) then when I go back to inserting a Figure cross-reference, the default (Entire Caption) is displayed and I have to re-select Only label and number, even if I’m in the same session (i.e. I haven’t closed the dialog and I haven’t closed the Word document). What I would like is for the selection I made the last time I inserted a Figure in this session to hold for the next time I insert a Figure. This would save me hundreds of mouse clicks per document! This is not fixed in Word 2007, which exhibits the same behavior as Word 2003.

These are all little things that perhaps wouldn’t be noticed if you were only using this dialog occasionally. But I’ve had to open it and insert thousands of cross-references over the past six months or so, and it’s limitations are apparent. And annoying.

See also:

h1

Word: Cross-reference goes onto next page

March 24, 2009

Here’s a curly one! My client had a problem: a cross-reference to a bookmark for an Appendix was adding a page break within the body text. I’ve had these before — quite often just recreating the cross-reference will solve it. But not this time. So it was time to do some investigating…

First, I turned on the ‘show bookmarks’ option so I could see them all:

  • Word 2003: Tools > Options > View tab, Show group, Bookmarks check box.
  • Word 2007: Office button Office button,  click Word Options then Advanced on the left. Scroll down to the Show document content section, and select the Show bookmarks check box.
Bookmarks check box

Bookmarks check box in Word 2003

Show Bookmarks in Word 2007

Show Bookmarks check box in Word 2007

Next, I hunted down the bookmark for the Appendix that had its cross-reference going haywire.

This is what I expected to see — notice how the bookmarked text is surrounded by gray square brackets; this is how it should be:

How a Bookmark should look

How a Bookmark should look

However, that’s not what I saw. Instead I saw this:

Bookmark spanning a page break

Bookmark spanning a page break

Notice how the start of the bookmarked text (1) is just before the forced page break, and the end (2) is where it should be.

No wonder the page break was being dumped into the body of the document whenever a cross-reference for this appendix was inserted! It was being picked up with the text as Word (logically) understood it to be part of the text.

The solution was to select the correct text (i.e. WITHOUT the page break) and re-assign the AppendixD bookmark to it. Once I’d updated the document fields (Ctrl+A, then F9), everything worked fine!

h1

Word: Bookmark cross-reference formatting

December 22, 2008

Lately I’ve been working with a colleague on some long documents with lots of Appendices etc. We’ve been using Word’s Bookmark feature to select the first part of the appendix title (e.g. ‘Appendix B’) and add it as a bookmark (‘AppendixB’).

When we need to cross-reference the appendix in the main text, we select the name from the list of bookmarks and insert it. Most times the cross-reference goes in as it should—formatted the same as the surrounding text.

But on the odd occasion and for no apparent reason, the cross-reference decides to display the formatting of the original appendix heading. I’ve put two of these suckers into the same sentence—one will go in OK and take the formatting of the surrounding sentence; the other displays in the formatting of the appendix heading (all caps and 14 pt bold!).

I’ve checked and double-checked the Edit Field and Toggle Field Code options to see if there’s anything different between the two. Nope. They are exactly the same. If I manually format the incorrect one, when I update the fields using F9, it goes back to 14 pt bold all caps. Grrrrr…

So today I’d had enough! I found out how to fix it, and I’m hoping this fix will hold for all future field code updates (it’s held the few times I’ve updated the doc today, so here’s hoping…)

Here’s what you do in Word 2003 (Word 2007 and 2010 should be similar once you get to the Field window):

  1. Right-click on the cross-reference text.
  2. Select Edit Field.
  3. On the Field window, click the Field Codes button (lower left).
  4. Add a space after the \h part, then type \* charformat
  5. Make sure that the Preserve formatting during updates check box is clear.
  6. Click OK.

You could add this \* charformat part into the toggled field code instead, but there’s more chance of making a mistake.

Fixing formatting in a cross-reference

Fixing formatting in a cross-reference

(I found the answer here: http://tinyurl.com/67oabt [Lockergnome site])

See also:

[Links last checked February 2012]

h1

Indexes v. full text searches

October 4, 2008

Comment from an email discussion list member

In my opinion, indexing is pointless. Searching is much more important than indexing.

I think you should provide the simplest automatic indexing, based on topic headings, and rely on your users to use full-text search to actually find anything.

Full-text search is easy and it works perfectly. Indexing, on the other hand, depends on the skill and commitment of the indexer. For myself, I feel that my life is too short to spend much of it on indexing.

My response

Yes, full text search (FTS) has its place (and Google et al have a lot to answer for in this regard).

BUT FTS brings with it a lot of garbage as it find any matching words without any reference to their context. You can narrow the results list by judicious use of Boolean operands and syntax such as quote marks, parentheses and the like—but most users don’t know about them or how to use them. However, this still doesn’t put the words into context. In many ways FTS is like a concordance… ‘let’s list every word we find in the document no matter how important it is’. Concordances treat every word equally.

Indexes on the other hand—at least, well-constructed indexes—serve a different purpose in focusing the user’s attention on the words most likely to have relevance.

Well-constructed indexes are done by humans who can detect nuances and meaning of words—in the context of their usage. Indexes created by software (of any kind) just don’t have this sophistication at the moment. A good indexer can create “see” references from unused terms to used terms, and “see also” references to similar terms. Complex indexes also refer users to broader and narrower terms.

Others have mentioned synonyms and they are one of the prime reasons why human indexers are much better at this than software. A FTS can’t distinguish between words such as “editing”, “amending”, “changing”, altering”, “modifying” (and their variations)—yet they could all be used in the document. A human indexer can set one term as the preferred term and refer all other uses to that term, thus offering the user the FULL range of topics that cover anything to do with changing something.

Others have also mentioned that print output (NOT screen versions of print, like PDF) doesn’t have FTS, and a good TOC and Index is the way users access the information. I believe there is a place for both… and I would be very sad to see the day when indexes are relegated to the trash.

h1

See/See also: And the difference is?

June 17, 2008

If you’re unsure of the differences between a see and a see also cross-reference in an index, here’s an explanation that may help:

  • See: Refers you from an unused term to a used term. For example, ‘ornithology, see birds’ means that anything about birds in this document is listed under birds in the index, not under the more scientific term of ornithology. In the index, only birds has a page number reference.
  • See also: Refers you to other used terms related to this one. These terms may be ‘siblings’ or ‘children’ of the parent term. For example, you may see ‘birds, see also reptiles’. Both terms are at an equal level, so are ‘siblings. However, ‘birds, see also eagles, flamingos, parakeets’ refer to terms that are narrower than the parent term birds, so are ‘child’ terms. All terms are listed in the index with their respective page number references.

[This article was first published in the September 2005 CyberText Newsletter.]