Dictionary printouts from FLEx

13 views
Skip to first unread message

Allan Johnson

unread,
Nov 25, 2009, 9:28:19 PM11/25/09
to flex...@googlegroups.com
Hi all,

I'm trying to get familiar with the use of "SIL Publishing Solution" for
exporting a dictionary to OpenOffice from FLEx. One thing I need to do
but am having trouble with is changing the font used for the dictionary
export. Initially my desire was to switch from "Charis SIL" to "Charis
SIL Compact". This wasn't working well, so I tried an unrelated font
just in case the similar names were causing confusion somewhere along
the way, but the result was the same. The font changes made in FLEx were
not reflected in the resulting exported OpenOffice file except in just
one obscure style called
"partofspeechminor_.en_grammaticalinfominor_sense_sensesminor_entry_letData".
All the other relevant styles (3 paragraph styles and many character
styles) had been assigned the font "Charis SIL", which as far as I know
is not currently assigned to anything at all in FLEx.

Here are the specific adjustments I tried:

In FLEx -
Format; Styles;
Investigate fonts used for each style defined in FLEx
I find that by default, no specific fonts are selected here. Good.
That's as it should be. All are based on these three:
default font
default publication font
default heading font

To change these three fonts to the one desired for the export -
Format; Set up Writing Systems;
for each writing system being used:
Modify; Fonts tab;
Default Font: change to "Charis SIL Compact"
Default Publication Font: change to "Charis SIL Compact"
Default Heading Font: change to "Charis SIL Compact"

Restarted FLEx just to be as sure as possible that the new settings were
in place.

Tools; Utilities;
(x) Publishing Solution; Run Checked Utilities Now
(Be sure to uncheck "Include Reversal" if there's no reversal data in
your dictionary)
OK; OK
Export Type: OpenOffice; OK

And as mentioned before, in examining the resulting .odt file, nowhere
except in that one obscure style does the selected font come through.

I find that with some tedious fiddling I can get many (but not all) of
the styles in the OpenOffice file changed to the desired font. Some keep
mysteriously changing back. If at some point I manage to get them all
changed, I would then do well to save the result as a template that can
be attached to future exports. But there has to be a better way. What am
I missing? Why does SIL Publishing Solution not honor the font
selections made before export from FLEx?

Allan J.

GregT

unread,
Nov 27, 2009, 7:03:30 PM11/27/09
to FLEx list
I added a task called "Quick print" to respond to this issue. It
retains the flex entry (and reversal entry) formatting from flex and
adds page formatting items to produce the "quick print" (it isn't
actually any quicker than any of the other options but it was the best
name I could think of to describe this task).

As I told Allan in separate correspondence, the goal of
PublishingSolution was to provide ways to print the content that would
always look nice. The danger in accepting the user's choices in flex
is that they may have chosen a large point size to make screen editing
easier with no intention that this should be used for printing. (Flex
actually allows a separate font to be specified for printing than the
one used for editing but many users may not be using this feature). In
any case, a task named quick print at least carries with it the notion
that this may not be what you finally want.

Setting up the tasks to make the final result look nice most (or all)
the time has proved to be somewhat more difficult that first imagined.
Of course a Unicode font allows you to place all the characters that
could be needed in a single font. Although a font like Charis has
virtually everything one might need for a roman based font, it doesn't
begin to handle the non-roman cases. Also point sizes may vary in
appearance from one font to another and certainly may mean different
things in non-Roman fonts than the do in Roman fonts.

So for now, the other tasks look good for Roman based fonts and Quick
print retains the fonts used in FIeldWorks. (If a non-roman font is
used with Quick Print, it will still likely be necessary to change the
font used for the header. but this is relatively easy to do ... at
least if the output is sent to Open Office).

I hope this helps. I am happy for the questions and discussion. The
updated installer (including XeTeX export) is version 1.5.13 at
http://code.google.com/p/typeset-dictionary/

--Greg

Mary Steele

unread,
Dec 31, 2009, 6:34:27 AM12/31/09
to flex...@googlegroups.com
In FLEx, on the far right, under Entry, it is sometimes necessary to have a
mixture of vernacular and English e.g. in Grammar notes etc. What is a
suitable convention to distinguish the vernacular text from the English,
bold, or italics or??

Mary Steele


Beth

unread,
Dec 31, 2009, 2:09:24 PM12/31/09
to flex...@googlegroups.com

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 Hedinger

unread,
Dec 31, 2009, 11:36:07 AM12/31/09
to flex...@googlegroups.com
I am using bold for vernacular. Others might use italics.

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

