]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: fix bug 20
authorUwe Stöhr <uwestoehr@web.de>
Wed, 7 May 2008 22:52:56 +0000 (22:52 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 7 May 2008 22:52:56 +0000 (22:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24673 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index 2e502f798675c6e424e495400ebf03b9bde38e91..04fa5db3eaa625ed880ad3734d13d0273848e585 100644 (file)
@@ -809,7 +809,9 @@ void parse_environment(Parser & p, ostream & os, bool outer,
        // they are commands not environments. They are furthermore switches that
        // can be ended by another switches, but also by commands like \footnote or
        // \parbox. So the only safe way is to leave them untouched.
-       else if (name == "center" || name == "flushleft" || name == "flushright") {
+       else if (name == "center" || name == "flushleft" || name == "flushright" ||
+                name == "singlespace" || name == "onehalfspace" ||
+                name == "doublespace" || name == "spacing") {
                eat_whitespace(p, os, parent_context, false);
                // We must begin a new paragraph if not already done
                if (! parent_context.atParagraphStart()) {
@@ -822,6 +824,14 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                        parent_context.add_extra_stuff("\\align right\n");
                else if (name == "center")
                        parent_context.add_extra_stuff("\\align center\n");
+               else if (name == "singlespace")
+                       parent_context.add_extra_stuff("\\paragraph_spacing single\n");
+               else if (name == "onehalfspace")
+                       parent_context.add_extra_stuff("\\paragraph_spacing onehalf\n");
+               else if (name == "doublespace")
+                       parent_context.add_extra_stuff("\\paragraph_spacing double\n");
+               else if (name == "spacing")
+                       parent_context.add_extra_stuff("\\paragraph_spacing other " + p.verbatim_item() + "\n");
                parse_text(p, os, FLAG_END, outer, parent_context);
                // Just in case the environment is empty
                parent_context.extra_stuff.erase();