[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Globally tag a word with a char tag



At 4:05 PM -0800 3/3/99, Ezra Steinberg wrote:
>I'm looking for a way to globally apply a specific character tag
>to every occurrence of a particular word in a book.
>
>I tried applying the target character format to the first occurrence
>of the target word in the book, then using Edit->Copy Special->Character
>Format
>to copy the format to the Clipboard. Then I went ahead and started pasting
>from the Clipboard using Find/Replace and "By Pasting". That applies
>the character tag all right, but it also applies all the character
>attributes of the specific instance that I selected when I did
>Edit->Copy Special->Character Format. Since the character tag I'm
>applying has most of its attributes set to "As Is", this is not the
>behavior I'm looking for.
>
>(For example, I used Copy Special on a word already tagged with the target
> character format that just happened to be 14pt Bold, but the character tag
> itself has font size and weight set to "As Is". When I Find/Replace By
>Pasting
> to body text that is 10pt Plain, the text does indeed get tagged with the
> character tag but also gets converted to 14pt Bold.)
>
>On the other hand, if I use Find/Replace with To Character Format, I can set
>the attributes I don't want changed to As Is so I change only the attributes
>I want changed. However, the words to which I apply these changes don't get
>tagged with any sort of character tag (which is no surprise, since the dialog
>box that pops up when you select To Character Format doesn't let you select a
>character format).
>
>Is there a way in the standard FM interface to do what I'm trying to do?

No.  But you can likely do it in the MIF.  I did this with the tag
"Emphasis", and the term "goshup" (meaingless letters easy to find in the
MIF).  If you do a find on "goshup" and replace every instance in the MIF
with the string between quotes below (only you have to put your own
Character tag name in place of "Emphasis", and you have to put your word in
place of "goshup", and take the spaces at either end), then you will get
what you want.  There's room for error any time you hack in the MIF, but
then if you muck the MIF, you still have the original.  I'd certainly give
it a go.  Hope it works.

- web (which is not part of the string)


" '>
   <Font
    <FTag `Emphasis'>
    <FLocked No>
   > # end of Font
   <String `goshup'>
   <Font
    <FTag `'>
    <FLocked No>
   > # end of Font
   <String ` "



** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **