Problem with cross-reference text wrapping

P

PLDV

Is there any way in which I can prevent a cross-reference text (e.g. Figure
10) being split up & wrapped onto the next line? This frequently happens to
me when a cross-reference is located at the end of a line. The text (e.g.
"Figure") will be separated from the Field code (e.g. 10, in the above
example). Inserting a hard space (Ctrl+Shift+Spacebar) between the text & the
field code does not prevent the split up from occuring when the document is
update (Ctrl-A+F9).

Thanks for your comments/help.
 
S

Stefan Blom

Insert the nonbreaking space in the actual caption instead. Then update the
cross-reference.
 
P

PLDV

Stefan: Thanks very much. This solution makes really good sense. Next Q: Can
you think of a way in which I can include the non-breaking space in the
Insert Caption tool so that it's generated automatically?
 
A

Allen_N

Record a macro.

- Allen


PLDV said:
Stefan: Thanks very much. This solution makes really good sense. Next Q: Can
you think of a way in which I can include the non-breaking space in the
Insert Caption tool so that it's generated automatically?
 
S

Stefan Blom

Select a caption to which you have added a nonbreaking space and create an
AutoText entry from it. Use the AutoText to insert that type of caption in
the future.
 
P

PLDV

Stefan: Thanks again. I haven't used the AutoText feature before. Glad it can
serve me in this way. Next Q!: When I insert the non-breaking space into a
caption (as you described earlier) there is still a space between the
non-breaking space character & the field code. I haven't been successful
(yet) in figuring out how to replace the space with the non-breaking space
character rather than just insert the non-breaking space character, which is
what's currently happening. When I toggle the field code of the Caption, I
get { SEQ Figure \*ARABIC }. I've experimented with changes in this SEQ code
to see if I can eliminate the generation of the space before the fieldcode
number that's generated but no 'luck' so far. Am I missing something or is
the control of this area somewhere else. Thanks for your assistance.
 
S

Stefan Blom

You mean that there is a space character inside the field code? If so, that
is quite normal, and it shouldn't matter. Are you saying that it does cause
trouble?
 
P

PLDV

Hi, Stefan: No, there is no space character inside the field code component
(I have "Field shading" set to "Always" in Word Options so can readily see
where the space is rel. to the field code). Here's a description of the info.
(can't paste in copy or png of sample - sorry):
"Figureo-{-SEQ-Figure_-\*-ARABIC-}" , where "o" = non-breaking space & "-" =
space. It's the first space after "Figure" that I'm attempting to remove. It
seems to be buried in the Caption style but I can't figure out (yet) where
the space is coming from in the Caption style (if at all). I'm still trying
to figure out how the Caption style interacts with the SEQ field code info.
Thanks for patience & perseverance.
 
S

Stefan Blom

I think I see what you mean now. The "ordinary" space was probably added
when the caption was first inserted. This has to do with the Caption dialog
box rather than the Caption style though. For existing captions, you will
have to manually replace that space with a nonbreaking space.

If you create an AutoText entry and make use of it, future captions will be
formatted with the desired nonbreaking space.
 
P

PLDV

Good. I think the need has been met... sort of. I can now insert Figure
captions & Table titles with the desired non-breaking space & have the
related Cross-references to these match that format so that the
cross-references are not broken when they reach the end of a line. It would
be ideal to be able to get the Caption dialog box to insert Figure & Table
captions (titles) by adding the non-breaking space & no space after it,
before the Field Code, but there doesn't seem to be a way of doing that,
hence the use of the Quick Parts approach. Should you have any thoughts about
how to get the Caption dialog box do this, so that I don't have to use Quick
Parts, that really would be great as that is much easier to teach others
(colleagues) on how to do this. Thanks again for your assistance.
 
S

Stefan Blom

I don't know if you can change the behavior of the dialog box, but if it's
possible it would require macros. You will have to ask in a programming
newsgroup such as microsoft.public.word.vba.general.
 

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