From: Juergen Spitzmueller Date: Mon, 12 Dec 2016 14:57:42 +0000 (+0100) Subject: Properly terminate quote macros by means of new textstream function X-Git-Tag: 2.3.0alpha1~635 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=83d2c7fa3704a221b143a54b0c78747fbd712504;p=lyx.git Properly terminate quote macros by means of new textstream function This prevents kerning destruction. --- diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 6e19a1b2f6..53d204616d 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; }