[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/master] Fix conversion of beamer block titles when the language is switched at the beginning of
From:       Juergen Spitzmueller <spitz () lyx ! org>
Date:       2014-11-25 16:47:20
Message-ID: 20141125164720.AFC452807A3 () lyx ! lyx ! org
[Download RAW message or body]

commit 4066fcac16ca51d175e800f6b07fd1dd2c87fd49
Author: Juergen Spitzmueller <spitz@lyx.org>
Date:   Tue Nov 25 17:47:14 2014 +0100

    Fix conversion of beamer block titles when the language is switched at the beginning of the title

diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index e6d0bdc..2d523db 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
@@ -3070,6 +3070,10 @@ def convert_beamerblocks(document):
             parend = parent[2]
             j = parend
             if i != -1:
+                # If the paragraph starts with a language switch, adjust parbeg
+                if len(document.body[parbeg]) == 0 and parbeg < parend \
+                and document.body[parbeg + 1].startswith("\\lang"):
+                    parbeg += 2
                 if document.body[parbeg] == "\\begin_inset ERT":
                     ertcontfirstline = parbeg + 5
                     lastertbeg = -1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic