Custom field and surrounding context

97 views
Skip to first unread message

Oumar Bah

unread,
Apr 6, 2024, 9:00:54 PMApr 6
to Flex
Dear colleagues!

I am using a custom field for the plurals in one of my projects. I have still not been using it extensively. This is one of the reasons: I placed a label, Pl., in the Before area of the Configure Dictionary dialogue. I would like Pl. to have a normal size whereas the content of the field, the plural itself, should be in bold style format. That seems impossible. The style of the surrounding context (Before and After) applies also to the content. Is there a solution, a workaround? 

Regards

Beth-docs Bryson

unread,
Apr 7, 2024, 1:13:50 AMApr 7
to flex...@googlegroups.com
In the list of Styles (Format/Styles), there is one called Dictionary-Context.  This is supposed to control the style of the Before/After material (but not the contents of the field).  If this isn’t working, maybe you could send a screenshot of the Configure Dictionary dialog when the Plural field is selected.

One drawback is that it controls *all* the Before/After material, for all fields.  That may or may not be what you want.

To get more fine-grained control, you would want to use the CSS overrides file.  There are a few details about that in the Helps, but you probably would need specific suggestions.  It assumes a bit of knowledge of CSS.

-Beth

--
"FLEx list" messages are public. Only members can post.
flex_d...@sil.org
http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/1734025918.8833236.1712451645556%40mail.yahoo.com.

Oumar Bah

unread,
Apr 7, 2024, 9:03:22 AMApr 7
to flex...@googlegroups.com
Beth, here is the screenshot. As you can see, the plural form ɓattajje is not in bold style. Unfortunately, I know nothing about css.

Regards
Oumar

Plural custom field.png

Kevin Warfel

unread,
Apr 7, 2024, 7:25:07 PMApr 7
to flex...@googlegroups.com
Oumar,

Where you have selected "Dictionary-Context" as the Character Style for Content, select "Strong" instead. That will bold the content of the Plural field. The formatting of the Before and After material will automatically be done by the "Dictionary-Context" style; that can be changed only in the CSS overrides, as I understand it. 
Note: Read carefully the words "context" and "content". The "Before" and "After" slots are context; the plural form in your data is content.
image.png

I think that will give you what you're wanting, based on Beth's explanation.

Best wishes,
Kevin

Oumar Bah

unread,
Apr 7, 2024, 7:54:54 PMApr 7
to flex...@googlegroups.com
Kevin, thanks for your input. You mean the format of the Before/After material is underlying? However, whatever style I choose, it applies to both the Pl: label and to the content. For example, if Strong is selected, both categories are strong. There is obviously no way to separate them.

Oumar 

Beth-docs Bryson

unread,
Apr 7, 2024, 8:41:34 PMApr 7
to flex...@googlegroups.com
Hi, Oumar.

In your picture, you have told it that the Plural field should use the style called “Dictionary-Context”.  Since that is the name of the style that is always used for the Before/After material, you have basically told it, “Always format the contents of the Plural field the same as the Before/After material.”  

What Kevin was suggesting is that instead of choosing “Dictionary-Context” as the Style for the Plural field, choose some other style.  I actually recommend choosing Dictionary-Vernacular, because that reflects the function better.  Dictionary-Vernacular is by default set to come out bold, and that would apply to any word set to use that style, whether it’s in the Plural field or not (I think it is used by cross references or some other places where vernacular occurs).  

Here is a picture where I have set a custom field (in this case, the “Questions” field) to use the Dictionary-Vernacular style.


When you said you were setting something to “strong”, was it in this dialog, or in the Styles dialog?

Here is a picture of the Styles dialog, where you can configure the formatting that is used by the style called “Dictionary-Context”.  By default, nothing is set—it is inheriting all of its values.  But you could make it italic or bold or a different color…. But keep in mind, it will apply not only to the Before/After on the Plural field, but on all other fields that have Before/After material.


But if you tell FLEx that Plural should use the Dictionary-Vernacular Style, and this style has different formatting than the style called Dictionary-Context, then you should get different formatting for the Before/After compared to the contents.

If this still isn’t working, then try setting one of the formatting values for the style Dictionary-Context.  Right now it is “inheriting” values for everything.  Try clicking on the box next to “Bold” until it becomes blank, instead of having the minus in it (and not a check mark).  I don’t think you should need to do that, but it’s a backup plan.

If it is still not working, then send more pictures, showing:
 - Which style you have chosen for the Plural field
 - The Styles dialog for that style
 - The Styles dialog for the Dictionary-Context style

-Beth



To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/372726234.477529.1712494945679%40mail.yahoo.com.
<Plural custom field.png>

Oumar Bah

unread,
Apr 8, 2024, 8:14:08 PMApr 8
to flex...@googlegroups.com
Beth, I must be missing something. OK, this is what I tried: I first selected the Dictionary Vernacular style for the Before/After stuff. This style is set to italic in my case. Then I clicked at the Highlight Affected Content yellow box. As you can see in my picture, Pl: and the plural itself are affected. Then I clicked at "Style" menu and selected the Dictionary Headword style. That one is bold. I also made sure that bold is selected (see picture). After I dit OK, I closed the dialogue window and came back to the first Dictionary configure window. Final result: Pl: and the plural form are both italic. When I again click at the style menu, to check, I find out the style of the plural field has been reset to Dictionary vernacular. In your picture with your Question custom field, the Before/After area is empty, so I wonder where you entered the Before/After stuff.  

