StyleRef fields

  • Thread starter Catherine Haines
  • Start date
C

Catherine Haines

I want to use StyleRef fields for a running header in a dictionary. However, only the text is inserted in the header and any formatting is lost. This is a problem because I have symbols and italics and so on that should be applied in the header as well as the text on the page. I can't see any way of getting a StyleRef field to respect the format of the text it picks up. I think I will have to write a macro to do it instead - can anyone help with this?
 
C

Charles Kenyon

Have you tried the \* MERGEFORMAT switch. I normally avoid using this and it
often will lose the formatting of words after the first word, but it may be
what you want.


Catherine Haines said:
I want to use StyleRef fields for a running header in a dictionary.
However, only the text is inserted in the header and any formatting is lost.
This is a problem because I have symbols and italics and so on that should
be applied in the header as well as the text on the page. I can't see any
way of getting a StyleRef field to respect the format of the text it picks
up. I think I will have to write a macro to do it instead - can anyone help
with this?
 
C

Catherine Haines

No, MERGEFORMAT isn't any good unfortunately. That switch can be used to
avoid "update field" overwriting any formatting you apply directly to the
result. It might help if we elect to fix the problems by hand, but that's not
really any use because if the document changes the formatting we apply could
end up on the wrong page. If the last entry on a page is italicised and we
apply italics to the field result in the header, a slight change in format or
content could shift that entry to the next page and the italics we applied in
the header wouldn't move with it. I'm dealing with scientific text which is
why italics, small caps and so on are so important.
 
C

Charles Kenyon

Are you applying the specific formatting in the body text using a character
style? Does doing so change what happens with the MERGEFORMAT switch? Just
guessing, here, but I use StyleRef regularly and usually want the opposite
result of what you are trying to achieve; that is, I want special formatting
in the header/footer to override the formatting that the information has in
the body.
 
C

Chip Orange

One warning, not directly related to your question, but there is a 255
character limit to the size of the text copied by the styleref field
(undocumented of course).

Chip


Catherine Haines said:
I want to use StyleRef fields for a running header in a dictionary.
However, only the text is inserted in the header and any formatting is lost.
This is a problem because I have symbols and italics and so on that should
be applied in the header as well as the text on the page. I can't see any
way of getting a StyleRef field to respect the format of the text it picks
up. I think I will have to write a macro to do it instead - can anyone help
with this?
 
S

Suzanne S. Barnhill

Since StyleRef fields are mostly used in headers/footers and are designed to
pick up headings (usually relatively short) or single words (in
dictionary-style headings), this would not ordinarily be a problem, but it's
good to be aware of the limitation. Thanks.
 
C

Catherine Haines

Thanks, that's useful to know.

Chip Orange said:
One warning, not directly related to your question, but there is a 255
character limit to the size of the text copied by the styleref field
(undocumented of course).

Chip



However, only the text is inserted in the header and any formatting is lost.
This is a problem because I have symbols and italics and so on that should
be applied in the header as well as the text on the page. I can't see any
way of getting a StyleRef field to respect the format of the text it picks
up. I think I will have to write a macro to do it instead - can anyone help
with this?
 

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