Handling of french in LyX is not very clean mainly for historical
reasons: the first style that has existed (french.sty by B. Gaulle)
was not really free and therefore babel has adopted another style
(frenchb.ldf from D. Flipo). Various personal reasons (as I understand
it) have prevented from merging correctly these styles.

This is the reasons why LyX supports those two styels, with languages
french and frenchb, respectively. However, with recent babel versions
(as in teTeX 3), the option "french" points to frenchb.ldf, whereas B.
Gaulle's version can be had through "frenchle" (free version) or
frenchpro (shareware version) :( And of course these two packages have
a different idea of a good syntax to get french guillemets (actually,
old frenchle versions do not support guillemets at all).

Since this situation is a mess, I propose the following patch:

* only support the "french" babel option (remove one language)

* always use \og and \fg to open/close guillemets

* provide default definition for these macros in case we use an older
  frenchle.sty. 

For this to work, I will have to update the lyxformat, and Jose' will
have to provide a conversion: chnage language frenchb to french.

Is that possible?

JMarc

Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.1152
diff -u -p -r1.1152 ChangeLog
--- src/insets/ChangeLog	16 Jun 2005 15:20:09 -0000	1.1152
+++ src/insets/ChangeLog	20 Jun 2005 13:59:40 -0000
@@ -1,3 +1,8 @@
+2005-06-16  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* insetquotes.C (latex): always use \og/\fg for the french
+	language. 
+
 2005-06-16  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* insettabular.C (getStatus): disable LFUN_TABULAR_INSERT
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	20 Jun 2005 13:59:40 -0000
@@ -270,17 +270,11 @@ int InsetQuotes::latex(Buffer const &, o
 	string qstr;
 
 	if (language_ == FrenchQ && times_ == DoubleQ
-	    && runparams.local_language == "frenchb") {
+	    && runparams.local_language == "french") {
 		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
Index: lib/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.711
diff -u -p -r1.711 ChangeLog
--- lib/ChangeLog	20 Jun 2005 13:22:59 -0000	1.711
+++ lib/ChangeLog	20 Jun 2005 13:59:40 -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-20  Günter Milde  <[EMAIL PROTECTED]>
 
 	* layouts/obsolete.inc: remove, since lyx2lyx does the job.
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	20 Jun 2005 13:59:40 -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,7 @@ 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	 ""
+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)

Reply via email to