From 2b69b18cdd7049e30346f1f726bc204f5ca8a0ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 7 May 2008 22:52:56 +0000 Subject: [PATCH] tex2lyx/text.cpp: fix bug 20 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24673 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 2e502f7986..04fa5db3ea 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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(); -- 2.39.2