]> git.lyx.org Git - features.git/commitdiff
tex2lyx: we support now \framebox without options
authorUwe Stöhr <uwestoehr@lyx.org>
Fri, 22 Mar 2013 01:00:25 +0000 (02:00 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Fri, 22 Mar 2013 01:00:25 +0000 (02:00 +0100)
-> this is \fbox

- also update the tex2lyx example file result

src/tex2lyx/test/box-color-size-space-align.lyx.lyx
src/tex2lyx/text.cpp

index f7aeef34510092abed17dcdd649d6a88467df005..081df6b19fdaddfdacfd3e3f95378e813b3ebd9c 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 468
 \begin_document
 \begin_header
 \textclass article
@@ -135,23 +135,22 @@ Frameless Boxes
 
 \begin_layout Standard
 blabla 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-mbox{
-\end_layout
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 0
+use_makebox 1
+width "-999col%"
+special "none"
+height "1in"
+height_special "totalheight"
+status open
 
-\end_inset
 
+\begin_layout Standard
 mbox
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-}
 \end_layout
 
 \end_inset
@@ -657,23 +656,22 @@ blabla
 
 \begin_layout Standard
 blabla 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-fbox{
-\end_layout
+\begin_inset Box Boxed
+position "c"
+hor_pos "c"
+has_inner_box 0
+inner_pos "c"
+use_parbox 0
+use_makebox 0
+width "-999col%"
+special "none"
+height "1in"
+height_special "totalheight"
+status open
 
-\end_inset
 
+\begin_layout Standard
 fbox
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-}
 \end_layout
 
 \end_inset
@@ -683,27 +681,26 @@ status collapsed
 
 \begin_layout Standard
 blabla 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-framebox{
-\end_layout
+\begin_inset Box Boxed
+position "c"
+hor_pos "c"
+has_inner_box 0
+inner_pos "c"
+use_parbox 0
+use_makebox 0
+width "-999col%"
+special "none"
+height "1in"
+height_special "totalheight"
+status open
 
-\end_inset
 
+\begin_layout Standard
 fr
 \color blue
 ame
 \color inherit
 box 1
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-}
 \end_layout
 
 \end_inset
@@ -763,19 +760,7 @@ framebox 3
 
 \begin_layout Standard
 This is an example text. 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-framebox{
-\end_layout
-
-\end_inset
-
-
-\begin_inset Box Frameless
+\begin_inset Box Boxed
 position "c"
 hor_pos "c"
 has_inner_box 1
@@ -809,16 +794,6 @@ over the
 box height. 
 \end_layout
 
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-}
-\end_layout
-
 \end_inset
 
  This is an example text.
index 641c23a42a09bdcb7a9a78089d1a4afb6c41182e..3898fb63a2bd6a24fd7abfa0929793b32331ed6f 100644 (file)
@@ -935,7 +935,10 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                width_unit = "in";
                width_special = "width";
        } else if (latex_width.empty() && outer_type == "framebox") {
-               use_ert = true;
+               outer_type == "fbox";
+               width_value = "-999";
+               width_unit = "col%";
+               width_special = "none";
        }
        if (use_ert) {
                ostringstream ss;
@@ -992,9 +995,6 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                        if (outer_flags & FLAG_END)
                                output_ert_inset(os, "\\end{" + outer_type + '}',
                                           parent_context);
-                       else if (inner_type.empty() && outer_type == "framebox")
-                               // in this case it is already closed later
-                               ;
                        else
                                output_ert_inset(os, "}", parent_context);
                }