Shortcomings of Configure Dictionary View - need paragraph styles

49 views
Skip to first unread message

Jeff Heath

unread,
May 18, 2023, 12:07:56 PM5/18/23
to FLEx list
I have been fixing a few bugs in Dictionary App Builder, and I'm hopeful that in the near future you will be able to export your Dictionary View in XHTML format, and when you load that format into a DAB app, you will get (roughly) that same format in your entries in the app, as long as you uncheck the "Modify styles for single entries" box on the Styles > Modifications page.

But there are some problems with the way FLEx configures Dictionary Views that make it difficult to get the kinds of format that would really be best in an app format. What’s the general rule for print dictionaries? Cram as much information into as little space as possible, so your printed book isn’t too big! So each entry is basically a single run-on paragraph, with cryptic abbreviations, and you need to find creative character combinations to separate the information so it doesn’t all run together, like ; [ ] ( ) . / etc.

But consider this “app-friendly” layout:
annak entry.jpg
The labels (plural, grammatical category) are spelled out, the category itself is a full word and not an abbreviation, the examples are spaced out with one phrase on each line, blank lines separating them, etc. It’s easy enough to swipe up to scroll a long entry on an Android app, so let’s spread the information out and make it easier to read.

The layout above is actually a screen shot from an entry preview in FLEx. And in my test version of DAB, I can get roughly that same layout in an app. This is also a helpful sort of view for other digital formats, like Webonary.

So where’s the problem? I achieved that layout by using the recommendation found in the FLEx Help system, which is adding “\A” in various before, between and after context fields to create line breaks. So, for example, here are the context fields of the Examples field in Configure Dictionary View:
Examples context.jpg
So there are two line breaks before the “example:” label, and another two line breaks in between the two examples - that produces the blank line before and between the blocks that show the example sentences.

But "\A" is actually a line feed, which jumps you to the next line, but does NOT create a new paragraph. This may be acceptable in print layouts, where you are pretty much dealing with a single paragraph anyway, and you want to keep everything compact. But in an app layout, where you can spread things out more, you really want the ability to produce new paragraphs. If you look at the default styles on the Styles > Modifications page in DAB, you’ll see that many of the changes proposed are to add the "display:block;" property. This effectively creates a paragraph for that style. (But shifting from character to paragraph styles also leads to some problems...)

Why is this important? Because if you just have manual line breaks and not real paragraphs, you can’t do normal paragraph formatting. Look at this entry, which has been presented on a narrow “screen”:
ajangdaa entry.jpg
Most of the lines wrap around, but they don’t have a hanging indent like you might have if it were a real paragraph. It just wraps around to the next line, so it’s hard to separate the lines. The only line that wraps around with hanging indent is the gloss (sens) line, and that has an indent because I checked the box in the Senses field to “Display each sense in a paragraph”. So that actually is a new paragraph, and does what we want it to do.

So why am I telling you all this? I’m wondering if the Configure Dictionary View system in FLEx needs to be reconsidered. Specifically it seems like we need more mechanisms for the formatting of a Dictionary View to allow paragraph styles, rather than just character styles in a run-on paragraph, with line feed paragraph approximations.

This topic could be discussed in this thread, but I’m wondering if it would be more effective to have a small group of interested people get together on Zoom and brainstorm a bit what that might look like in FLEx. If you’re interested, let me know here or with a PM.

Thanks,
Jeff

David Payne

unread,
May 19, 2023, 3:57:29 PM5/19/23
to FLEx list
I'm interested in this topic, as I've been disappointed in the lack of hanging indent for paragraphs in dictionary view and publication... for the same reasons you mention of using electronic publication of the dictionary that is visually easier to decipher than the dense paper-publication style. 

larry....@canil.ca

unread,
May 19, 2023, 6:13:05 PM5/19/23
to FLEx list
I'd be interested as well. 

Susie Locklin

unread,
May 19, 2023, 6:18:16 PM5/19/23
to flex...@googlegroups.com
I don't have the background or the time at the moment to be involved in figuring something out, but I would love to see what you come up with!
Susie

--
"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/24bbbf5d-a202-4cbc-a231-a8ab76552c61n%40googlegroups.com.

Jeff Heath

unread,
May 20, 2023, 6:41:49 AM5/20/23
to FLEx list
Thanks for your comments, both here and through a number of direct messages.

