Mary Steele
There are a few pieces to this:
1. When you enter, for instance, a vernacular word embedded in an
English string, be sure to select the vernacular word and then use
the Writing System combo (in the top part of the window) to assign
the vernacular language to this string. FLEx really wants each bit
of data tagged for what language it's in, no matter where it is.
This is partly helpful for this, but also helpful if you ever do
spell-checking. And it's easier to do this tagging as you enter the
word, than to go back and do it later.
2. Go to Format/Styles. Create a new Character Style called
Vernacular Word. You could fill in the "Usage" box with "For
vernacular words embedded in other strings." On the Font tab, click
one of the boxes for Bold or Italic.
3. In the Lexicon pane, select your vernacular word. Use Format/
Apply Style and choose this new character style you just created.
(Okay, the language tag and the style tag are not related. It's
still good to tag the word for what language it's in, even though you
don't have to for this.)
4. You can then later easily change the style from bold to italic or
something else, if you change your mind about how you want it to be
distinguished. But as long as you have all your embedded vernacular
words using this style, then they would all change.
-Beth
Robert
--------------------------------------------------
From: "Mary Steele" <mary_...@sil.org>
Sent: Thursday, December 31, 2009 12:34 PM
To: <flex...@googlegroups.com>
Subject: [FLEx] Vernacular/English distinction
> --
> You received this message because you are subscribed to the discussion
> group "FLEx list". This group is hosted by Google Groups and is open for
> anyone to browse.
> To post to this group, send email to flex...@googlegroups.com
> To unsubscribe from this group, send email to
> flex-list-...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/flex-list
If this needs to also apply styles as well as writing systems, I
think that would be a new feature and would need to be prioritized
with other things that are still waiting to be done.
-Beth
Implementing regular expressions in combination with specifying styles and writing systems is quite a hard problem. Even just defining precisely how it ought to behave is difficult. Consider for example a pattern like ba+d? (b followed by one or more a's then optinonally d), where we're trying to match style. Suppose the input has baad, where the baa is in the desired style but the d is not. Arguably, the match is "baa", since that does in fact match the pattern, while "baad" does so only by ignoring the style. But that might be very surprising for users who are expecting the longest match. It is also very hard to implement, since the only easy way to do the style/ws match is to check it after doing a normal regular expression match. More complex patterns make it harder still to define how the ws/style constraint should affect the results.
We could possibly do a limited RE/style/ws match on the principle that we first search for the RE, then discard any matches that don't have the desired ws/style. However, this would miss matches like the "baa" above. I'm not sure whether this would be useful or confusing (perhaps both!).
JohnT
Hi John,
I tried this, but it doesn't seem to be possible to search for the
default character style (in FW 6.0). The "Normal" style seems to be the
one in use by default, but when setting up the Bulk Replace, it doesn't
appear in the list of possible ones to search for. This may be because
it's a paragraph style. I find that all character styles except
"Hyperlink" are available for selection, but no paragraph styles are
available for selection.
To test the matching and replacing of a specific style, since I can't do
a search for the "normal" style, I manually applied the character style
"Vernacular Word" to a word in a Grammar Note, and then set up Bulk
Replace to replace the style "Vernacular Word" with the style
"Emphasized Text". I found that this too fails. But if some text is put
into the search box, then the style is matched and replaced just fine.
So again it could be accomplished by doing the Bulk Replace once for
each letter of the alphabet.
Allan