]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Typo.
[lyx.git] / src / Paragraph.cpp
index 8298576e27d881d70eb8694467716270f4f0fcc0..81d3acd1be3aa16a524e8c4876cb13e5559f0632 100644 (file)
@@ -134,7 +134,7 @@ public:
                current_change_number_ = 0;
        }
 
-       void setRange(FontSpan const fp, SpellChecker::Result state)
+       void setRange(FontSpan const fp, SpellChecker::Result state)
        {
                Ranges result;
                RangesIterator et = ranges_.end();
@@ -1275,8 +1275,15 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
                string script;
                pair<docstring, bool> latex = encoding.latexChar(c);
                docstring nextlatex;
-               if (next != '\0' && next != META_INSET)
+               bool nexttipas = false;
+               string nexttipashortcut;
+               if (next != '\0' && next != META_INSET) {
                        nextlatex = encoding.latexChar(next).first;
+                       if (runparams.inIPA) {
+                               nexttipashortcut = Encodings::TIPAShortcut(next);
+                               nexttipas = !nexttipashortcut.empty();
+                       }
+               }
                bool tipas = false;
                if (runparams.inIPA) {
                        string const tipashortcut = Encodings::TIPAShortcut(c);
@@ -1291,9 +1298,11 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
                        column += writeScriptChars(os, latex.first,
                                        running_change, encoding, i) - 1;
                else if (latex.second
-                        && !prefixIs(nextlatex, '\\')
-                        && !prefixIs(nextlatex, '{')
-                        && !prefixIs(nextlatex, '}')
+                        && ((!prefixIs(nextlatex, '\\')
+                              && !prefixIs(nextlatex, '{')
+                              && !prefixIs(nextlatex, '}'))
+                            || (nexttipas
+                                && !prefixIs(from_ascii(nexttipashortcut), '\\')))
                         && !tipas) {
                        // Prevent eating of a following
                        // space or command corruption by
@@ -1446,7 +1455,7 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
 
        if (features.runparams().flavor == OutputParams::HTML
            && layout_->htmltitle()) {
-               features.setHTMLTitle(owner_->asString(AS_STR_INSETS));
+               features.setHTMLTitle(owner_->asString(AS_STR_INSETS | AS_STR_SKIPDELETE));
        }
 
        // check the params.