On 2016-12-09, Jean-Marc Lasgouttes wrote: > Le 08/12/2016 à 00:09, Guenter Milde a écrit :
>> * consistency: currently, if a user sees a guillemot « on screen, it >> can be a literal character or a Quote inset and the LaTeX export can >> be >> "«" or "\guillemotleft" (depending on the "inputencoding") >> "<<" (for Quote inset, even if « is supported by the encoding) > Concerning this particular part: it is a remnant of the situation for > french language 10+ years ago whaere we had to competing solutions. So > it should indeed be cleaned-up with vigor. This is (partially) cleaned up already: literal « »: converted to \guillemotleft, \guillemotright if required, kept if supported by encoding. Quote inset fld frd: converted to \og \fr if language is french and language package babel, converted to \guillemotleft, \guillemotright else. This works nice with Babel and 8-bit fonts. With non-TeX fonts and babel, \guillemotleft, \gullemotright, \guilsinglleft, and \guilsinglright are taken from CM: this results in non-matching characters if the document font is not CM. (Exception: correct «» if the text language is french.) No auto-spaces around quotes with polyglossia or HTML BTW: LyX (Built from git commit hash e4c46abe) crashes with non-TeX fonts: ( 1) /usr/local/src/lyxtest/bin/lyx2.3: lyx::frontend::Alert::doError(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, bool) ( 2) /usr/local/src/lyxtest/bin/lyx2.3: On screen, the spaces are shown * if the document language is set to French but not if only the text language is French. * for all quotes, not just guillemets. > However, it would need to double check whether the handling of « as > defined in some language agnostic unicode package caters for the need > that we have for French language (to be frank, I do not have the answer > here, but there is a lot of code in french.ldf). Currently, no auto-space around literal quote characters: Suggestions: a) differentiate «french» (with hard-coded small spaces) and «swiss» (without)? Do you also want a space around quoted text for single guillemets? +1 works independent of Babel -1 double space, if user inserts a space, too. b) preamble code: go=«, gc=» for encodings supporting «» or preamble code \renewcommand{\guillemotleft}{\og} \renewcommand{\guillemotright}{\fg}? Problematic, because «» will be turned into English quotes in other languages: If French quote characters are available on your keyboard, you can use them, to get proper spacing in L A TEX 2 ε see option og=«, fg=» p. 8. \og and \fg can be used outside French, they typeset then English quotes “ and ”. — `texdoc babel-french` It should work with Babel when redefining \guillemotleft and \guillemotright to \og fg in \extrasfrench and reset it in \noextrasfrench. +1 it does not matter, whether you input the spaces or not: Babel inserts them if required and adapts them to the correct size if they are there. -1 does not work with Polyglossia nor with HTML. Günter