]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetQuotes.cpp
Fix bug #7975 following suggestions made by JMarc there.
[lyx.git] / src / insets / InsetQuotes.cpp
index 74a0e4ae6012b5fb8b9ecd0c6ed82422ac42904f..8586ce18d5372382689ae1cbcacbb93ddede55f5 100644 (file)
@@ -114,7 +114,7 @@ InsetQuotes::InsetQuotes(Buffer * buf, char_type c, QuoteTimes t)
 }
 
 
-docstring InsetQuotes::name() const
+docstring InsetQuotes::layoutName() const
 {
        return from_ascii("Quotes");
 }
@@ -287,8 +287,11 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const
        }
 
        // Always guard against unfortunate ligatures (!` ?`)
-       if (prefixIs(qstr, "`"))
-               qstr.insert(0, "{}");
+       if (prefixIs(qstr, "`")) {
+               char_type const lastchar = os.lastChar();
+               if (lastchar == '!' || lastchar == '?')
+                       qstr.insert(0, "{}");
+       }
 
        os << from_ascii(qstr);
 }