Regards
Oumar

Before After Style.png
Style for Plural field.png
Bold style selected.png

Beth-docs Bryson

unread,
Apr 10, 2024, 1:24:08 PMApr 10
to flex...@googlegroups.com
Hi, Oumar.

I think the crucial difference is this:

 - In the Configure Dictionary dialog, you can use the combo box to "choose a named style".  And that style is for *the field that is selected*.  In your case, it is for the custom field Plural; in my case it was for the custom field "Question".   (Note that it is NOT for the Before/After material.)
 - In the Styles dialog, you are changing what formatting is applied for any given named style, but you are not telling it anything about "which fields" use that named style.  So if you change the formatting for some style that is not used by anything, those changes won't appear anywhere in your project. Or if you are changing the formatting for a style that is used by a different field, but not by the one you are thinking about, you would see the changes in that other field, not the one you’re thinking about.
 - A crucial thing about the Before/After material is that it *always* uses the style that is called "Dictionary-Context".  There is no way to tell it to use a different named style. And there is no way to affect the formatting of the Before/After material from the Configure Dictionary dialog.  The only way to affect its formatting is to use the Styles dialog to adjust the settings for the style that is named "Dictionary-Context".

So in the picture below, assuming that you have the field "Plural" selected, this picture shows that you were adjusting how the style named "Dictionary-Headword" is to appear, but your field "Plural" is still set to use the style that is named "Dictionary-Vernacular" (green circle).  


I think "Dictionary-Vernacular" is an appropriate style for that field.  And if you want to control how the Before/After material appears, go to the Styles dialog to adjust what formatting is applied by the style named "Dictionary-Context".  I recommend getting there using the menu option Format/Styles.  If you try to get there from the Configure Dictionary dialog, then you are likely to set some field to use that style, but that's not what you want.  Normally no field should use the Dictionary-Context style.

We do have plans to make a lesson about Styles for the DLS Course, but we haven't written this lesson yet.  I realize that the distinctions here are kind of subtle, and it can be hard to get one's head around it.

-Beth

On Apr 8, 2024, at 5:13 PM, 'Oumar Bah' via FLEx list <flex...@googlegroups.com> wrote:

Beth, I must be missing something. OK, this is what I tried: I first selected the Dictionary Vernacular style for the Before/After stuff. This style is set to italic in my case. Then I clicked at the Highlight Affected Content yellow box. As you can see in my picture, Pl: and the plural itself are affected. Then I clicked at "Style" menu and selected the Dictionary Headword style. That one is bold. I also made sure that bold is selected (see picture). After I dit OK, I closed the dialogue window and came back to the first Dictionary configure window. Final result: Pl: and the plural form are both italic. When I again click at the style menu, to check, I find out the style of the plural field has been reset to Dictionary vernacular. In your picture with your Question custom field, the Before/After area is empty, so I wonder where you entered the Before/After stuff.  

Regards
Oumar

Le lundi 8 avril 2024 à 02:41:36 UTC+2, Beth-docs Bryson <beth-doc...@sil.org> a écrit :


Hi, Oumar.

In your picture, you have told it that the Plural field should use the style called “Dictionary-Context”.  Since that is the name of the style that is always used for the Before/After material, you have basically told it, “Always format the contents of the Plural field the same as the Before/After material.”  

What Kevin was suggesting is that instead of choosing “Dictionary-Context” as the Style for the Plural field, choose some other style.  I actually recommend choosing Dictionary-Vernacular, because that reflects the function better.  Dictionary-Vernacular is by default set to come out bold, and that would apply to any word set to use that style, whether it’s in the Plural field or not (I think it is used by cross references or some other places where vernacular occurs).  

Here is a picture where I have set a custom field (in this case, the “Questions” field) to use the Dictionary-Vernacular style.

<StyleChosenForCustomField.png>

When you said you were setting something to “strong”, was it in this dialog, or in the Styles dialog?

Here is a picture of the Styles dialog, where you can configure the formatting that is used by the style called “Dictionary-Context”.  By default, nothing is set—it is inheriting all of its values.  But you could make it italic or bold or a different color…. But keep in mind, it will apply not only to the Before/After on the Plural field, but on all other fields that have Before/After material.

<Styles-DictionaryContext.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/431767618.10065448.1712621609752%40mail.yahoo.com.
<Before After Style.png><Style for Plural field.png><Bold style selected.png><StyleChosenForCustomField.png><Styles-DictionaryContext.png>

Oumar Bah

unread,
Apr 11, 2024, 8:01:57 AMApr 11
to flex...@googlegroups.com
Hi Beth, thanks for shedding light on this intricate subject.
Am Mi., Apr. 10, 2024 at 19:24 schrieb Beth-docs Bryson
Reply all
Reply to author
Forward
0 new messages