StyleRef, Character Styles and ListNum

M

Matthew Pether

HI All,

I have what *I think* is a simple thing to do and was wondering of anyone
could help me with this problem.

Everywhere a particular Paragraph style is used in my document, a Character
Style is applied to the section of the paragraph that I want to display in
the header. Using { StyleRef "CharacterStyle" } it displays all of the text
except the bits that are in a ListNum field. By using { StyleRef
"CharacterStyle" \n} I can get the number from the ListNum field. However
what I need is to display everything that is in the Character Style as it
appears in the document.

Initially I could work around this because the ListNum field always came at
the end of the text with the character style applied. By using {StyleRef
"CharacterStyle"} {StyleRef "CharacterStyle" \n}, it worked. However now
some examples are coming through with the ListNum field in the middle of the
text and my headers display the ListNum at the end of header rather than in
the middle of text as it appears in the document.

Can anyone please offer me some assistance.
 
S

Stefan Blom

Move the LISTNUM field so that it is positioned before the text which
has the character style applied. Format the field as hidden text. At
the original location of the field, insert a cross-reference to the
hidden LISTNUM number. The cross-reference will be displayed correctly
by the STYLEREF in the header.
 

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