commit 83d2c7fa3704a221b143a54b0c78747fbd712504
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Dec 12 15:57:42 2016 +0100

    Properly terminate quote macros by means of new textstream function
    
    This prevents kerning destruction.
---
 src/insets/InsetQuotes.cpp |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp
index 6e19a1b..53d2046 100644
--- a/src/insets/InsetQuotes.cpp
+++ b/src/insets/InsetQuotes.cpp
@@ -73,21 +73,21 @@ int quote_index[2][6] = {
 
 // Corresponding LaTeX code, for double and single quotes.
 char const * const latex_quote_t1[2][5] = {
-       { "\\quotesinglbase ",  "'", "`",
-    "\\guilsinglleft{}", "\\guilsinglright{}" },
+       { "\\quotesinglbase",  "'", "`",
+    "\\guilsinglleft", "\\guilsinglright" },
   { ",,", "''", "``", "<<", ">>" }
 };
 
 char const * const latex_quote_ot1[2][5] = {
-       { "\\quotesinglbase ",  "'", "`",
-    "\\guilsinglleft{}", "\\guilsinglright{}" },
-  { "\\quotedblbase ", "''", "``",
-    "\\guillemotleft{}", "\\guillemotright{}" }
+       { "\\quotesinglbase",  "'", "`",
+    "\\guilsinglleft", "\\guilsinglright" },
+  { "\\quotedblbase", "''", "``",
+    "\\guillemotleft", "\\guillemotright" }
 };
 
 char const * const latex_quote_babel[2][5] = {
-       { "\\glq ",  "'", "`", "\\flq{}", "\\frq{}" },
-  { "\\glqq ", "''", "``", "\\flqq{}", "\\frqq{}" }
+       { "\\glq",  "'", "`", "\\flq", "\\frq" },
+  { "\\glqq", "''", "``", "\\flqq", "\\frqq" }
 };
 
 char const * const html_quote[2][5] = {
@@ -269,9 +269,9 @@ void InsetQuotes::latex(otexstream & os, OutputParams const 
& runparams) const
                // Specific guillemets of French babel
                // including correct French spacing
                if (side_ == LeftQuote)
-                       qstr = "\\og "; //the spaces are important here
+                       qstr = "\\og";
                else
-                       qstr = " \\fg{}"; //and here
+                       qstr = " \\fg"; // the space is important here
        } else if (fontenc_ == "T1" && !runparams.use_polyglossia) {
                // Quotation marks for T1 font encoding
                // (using ligatures)
@@ -302,6 +302,10 @@ void InsetQuotes::latex(otexstream & os, OutputParams 
const & runparams) const
        }
 
        os << from_ascii(qstr);
+       
+       if (prefixIs(qstr, "\\"))
+               // properly terminate the command depending on the context
+               os << termcmd;
 }
 
 

Reply via email to