On 2016-12-07, Jean-Marc Lasgouttes wrote:
> Le 07/12/2016 à 13:27, Guenter Milde a écrit :

...
>> The Quotes inset shows a number of problems that could easily be solved
>> by using literal Unicode characters instead

>> Most important:

>> * Adjoining closing Single + double quote becomes double + single quote
>>   (for English, Swedish and German, LaTeX export as ''').

>> * French double quotes are converted to << >> in the LaTeX file and to
>>   double inverted question/interrogation marks in the output, if the font
>>   encoding is set to [None] or OT1 but the global default is T1. (test
>>   for lyxrc.fontenc instead of the document-specific fontenc setting in
>>   InsetQuotes.cpp).

> Would these two problems be solved just by making the quote inset always 
> use unicode on output? 

Yes.

In addition, it would automatically also solve the HTML output (we use
utf8-encoded characters anyway, so this would be the better choice for
quotes as well) and the output for non-TeX fonts: Uses TeX-Ligatures and
LICR macros instead of Unicode characters.

> The use of unicode is orthogonal to the use of a 
> quote inset, right?

Not fully orthogonal:

* use of Unicode can be combined with Quote insets (i.e. the insets
  are converted to Unicode characters at export), or
  
* use of Unicode can replace the Quote insets (i.e. the "insert quote" LFUN
  directly inserts Unicode characters).

> I agree that currently the quote inset is not very helpful (only french 
> spacing is important here). If however some smart quote handling gets 
> introduced, then the inset will be mandatory.

The current behaviour of "insert-quote" LFUN is usually called "smart
quotes". This can be done without Quote insets.

Only if we want to keep the type of quotes configurable also after
insertion, "dynamic" Quote insets are required.
But even then, the existing "static" Quote insets should be converted to
Unicode in the source files with lyx2lyx.

> What bugs would remain once this switch to unicode is done in the inset? 
> Except of course that the code is still complicated.

Data loss when converting to a "listings" or ERT or URL inset.
http://www.lyx.org/trac/ticket/7309

Günter


Reply via email to