]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/text.C
Continue to improve GtkLengthEntry
[lyx.git] / src / tex2lyx / text.C
index 421fa701b06418a83b5de25421998c8e230ba50c..43339df7063bbb1b21bcf27bbfe7fa4abd9a4941 100644 (file)
@@ -1278,6 +1278,15 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        }
                        context.set_item();
                        context.check_layout(os);
+                       if (context.has_item) {
+                               // An item in an unknown list-like environment
+                               // FIXME: Do this in check_layout()!
+                               context.has_item = false;
+                               if (optarg)
+                                       handle_ert(os, "\\item", context);
+                               else
+                                       handle_ert(os, "\\item ", context);
+                       }
                        if (optarg) {
                                if (context.layout->labeltype != LABEL_MANUAL) {
                                        // lyx does not support \item[\mybullet]
@@ -1965,8 +1974,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                else if (t.cs() == "=" && (flags & FLAG_TABBING))
                        handle_ert(os, t.asInput(), context);
 
-               else if (t.cs() == "H" || t.cs() == "c" || t.cs() == "^" || t.cs() == "'"
-                     || t.cs() == "~" || t.cs() == "." || t.cs() == "=") {
+               else if (t.cs() == "H" || t.cs() == "c" || t.cs() == "^" 
+                        || t.cs() == "'" || t.cs() == "`"
+                        || t.cs() == "~" || t.cs() == "." || t.cs() == "=") {
                        // we need the trim as the LyX parser chokes on such spaces
                        context.check_layout(os);
                        os << "\n\\i \\" << t.cs() << "{"