Am 26.01.2011 um 15:00 schrieb Walter:

I'll try to answer this - although I surely don't have so much time you had to 
write this.

> Whilst using LyX 2.0beta1 [since verified on LyX 2.0beta3] I recently ran
> a spell check for the first time.
> 
> The interface is good and no doubt an improvement on previous eras, however
> the following struck me as possible to improve.
> 
> Those items marked with "[*]" I consider a bug in LyX. Those items marked
> with "[X]" I consider a bug elsewhere.
> 
> 
> 1. Preferences|Language Settings|Spellchecker [*]
>   ----------------------------------------------
>   Fields lack a description.  Faced with having used non-US spelling
>   in my document ("for shame!"), I do not want to manually set hundreds
>   of individual words to be 'English (UK)', which using the inbuilt right
>   sidebar interface appears to be the default way forward.  (For some
>   reason, 'English (AU)' is not even an option on my system, though that's
>   probably my fault.)

The following refers to the field "Alternative language" I'd guess.

>   Thus driven to the preferences dialog, I was unsure of which mystical
>   value to enter in to the great LyX machine.  Assuming 'man aspell' would
>   clear it up, indeed some text was located that made the expected format
>   for the entry of a single language value probable:
> 
>    "It follows the same format of the  LANG  environmental variable on
>     most systems. It consists of the two letter ISO 639 language code and
>     an optional two letter ISO 3166 country code after a dash or underscore."
> 
>   I tried this ("en_AU"), and it did work.  However, there are two problems:
>    - Even the first step would be a challenge for some users
>    - I would like to add multiple values to the field, since otherwise even
>      at this early stage of my document still hundreds of words and place
>      names in French, German, Greek (+romanised Greek), Chinese (+romanised
>      Chinese), etc. trip up the spell checker. (Use of these languages
>      is frequent and scattered right throughout the document.)

Ok, with this use case - mixed language documents - you are requested to
mark the text appropriately. Here LyX does no guessing and there are no
plans to change that.

>   The method to do this (eg: separate multiple values with a space or comma),
>   or indeed whether entering multiple values in to this field is at all
>   possible remains unclear.
> 
>   Whilst the ideal route would be to add (relatively) complex integration
>   code that auto-detected available spellcheckers, their dictionaries,
>   and provided a sexy GUI for end user language selection instead of a
>   mystical text field, I realise this is not going to happen overnight or
>   perhaps ever.

Alternative language is a - as I would rate it - cul-de-sac and shouldn't be 
there.
If any LyX should have a mapping of available languages to alternate languages.

As it is now the single value here is used for all text having the documents 
language
as a replacement to pass on to the spell checker.

So if you want to use English (UK) you don't need to change it here -
simply set your document language to English (UK).

The alternate language is used for all (!) languages regardless of making 
any sense. If you edit a french LyX-document and the alternate language
is set to "en_GB" e. g. you'll have no fun.

This is what I would rate as a bug. 

So this field is of very limited "use" and should be replaced by something else.
Of course "something else" may have an more user friendly interface too...

But it can be tricky to make it right. It heavily depends on the spell checker -
aspell e. g. accepts completely different "alternative" language settings as
hunspell or apples spell checker do. And it depends on the runtime-environment -
what dictionaries are available for the user on the current machine.
And we have the feature to switch between the spell checker back ends at 
runtime.

>   Thus, as a relatively easy half-way fix, could we please have some
>   increased on-screen documentation?  Something like "eg: 'en_GB' for
>   aspell." may suffice for 95% of users.

Until the field gets replaced or removed a tooltip may help.

> 2. Right click to set spellchecker language on a highlighted word fails [*]
>   ------------------------------------------------------------------------
>   It appears that when 'Tools|Preferences|Language Settings|Spellchecker|
>   Spellcheck continuously' is set, and red-wavy (Note: LyX 2.0.0beta1 was
>   wavy, LyX 2.0.0beta3 is straight and thicker) underlined words are right
>   clicked, there is an option to set their language for spellchecking
>   purposes.  However, this does not appear to actually do anything!
>   This makes it necessary for the user to select the word then use 'Edit|
>   Language|Whatever language' to actually perform the change - pointless
>   tedium.

