Page 1 of 1

Display main headword in article window

PostPosted: Fri Jun 10, 2011 12:38 pm
by det
Another dictionary display question: For the headword in the article window, GoldenDict displays the indexed word that matches the recent search. Is it possible to have the entry's main headword displayed instead? This is relevant when there are multiple words indexed for a given entry, as in the dsl entry below:

Code: Select all
main_headword     <-- The main headword is at the top of the list
extra_indexword
extra_indexword2
    [m1] entry [/m]

As it is, if I search for extra_indexword, that will show as the headword, when I really want the main_headword to display.

Re: Display main headword in article window

PostPosted: Fri Jun 10, 2011 12:47 pm
by Tvangeste
det wrote: Is it possible to have the entry's main headword displayed instead?

Not really. For both GoldenDict and Lingvo the multiple headwords are equally significant, and there is no single *main* headword among them. In fact, Lingvo DSL compiler, before compressing the DSL into proprietary format, expands all cards with multiple headwords into multiple cards with single headword. After such transformation, each card has exactly one headword and knows nothing about others.

Yes, sometimes this is not the best approach and I've seen dictionaries that trying to deal with this one way or another. The most popular solution, it seems, is to put the main headword also in the card's body, on the first line, in bold. This is also easily scriptable in your case: find cards with multiple headwords, and copy first headword into first line that starts with space or TAB.

Re: Display main headword in article window

PostPosted: Fri Jun 10, 2011 2:20 pm
by det
Yes, at the moment, I'm beginning the entry with the headword in bold, as you suggest. I actually get the headword with the '~' (tilde), as ikm suggested (http://goldendict.org/forum/viewtopic.php?f=5&t=751#p3003). Since the tilde is replaced by the main headword, I figured that it did have a special status -- and could maybe be displayed as headword.

This post is also related to GoldenDict's lack of support for the dsl '@' tag for subentries, discussed here:
http://goldendict.org/forum/viewtopic.php?f=5&t=837.
(most of the extra index words are subentry words, in this case.)