On Fri, Jul 20, 2001 at 03:58:39PM +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Yves" == Yves Bastide <[EMAIL PROTECTED]> writes:
> 
> Yves> Hi, Here's a proposed patch to use frenchb's guillemets \og and
> Yves> \fg (which have proper spacing) when using frenchb. The current
> Yves> code does it only when fontenc != T1 -- not frequent among
> Yves> French writers (:
> 
> Yves> (This patch is for 1.1.6; I can prepare another for -devel if
> Yves> accepted.)
> 
> Yves, could you checkwhat I did for 1.2.0? If it works well, I may
> adapt it to 1.1.6 too.

There were two problems: when using a language other than french or
frenchb, no french quotes were inserted.  And {} was missing after \fg,
eating a possible linebreak.  The following patch cures both of them.

Note that there is still one problem with frenchb: the output of \of and
\fg depends on the language in use when they are invoked, not on the global
language; i.e.
« a » « a » « a »
      ^^^^^ Layout/Characters/Language American
is output as « a » ``a''  « a »
-- with the wrong quotes and one extra space.  I don't know if
InsetQuotes::latex needs more tinkering around this feature, though...

> 
> JMarc

-- 
        Yves
Index: src/insets/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.142
diff -u -p -r1.142 ChangeLog
--- src/insets/ChangeLog        2001/07/20 16:29:54     1.142
+++ src/insets/ChangeLog        2001/07/20 23:05:53
@@ -1,3 +1,8 @@
+2001-07-21  Yves Bastide  <[EMAIL PROTECTED]>
+
+       * insetquotes.C (latex): fix the handling of french double quotes
+       when not using the french pachage.
+
 2001-07-20  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * insetindex.h: shut off warning
Index: src/insets/insetquotes.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/insets/insetquotes.C,v
retrieving revision 1.51
diff -u -p -r1.51 insetquotes.C
--- src/insets/insetquotes.C    2001/07/20 09:38:18     1.51
+++ src/insets/insetquotes.C    2001/07/20 23:05:53
@@ -253,18 +253,18 @@ int InsetQuotes::latex(Buffer const * bu
        int quoteind = quote_index[side_][language_];
        string qstr;
        
-       if (language_ == FrenchQ && times_ == DoubleQ) {
-               if (doclang == "frenchb") {
-                       if (side_ == LeftQ) 
-                               qstr = "\\og "; //the spaces are important here
-                       else 
-                               qstr = " \\fg "; //and here
-               } else if (doclang == "french") {
-                       if (side_ == LeftQ) 
-                               qstr = "<< "; //the spaces are important here
-                       else 
-                               qstr = " >>"; //and here
-               }                       
+       if (language_ == FrenchQ && times_ == DoubleQ
+           && doclang == "frenchb") {
+               if (side_ == LeftQ) 
+                       qstr = "\\og "; //the spaces are important here
+               else 
+                       qstr = " \\fg{} "; //and here
+       } else if (language_ == FrenchQ && times_ == DoubleQ
+                  && doclang == "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

Reply via email to