tex2lyx/text.cpp: fix bug 20

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24673 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-05-07 22:52:56 +00:00
parent b62752ad14
commit 2b69b18cdd

View 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();