From: Juergen Spitzmueller Date: Fri, 13 Feb 2015 15:01:57 +0000 (+0100) Subject: Fix conversion of beamer block arguments where the overlay argument and the closing... X-Git-Tag: 2.1.4~222 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8b17b25764c90530a85ac32a9dcb2676b9d25d64;p=features.git Fix conversion of beamer block arguments where the overlay argument and the closing title argument bracket share the same ERT Fixes: #9411 --- diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 703acdfc44..029b54d995 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -3216,11 +3216,19 @@ def convert_beamerblocks(document): # Multiline ERT. Might contain TeX code. Embrace in ERT. document.body[ertcontlastline : ertcontlastline + 1] = [ document.body[ertcontlastline], '\\end_layout', '', '\\end_inset'] - document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok], - '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1', - 'status collapsed', '', '\\begin_layout Plain Layout', - '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout', - document.body[ertcontdivline][tok + 2:]] + if ertcontdivline == ertcontfirstline: + document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok], + '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1', + 'status collapsed', '', '\\begin_layout Plain Layout', + '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout', + document.body[ertcontdivline][tok + 2:]] + else: + document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok], + '\\end_layout', '', '\\end_inset', '', + '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1', + 'status collapsed', '', '\\begin_layout Plain Layout', + '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout', + document.body[ertcontdivline][tok + 2:]] else: document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok], '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1', diff --git a/status.21x b/status.21x index 166988ef7e..a41260b20e 100644 --- a/status.21x +++ b/status.21x @@ -60,7 +60,10 @@ What's new * LYX2LYX -- Fix conversion of frame ends when frame is nested in inset (bug 9409). +- Fix conversion of frame ends when frame is nested in inset (bug 9409). + +- Fix conversion of beamer block arguments where the overlay argument and the + closing title argument bracket share the same ERT (bug 9411).