From 76b579ed3774fd6612e6172df67a7b83c344cc2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 17 May 2015 18:12:20 +0200 Subject: [PATCH] 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 --- src/tex2lyx/text.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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") -- 2.39.5