You propose to auto extend the selection to word boundaries when setting
the language at a given position and no selection exists. That sounds
sensible...

> 3. Wider problem of spellchecking and multilingual support
>   -------------------------------------------------------
>   Regarding points 1 and 2, really there is a wider problem of multilingual
>   support being a little 'all over the place', with a bunch of different
>   "solutions" in use.  In terms of LyX, none of these are really "solutions"
>   as even with LyX 2.0beta1 it appears to be demonstrably impossible to link
>   the manual language markup made in conjunction with a font-linked solution
>   to the manual language markup required for spellchecking purposes.

Sorry, I cannot follow you. The language you assigned a word, phrase or 
paragraph
is used for spell checking of the given words in this area. Do you refer to the
fact that it's possible to mark two parts of a word with two languages?

>   The TeX-world's colourful background to all this is understandable, and of
>   course I would not suggest to fly in the face of either configurability
>   nor tradition nor the existing user base's preferences, however to my mind
>   it would be expedient for ease of use (especially for new users with
>   little TeX background, who - let's face it - represent the largest
>   possible and probable future user base) if LyX would 'encourage' people
>   to an 'intelligent' default solution instead of leaving them high and dry
>   with a "there's 1000 ways to do it but we're not really going to hint at
>   any of them" situation, as we see at present.  Now, I see the adoption
>   of XeTeX-specific checkboxes in LyX 2.0beta1 as a *great* step forward
>   in this direction, but "there's a ways to go yet".

