From c7a11c1da555d077a017957de75f493fa2635b11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Mon, 18 May 2015 23:45:27 +0200 Subject: [PATCH] tex2lyx/text.cpp: fix handling of \fbox since a while now lyX supports inner boxes in \fbox, tex2lyx was outdated in this case --- src/tex2lyx/test/box-color-size-space-align.tex | 4 ++++ src/tex2lyx/text.cpp | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tex2lyx/test/box-color-size-space-align.tex b/src/tex2lyx/test/box-color-size-space-align.tex index ccbf0cdad5..28d40a1608 100644 --- a/src/tex2lyx/test/box-color-size-space-align.tex +++ b/src/tex2lyx/test/box-color-size-space-align.tex @@ -124,6 +124,10 @@ blabla \begin{framed}\begin{framed}nested framed\end{framed}\end{framed} blabla blabla \fbox{fbox} blabla +\fbox{\begin{minipage}[t]{0.9\columnwidth}% +fbox around minipage% +\end{minipage}} + blabla \framebox{fr\textcolor{blue}{ame}box 1} blabla blabla \framebox[3cm]{framebox 2} blabla diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 1178f3a01b..671c24e1c7 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1127,7 +1127,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, os << "use_makebox 1\n"; else os << "use_makebox " << (inner_type == "makebox") << '\n'; - if (outer_type == "fbox" || outer_type == "mbox") + if (outer_type == "mbox") os << "width \"\"\n"; // for values like "1.5\width" LyX uses "1.5in" as width ad sets "width" as sepecial else if (contains(width_unit, '\\')) @@ -1260,8 +1260,7 @@ void parse_outer_box(Parser & p, ostream & os, unsigned flags, bool outer, p.skip_spaces(true); } } - if (outer_type == "shaded" || outer_type == "fbox" - || outer_type == "mbox") { + if (outer_type == "shaded" || outer_type == "mbox") { // These boxes never have an inner box ; } else if (p.next_token().asInput() == "\\parbox") { -- 2.39.2