I want to make it clear that I think the current Configure Dictionary View tool is brilliant, and really quite amazing in what it can do, especially if you export the XHTML and look at the complexity of what it is doing in the background. From my experience, I think the tool is perfect for the formatting of print dictionaries. (When I first learned about it, after typesetting some Toolbox dictionaries manually, I was amazed and relieved...) So in my initial post saying that the tool needs to be "reconsidered", that was really a poorly chosen word.

I want to consider rather if there might be some small tweaks possible to that tool that would ease formatting of dictionaries for digital publication (e.g. for Dictionary App Builder and Webonary). The main issue, I believe, is the availability of paragraph formatting for certain fields.

I won't go into all the details here, but if you read your FLEx documentation carefully, there is a ProjectDictionaryOverrides.css file buried in the FLEx project folder which you can modify to change the CSS properties of various styles. (You need to export your project to XHTML format first to find out what the styles are named.) Changes you make in that file are reflected directly in the entry preview in FLEx (after a refresh), and in the XHTML export. Applying various "paragraph" properties in this overrides file, I have fixed the layout of the "narrow screen" image above so that it now appears like this:
improved ajangdaa entry.jpg
Probably still not perfect, but much improved for readability. I've attached the overrides file, in case you are interested in looking at it/copying ideas from it for your layouts. So even with the current version of FLEx, it is possible to get the paragraph formatting that I'm talking about, but it's fairly challenging technically (i.e. not for the faint of heart). Might there be some small tweaks to the layout tool in FLEx that could give us some of this functionality without the technical challenge?

I am in contact with Jason Naylor and Beth Bryson, and will be talking through some of these issues with them. I'm not sure if the expressions of interest above (@David, @Larry) mean you want to be in on the discussions, or you are more interested in the outcome... so let me know if the former. If people have additional thoughts, feel free to post them here or send me a direct message.

Thanks,
Jeff

ProjectDictionaryOverrides.css

Oumar Bah

unread,
May 20, 2023, 9:51:08 AM5/20/23
to flex...@googlegroups.com, Jeff Heath
I loose now the indention when exporting from Flex to Libre Office via Pathway. In early versons of Flex and Pathway the export worked fine. For the Dictionary App Builder I am happy to have a specialist of Xhtml who helps me :-) 
Jeff, maybe you better share this stuff with the user forum of the Dictionary App Builder. I am sure there are people there who are interested. 

Oumar


Le sam., mai 20, 2023 à 12:41, Jeff Heath
<jeff_...@sil.org> a écrit:

Thanks,
Jeff

--
"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

Jeff Heath

unread,
May 20, 2023, 10:31:53 AM5/20/23
to FLEx list
> maybe you better share this stuff with the user forum of the Dictionary App Builder. I am sure there are people there who are interested.

I will wait until there is a new release of DAB with the fixes I mentioned in the first post to post on the forum, but yes, I'm pretty sure there will be some interested people there. In my posts so far, I've just focused on the FLEx side of things.

Jeff Heath

unread,
May 20, 2023, 10:48:19 AM5/20/23
to FLEx list
> I loose now the indention when exporting from Flex to Libre Office via Pathway. In early versons of Flex and Pathway the export worked fine.

Are you saying that you tried out some of the paragraph formatting that I suggested, and then exported that format to LO through Pathway? If you are creating a print format, then I would recommend NOT doing the paragraph format changes I mentioned. One paragraph for the entry, maybe one for each sense, and subentries, but you don't want lots of paragraphs in a print format because it takes up a lot of space. Just for fun, I tried exporting the dictionary format above (with the overrides) through Pathway. It gave a reasonable representation of the entry format, but you would need to customize the styles in LO considerably. (For one thing, it doesn't seem to add a field indent to its parent indent, so everything by default is lined up at the left margin.)

Bart-Jacqueline Eenkhoorn

unread,
May 24, 2023, 4:24:43 AM5/24/23
to 'Oumar Bah' via FLEx list
I would also be interested, but maybe not if you decide to share the results in this [FLEx] google group. How about starting a collaborative file : "FLEx - Common Practice" and put the results of the discussions / solutions there? 


glyph3 and logoBart Eenkhoorn
Linguist / Facilitateur
SIL Afrique de l’Ouest
--
"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.
Reply all
Reply to author
Forward
0 new messages