From: Uwe Stöhr Date: Sun, 17 May 2015 16:12:20 +0000 (+0200) Subject: tex2lyx/text.cpp: a fix for the horizontal box position X-Git-Tag: 2.2.0alpha1~782 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=76b579ed3774fd6612e6172df67a7b83c344cc2d;p=features.git tex2lyx/text.cpp: a fix for the horizontal box position - if nothing is specified, the box content is left aligned, except for \makebox where it is centered --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 4dc785acdb..2b05fb736c 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -837,7 +837,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, { string position; string inner_pos; - string hor_pos = "c"; + string hor_pos = "l"; // We need to set the height to the LaTeX default of 1\\totalheight // for the case when no height argument is given string height_value = "1"; @@ -886,7 +886,6 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, latex_width = ""; inner_type = "makebox"; inner_flags = FLAG_BRACE_LAST; - hor_pos = "l"; position = "t"; inner_pos = "t"; } @@ -931,7 +930,10 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, inner_pos = position; } } - } + } else { + if (inner_type == "makebox") + hor_pos = "c"; + } } if (inner_type.empty()) { if (special.empty() && outer_type != "framebox")