tex2lyx: we support now \framebox without options

-> this is \fbox

- also update the tex2lyx example file result
This commit is contained in:
Uwe Stöhr 2013-03-22 02:00:25 +01:00
parent 22ad7e4369
commit 9aeb084a22
2 changed files with 45 additions and 70 deletions

View 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_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
\begin_layout Plain Layout
\backslash
mbox{
\end_layout
\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_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
\begin_layout Plain Layout
\backslash
fbox{
\end_layout
\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_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
\begin_layout Plain Layout
\backslash
framebox{
\end_layout
\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.

View 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);
}