From: Uwe Stöhr Date: Tue, 19 May 2015 21:35:56 +0000 (+0200) Subject: tex2lyx/text.cpp: fixes for \mbox{} X-Git-Tag: 2.2.0alpha1~732 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=013eb54270a94d5ccb07ca524e210a9e7e38aab8;p=features.git tex2lyx/text.cpp: fixes for \mbox{} now all box constructs should be fully supported by tex2lyx --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 120e48cb8b..3dc60c558d 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -906,7 +906,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, inner_pos = "t"; } } - if (inner_type == "makebox" && !p.hasOpt()) + if (!p.hasOpt() && (inner_type == "makebox" || outer_type == "mbox")) hor_pos = "c"; if (!inner_type.empty() && p.hasOpt()) { if (inner_type != "makebox") @@ -1142,7 +1142,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, os << "hor_pos \"" << hor_pos << "\"\n"; if (outer_type == "mbox") os << "has_inner_box 1\n"; - if (!frame_color.empty()) + else if (!frame_color.empty()) os << "has_inner_box 0\n"; else os << "has_inner_box " << !inner_type.empty() << "\n"; @@ -1151,7 +1151,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, << '\n'; if (outer_type == "mbox") os << "use_makebox 1\n"; - if (!frame_color.empty()) + else if (!frame_color.empty()) os << "use_makebox 0\n"; else os << "use_makebox " << (inner_type == "makebox") << '\n';