From: Uwe Stöhr Date: Sat, 10 May 2008 00:01:46 +0000 (+0000) Subject: tex2lyx/text.cpp: support for the centering environment used to center e.g. images X-Git-Tag: 1.6.10~4829 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bbd5ddeff3213cfdcc821a64196cb8fdbb43c90b;p=features.git tex2lyx/text.cpp: support for the centering environment used to center e.g. images git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24708 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 04fa5db3ea..4c44dfd395 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -809,9 +809,10 @@ 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" || - name == "singlespace" || name == "onehalfspace" || - name == "doublespace" || name == "spacing") { + else if (name == "center" || name == "centering" || + 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,7 +823,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, parent_context.add_extra_stuff("\\align left\n"); else if (name == "flushright") parent_context.add_extra_stuff("\\align right\n"); - else if (name == "center") + else if (name == "center" || name == "centering") parent_context.add_extra_stuff("\\align center\n"); else if (name == "singlespace") parent_context.add_extra_stuff("\\paragraph_spacing single\n");