From 013eb54270a94d5ccb07ca524e210a9e7e38aab8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Tue, 19 May 2015 23:35:56 +0200 Subject: [PATCH] tex2lyx/text.cpp: fixes for \mbox{} now all box constructs should be fully supported by tex2lyx --- src/tex2lyx/text.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'; -- 2.39.2