On 2015-11-21, Scott Kostyshak wrote:
> On Sat, Nov 21, 2015 at 11:09:09PM +0100, Günter Milde wrote:
>> commit 8482b2169bf9c58cac988a59e15ffa7656121427
>> Author: Günter Milde <mi...@lyx.org>
>> Date:   Sat Nov 21 23:06:24 2015 +0100

>>     Fix inputenc for some templates.

>>     Some templates had the inputenc setting "default" (meaning use the
>>     language default encoding, (not TeX's default which is 7-bit
>>     ASCII) but don't load inputenc, leave handling of non-ASCII
>>     characters to the author).

> Günter do you have suggestions for tooltips (the explanatory text that
> comes up after hovering the mouse over something for a couple of
> seconds) for the radio buttons "Language default" and "Other"?

IMO, a tool tip will not suffice.

I filed a bug report 7 years ago - unfortunately closed after just a
partial fix:

http://www.lyx.org/trac/ticket/4971


My revised suggestion would be to have separate variables for

  inputencoding          auto|ascii|... (see lib/encodings)

  inputencoding-package  auto|inputenc|luainputenc|xinputenc

  inputencoding-mixed    True|False

and in Document>Settings>Language the GUI elements:

* Drop down lists:

  Language:                        # no change

  Quote style:                     # no change

  Language package:                # no change

  Encoding:                        # with entries:

             Language Default      # corresponds to the current radio button
             ASCII
             Arabic (CP 1256)
             ...
             Western European (Macintosh Roman)

  Encoding package:  automatic
                     inputenc
                     luainputenc
                     xinputenc
                     none

* A separate tick-box

  [x] Mixed encoding # text parts in a different language use the default
                     # encoding of this language


How does this correspondent to the current GUI:

* The default case (currently radio button) becomes:

   Encoding:                 Language default
   Encoding package:         automatic
   [x] Mixed encoding

* The problematic case (currently pre-selected as "Other") becomes:

   Encoding:                 Language default
   Encoding package:         none
   [x] Mixed encoding

* Other currently selectable options become:

   Encoding:                 <drop-down list entry>
   Encoding package:         automatic
   [ ] Mixed encoding

Advantages:

* clarity: the problem of the problematic case is not described in a tooltip
  but obvious: mixed encoding but no encoding package.

* the problematic case is no longer the top case of otherwise sensible
  alternatives.

* new sensible alternatives:

  - language default document wide encoding (not mixed)

    Encoding:                 Language default
    Encoding package:         automatic
    [ ] Mixed encoding

  - document wide encoding (not mixed) with "language package == none"

    Encoding:                 Language default  # or any other list entry
    Encoding package:         none
    [ ] Mixed encoding


Problems:

  We must prevent the combination: utf8-plain with "mixed" and
  inputencoding-package other than "auto" or "none".
  
  
Günter  

Reply via email to