Allan Johnson

unread,
Jan 1, 2010, 7:50:36 AM1/1/10
to flex...@googlegroups.com
I experimented with this a bit and found a couple more details worth mentioning.

1) Showing a distinction between English & Vernacular without custom styles
After having specified the vernacular writing system as described in Beth's step 1, FLEx can display a distinction between the English & Vernacular even without any custom styles attached. This is because each style in FLEx includes settings for English, for the vernacular, and for any other writing systems in use. Suppose you want to use different colors for English and the Vernacular, it could be set up like this:

Go to Format/Styles. Select the Normal style and the Font tab. At the top under Writing systems, select English and you'll see the Normal style settings for English. Set the Font color for English to Black. Then select the Vernacular Writing system, and set its Font color to Blue. Now going back to the Lexicon Edit view and looking at your Grammar Notes with imbedded vernacular words, the contrasting colors make it easy to tell whether you've applied the vernacular writing system to all the words that need it.

Note that these adjustments to the color of English and Vernacular will apply everywhere, not just in the Grammar Note field. If this isn't what you want, you may want to apply a custom style as in Beth's steps 2 & 3

2) Creating a relationship between the language tag and style tag (which should work but doesn't quite)
Suppose you have a bunch of embedded vernacular words in your Grammar Note fields, all properly marked with the vernacular writing system, and now you want to display these in italics (without putting -all- vernacular info in italics). This would be done by attaching a custom style as in Beth's steps 2 & 3, and it should be possible to do it quickly by search and replace. FLEx seems to be meant to be able to do this, but the feature isn't fully functional. Go to "Bulk Edit Entries", Add a "Grammar Notes" column and filter on non-blanks. Choose the "Bulk Replace" tab, choose "General Notes" as the target field, and click on "Setup". Now you'll see a dialog box similar to what you'd use for Search & Replace in MS Word. Click in the "Find what" window, then under "Search Options" click "Format", and from there you can select both the writing system and style that you want to search for. Then click in the "Replace with" window, and again under "Search Options" click "Format", and select both the writing system and style that you want to replace with.

I set it up to search for all occurrences (in the Grammar Note field) of the vernacular writing system, and replace with the Vernacular Words style in the vernacular writing system. It correctly found the relevant entries and let me preview and apply the changes, but it failed to apply the specified style.

A workaround -
The specified style is correctly applied if some text has been specified for the search & replace. So a way to get the desired result is to go through the alphabet, doing the search & replace for one character at a time. But this is tedious. It would be nice to have an easier way. Using regular expressions might allow use of a wild card to do all characters at once, but when regular expressions are enabled, then the search and replace doesn't seem to be able to handle styles and writing systems anymore.

Allan

Beth

unread,
Jan 1, 2010, 2:42:50 PM1/1/10
to flex...@googlegroups.com
Being able to search and replace on the Writing Systems is actually a
relatively new feature. I think it was primarily implemented for
cases when you have got data in the wrong writing system and need to
move it to the correct one. You can Bulk Copy, but it keeps the tag
of the writing system of the old slot; it doesn't automatically get
the writing system of the new one (this is because sometimes that is
what would be wanted). So to change the WS, you have to search on
one writing system and replace it with the other. I think it was
primarily assumed that the whole field would be in the same writing
system, but it sounds like they did implement it so it could apply if
only a portion of the string was.

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

John Thomson

unread,
Jan 1, 2010, 9:33:13 PM1/1/10
to flex...@googlegroups.com
This has been a tricky feature to get right. I think what is happening is that FLEX decides whether to apply the output style based on whether it was matching a style in the Find. However, in this case, there is initially no character style applied to the text you are finding, so it thinks you don't care about style. It ought to know that you DO care if you selected one for the output, so I think I would consider this a bug, though it may be a documented limitation. It MIGHT help (don't have a current version here to try) to explicitly tell it to find the default character style, if that is possible.

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

Allan Johnson

unread,
Jan 3, 2010, 2:27:00 AM1/3/10
to flex...@googlegroups.com
John Thomson wrote:
> This has been a tricky feature to get right. I think what is happening is that FLEX decides whether to apply the output style based on whether it was matching a style in the Find. However, in this case, there is initially no character style applied to the text you are finding, so it thinks you don't care about style. It ought to know that you DO care if you selected one for the output, so I think I would consider this a bug, though it may be a documented limitation. It MIGHT help (don't have a current version here to try) to explicitly tell it to find the default character style, if that is possible.
>

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

Reply all
Reply to author
Forward
0 new messages