>>>>> "Yves" == Yves Bastide <[EMAIL PROTECTED]> writes:
Yves> Sorry to answer so late. Your patch doesn't solve the main Yves> problem: how to use frenchle with a recent TeX distribution. But Yves> I don't see any reasonable way for it (that is, short of dubious Yves> symlinks, sed preprocessing, babel enhancement and such) so it Yves> may be the best option... Yes, this is my problem. Actually it would be possible to add frenchle as a second french option but: - it confuses people - the packages that rely on french or francais option for their l10n won't work. Yves> Just one nit: add a comment to the latex_options, such as Yves> +french french "French" false iso8859-1 fr_FR Yves> "\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>[EMAIL PROTECTED] Yves> % Definitions of \og and \fg for older french language Yves> definitions" Unfortunately I cannot do that because the file lib/languages does not allow lin breaks in fields (it would not be _so_ difficult to change, but now is not the time for that). Therefore I added a comment in the file itself, but it will not appear in the .tex file. Here is the patch I am going to commit. JMarc
Index: development/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/ChangeLog,v retrieving revision 1.51 diff -u -p -r1.51 ChangeLog --- development/ChangeLog 21 May 2005 13:26:09 -0000 1.51 +++ development/ChangeLog 7 Jul 2005 10:33:22 -0000 @@ -1,3 +1,7 @@ +2005-07-07 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * FORMAT: document change to format 242. + 2005-05-20 Michael Schmitt <[EMAIL PROTECTED]> * Win32/fakeconfig/lyxrc.defaults: rename "ASCII" Index: development/FORMAT =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/FORMAT,v retrieving revision 1.38 diff -u -p -r1.38 FORMAT --- development/FORMAT 9 Jun 2005 09:58:01 -0000 1.38 +++ development/FORMAT 7 Jul 2005 10:33:22 -0000 @@ -1,6 +1,12 @@ LyX file-format changes ----------------------- +2005-06-21 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * format incremented to 242. There is no file format per + se, but the "frenchb" language has been removed from lib/language + and has to be translated to "french" by lyx2lyx. + 2005-02-03 Georg Baum <[EMAIL PROTECTED]> * format incremented to 241. Index: lib/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v retrieving revision 1.713 diff -u -p -r1.713 ChangeLog --- lib/ChangeLog 30 Jun 2005 07:12:25 -0000 1.713 +++ lib/ChangeLog 7 Jul 2005 10:33:22 -0000 @@ -1,3 +1,9 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * languages: remove language "frenchb"; with language "french" + provide default values for \og and \fg if needed; use babel option + "canadien" for French Canadian + 2005-06-30 Georg Baum <[EMAIL PROTECTED]> * reLyX/syntax.default: recognize optional argument of \frame Index: lib/languages =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/languages,v retrieving revision 1.21 diff -u -p -r1.21 languages --- lib/languages 13 Sep 2004 14:27:19 -0000 1.21 +++ lib/languages 7 Jul 2005 10:33:22 -0000 @@ -11,7 +11,7 @@ breton breton "Breton" false iso88 british british "British" false iso8859-1 en_GB "" bulgarian bulgarian "Bulgarian" false cp1251 bg_BG "" canadian canadian "Canadian" false iso8859-1 en_CA "" -canadien frenchb "French Canadian" false iso8859-1 fr_CA "" +canadien canadien "French Canadian" false iso8859-1 fr_CA "" catalan catalan "Catalan" false iso8859-1 ca_ES "" croatian croatian "Croatian" false iso8859-2 hr_HR "" czech czech "Czech" false iso8859-2 cs_CZ "" @@ -22,8 +22,8 @@ esperanto esperanto "Esperanto" false #and what country code should esperanto have?? (Garst) estonian estonian "Estonian" false iso8859-1 et_EE "" finnish finnish "Finnish" false iso8859-1 fi_FI "" -frenchb frenchb "French" false iso8859-1 fr_FR "" -french french "French (GUTenberg)" false iso8859-1 fr_FR "" +# We redefine \og and \fg (guillemets) for older french language definitions +french french "French" false iso8859-1 fr_FR "\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>[EMAIL PROTECTED]" galician galician "Galician" false iso8859-1 gl_ES "" # There are two Galicia's one in Spain one in E.Europe. Because of # the font encoding I am assuming this is the one in Spain. (Garst) Index: lib/lyx2lyx/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v retrieving revision 1.78 diff -u -p -r1.78 ChangeLog --- lib/lyx2lyx/ChangeLog 7 Jul 2005 09:19:50 -0000 1.78 +++ lib/lyx2lyx/ChangeLog 7 Jul 2005 10:33:23 -0000 @@ -1,3 +1,8 @@ +2005-06-21 Georg Baum <[EMAIL PROTECTED]> + + * lyx_1_4.py (convert_french): change language frenchb to french + for format 242. + 2005-07-07 José Matos <[EMAIL PROTECTED]> * LyX.py (read): Ignore whitelines on header. Fix reading the Index: lib/lyx2lyx/LyX.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.17 diff -u -p -r1.17 LyX.py --- lib/lyx2lyx/LyX.py 7 Jul 2005 09:19:50 -0000 1.17 +++ lib/lyx2lyx/LyX.py 7 Jul 2005 10:33:23 -0000 @@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0. ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]), ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]), ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]), - ("1_4", range(223,242), ["1.4.0cvs","1.4"])] + ("1_4", range(223,243), ["1.4.0cvs","1.4"])] def formats_list(): Index: lib/lyx2lyx/lyx_1_4.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v retrieving revision 1.34 diff -u -p -r1.34 lyx_1_4.py --- lib/lyx2lyx/lyx_1_4.py 6 Jul 2005 17:50:10 -0000 1.34 +++ lib/lyx2lyx/lyx_1_4.py 7 Jul 2005 10:33:23 -0000 @@ -1844,6 +1844,13 @@ def revert_ert_paragraphs(file): i = i + 1 +def convert_french(file): + regexp = re.compile(r'^\\language\s+frenchb') + i = find_re(file.header, regexp, 0) + if i != -1: + file.header[i] = "\\language french" + + ## # Convertion hub # @@ -1869,9 +1876,11 @@ convert = [[223, [insert_tracking_change [238, [update_latexaccents]], [239, [normalize_paragraph_params]], [240, [convert_output_changes]], - [241, [convert_ert_paragraphs]]] + [241, [convert_ert_paragraphs]], + [242, [convert_french]]] -revert = [[240, [revert_ert_paragraphs]], +revert = [[241, []], + [240, [revert_ert_paragraphs]], [239, [revert_output_changes]], [238, []], [237, []], Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2212 diff -u -p -r1.2212 ChangeLog --- src/ChangeLog 6 Jul 2005 07:28:13 -0000 1.2212 +++ src/ChangeLog 7 Jul 2005 10:33:23 -0000 @@ -1,3 +1,9 @@ +2005-06-21 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * buffer.C: format incremented to 242. There is no file format per + se, but the "frenchb" language has been removed from lib/language + and has to be translated to "french" by lyx2lyx. + 2005-07-06 Georg Baum <[EMAIL PROTECTED]> * cursor_slice.h, dociterator.h: add some documentation Index: src/buffer.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v retrieving revision 1.618 diff -u -p -r1.618 buffer.C --- src/buffer.C 19 May 2005 08:43:51 -0000 1.618 +++ src/buffer.C 7 Jul 2005 10:33:23 -0000 @@ -143,7 +143,7 @@ extern BufferList bufferlist; namespace { -int const LYX_FORMAT = 241; +int const LYX_FORMAT = 242; } // namespace anon Index: src/outputparams.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/outputparams.h,v retrieving revision 1.12 diff -u -p -r1.12 outputparams.h --- src/outputparams.h 19 Jan 2005 15:03:29 -0000 1.12 +++ src/outputparams.h 7 Jul 2005 10:33:23 -0000 @@ -19,6 +19,7 @@ class ExportData; +class Language; class OutputParams { @@ -57,9 +58,9 @@ public: */ bool intitle; - /** the babel name of the language at the point where the inset is + /** the language at the point where the inset is */ - std::string local_language; + Language const * local_language; /** Document language babel name */ Index: src/paragraph.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v retrieving revision 1.406 diff -u -p -r1.406 paragraph.C --- src/paragraph.C 10 Jun 2005 14:55:01 -0000 1.406 +++ src/paragraph.C 7 Jul 2005 10:33:23 -0000 @@ -1034,7 +1034,7 @@ bool Paragraph::simpleTeXOnePar(Buffer c if (output || running_change != Change::DELETED) { OutputParams rp = runparams; rp.free_spacing = style->free_spacing; - rp.local_language = font.language()->babel(); + rp.local_language = font.language(); rp.intitle = style->intitle; pimpl_->simpleTeXSpecialChars(buf, bparams, os, texrow, rp, Index: src/insets/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.1158 diff -u -p -r1.1158 ChangeLog --- src/insets/ChangeLog 6 Jul 2005 07:28:14 -0000 1.1158 +++ src/insets/ChangeLog 7 Jul 2005 10:33:24 -0000 @@ -1,3 +1,9 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * insetquotes.C (latex): always use \og/\fg for the french + languages; test against the language code instead of the babel + name. + 2005-07-06 Georg Baum <[EMAIL PROTECTED]> * insettabular.C (tabularFeatures): adjust cursor after adding a column Index: src/insets/insetquotes.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.C,v retrieving revision 1.120 diff -u -p -r1.120 insetquotes.C --- src/insets/insetquotes.C 25 Nov 2004 19:13:05 -0000 1.120 +++ src/insets/insetquotes.C 7 Jul 2005 10:33:24 -0000 @@ -270,17 +270,11 @@ int InsetQuotes::latex(Buffer const &, o string qstr; if (language_ == FrenchQ && times_ == DoubleQ - && runparams.local_language == "frenchb") { + && prefixIs(runparams.local_language->code(), "fr")) { if (side_ == LeftQ) qstr = "\\og "; //the spaces are important here else qstr = " \\fg{}"; //and here - } else if (language_ == FrenchQ && times_ == DoubleQ - && runparams.local_language == "french") { - if (side_ == LeftQ) - qstr = "<< "; //the spaces are important here - else - qstr = " >>"; //and here } else if (lyxrc.fontenc == "T1") { qstr = latex_quote_t1[times_][quoteind]; #ifdef DO_USE_DEFAULT_LANGUAGE