Surely. (But that's not my playground.)

>   As per previous posts whereby I suggested revising the user interface to
>   make proper use of available databases and let the user assign fonts
>   to unicode blocks and/or languages and/or custom defined text-types for
>   font selection purposes, a forward-looking, integrated solution should
>   also take in to account spellchecker requirements.
> 
>   Otherwise, we poor users are laboured with having to make 1000 manual
>   markups just to include a short bit of text!  This is exemplified if,
>   for instance, one wishes to quote a place name with translations and their
>   romanised equivalents in situ at many points throughout a document
>   (my unfortunate situation, and before anyone asks: no I cannot switch to
>   compiling a reference table, for reasons of readership and readability)
> 
>   In summary, a short list of user-side 'wants' for such a future upgrade
>   to multilingual support would be:
>    - works with unicode TeX systems (XeTeX)
>    - works with TTF
>    - provides dialog based font selection (see previous post)
>    - provides dialog based language selection (see previous post)
>    - does not require duplicate language markup for the font subsystem
>      and the spellchecker subsystem
>    - upgrades the spellchecker subsystem to be more multilingual aware
> 
>   Please do reference the previous message which included a UI mockup for
>   further details on the proposed genre of solution:
>    http://www.mail-archive.com/lyx-users@lists.lyx.org/msg83635.html
>    http://pratyeka.org/unicode-font-mockup.png (hosted copy of mockup)

I didn't follow this in detail - sorry...

But your wish list above seems a little bit too general.
E. g. "upgrades the spellchecker subsystem to be more multilingual aware"...
What do you have in mind exactly?

> 
> 4. Weird behaviour with common prefixes and specialist compounds [X]
>   -----------------------------------------------------------------
>   Common prefixes such as micro and proto seem to confuse aspell.  Not sure
>   if this is somehow related to how it is linked from LyX, but I assume the
>   issue is with them.  For example, 'proto-<known word>' does not seem to
>   be accepted, forcing 'proto' to be added manually as a valid word.
>   Unfortunately, the LyX interface does not offer a proper workaround.
>   (Please see point 5.)
>   (Note: Upon further investigation, actually a lot of words appear to be
>    missing from the default dictionary, including "hewn", "proven",
>    "romanised". A scrabble player would be dismayed: for many points!)
>   (PS: Did anyone ever wonder about the etymology of 'hardscrabble'? I think
>    aspell's default English dictionary could be involved in at least one
>    definition...)

This one I have to investigate, cannot comment on this now.

But, AFAIK there is no default aspell dictionary. It depends on the
software packager what gets distributed. You may have an installation
with german dictionary only. And there are different english dictionaries
available...

This is, what my aspell installation has to offer for english:
* en, en-w_accents, en-wo_accents
* en-variant_0, en-variant_1, en-variant_2
* en_CA, en_CA-w_accents, en_CA-wo_accents
* en_GB, en_GB-w_accents, en_GB-wo_accents
* en_GB-ise, en_GB-ise-w_accents, en_GB-ise-wo_accents
* en_GB-ize, en_GB-ize-w_accents, en_GB-ize-wo_accents
* en_US, en_US-w_accents, en_US-wo_accents

Some of them are combined dictionaries.

Another option is to switch to hunspell and use the openoffice dictionaries.
It is said that these dictionaries are superior.

> 5. Right sidebar spellchecker interface: word addition [*]
>   -------------------------------------------------------
>   At various points throughout my document I use accepted phrases within
>   the sphere of my writing such as "Proto-Austro-Tai" and "Tai-Kadai".
> 
>   Whilst "Tai" and "Kadai" are also used as individual words, "Proto" and
>   "Austro" are not.  With the present spellchecker interface, when such
>   'word portions' occur, I am only given two options:
> 
>    1. Adding these 'word portions' as words in their own right
>    2. Ignoring them as words in their own right
> 
>   Both options are less than ideal because they will subsequently allow
>   the individual words to occur alone, ie: such that human input could
>   conceivably render "Come hither, pronto!" as "Come hither, proto!" and
>   the spellchecker would consider this to be correct, despite the fact
>   that proto should possibly not occur as a word in its own right.
>   (OK well that's probably arguable, but you still see the point!)
> 
>   The best option for resolving this would be to modify the LyX spellchecker
>   sidebar interface to allow adding arbitrary words or entire words rather
>   than simply word portions thereof that have been identified by aspell as
>   unknown.  (ie: When presented with "Proto-Austro-Tai", and "Proto" is
>   highlighted, then the user should be able to add "Proto-Austro-Tai" as
>   a word in its own right rather than only the 'word portion' "Proto" itself.)
>   (If I recall, 'other' word processing solutions include this feature.)

Here LyX relies on the spell checker interface. Most checkers are able to do
the checks at word level only. Consequently you cannot add compound words to
your personal dictionary, AFAIK. Here I want to wait for an improvement of the
spell checker libraries. It's possible to check complete sentences -
the apple spell checker has this capability. It's even able to auto-dectect
the language...

> 6. Dictionary Re-Use Support [*]
>   -----------------------------
>   Another point is that of re-use.  Which is to say that, when someone uses
>   for example 'BibTeX' to compile a biliographic database, that database
>   may easily be used with other projects and is considered portable.  So
>   for all physics papers I can use one bibliography, and I may have another
>   for history papers.  Whilst this is presently handled adequately by LyX,
>   the equivalent functionality is not present for dictionary databases.
>   It should be.  This means both adding a 'manage multiple dictionaries in
>   this project' feature-set, and adding a 'which dictionary do you want to
>   add the word to' drop-down in the right hand spellchecker sidebar.

This is a good idea (already mentioned on developers list, AFAICR).
The idea is to incorporate a personal dictionary into the document.
But it definitively will not happen tomorrow.

> A big thank you to the hard working developers, please do not interpret the
> above as anything but forward looking ideas and constructive criticism, your
> hard work is brilliant and very well received!

Thank you.

Stephan

Reply via email to