]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: a fix for the horizontal box position
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 May 2015 16:12:20 +0000 (18:12 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 May 2015 16:12:20 +0000 (18:12 +0200)
 - if nothing is specified, the box content is left aligned, except for \makebox where it is centered

src/tex2lyx/text.cpp

index 4dc785acdbfb33ed2471042fc690dd54d36de86f..2b05fb736c908da6dfa48fcf849c0f532e5ec32a 100644 (file)
@@ -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")