mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
fix bibenvironment handling in layout2layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10755 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c823a6afd3
commit
ba4236f744
@ -1,3 +1,7 @@
|
|||||||
|
2006-01-18 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* scripts/layout2layout.py: fix creation of "LatexType Bib_Environment"
|
||||||
|
|
||||||
2006-01-08 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2006-01-08 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
* scripts/layout2layout.py: add "LatexType Bib_Environment" to style
|
* scripts/layout2layout.py: add "LatexType Bib_Environment" to style
|
||||||
|
@ -70,7 +70,7 @@ def convert(lines):
|
|||||||
only_comment = 1
|
only_comment = 1
|
||||||
label = ""
|
label = ""
|
||||||
space1 = ""
|
space1 = ""
|
||||||
latextype = ""
|
latextype_line = -1
|
||||||
style = ""
|
style = ""
|
||||||
while i < len(lines):
|
while i < len(lines):
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ def convert(lines):
|
|||||||
i = i + 1
|
i = i + 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# insert file format if not already there
|
# insert file format if not already there
|
||||||
if (only_comment):
|
if (only_comment):
|
||||||
match = re_Format.match(lines[i])
|
match = re_Format.match(lines[i])
|
||||||
if match:
|
if match:
|
||||||
@ -128,18 +128,19 @@ def convert(lines):
|
|||||||
# (or change the existing LatexType)
|
# (or change the existing LatexType)
|
||||||
match = re_LatexType.match(lines[i])
|
match = re_LatexType.match(lines[i])
|
||||||
if match:
|
if match:
|
||||||
latextype = match.group(4)
|
latextype_line = i
|
||||||
lines[i] = re_LatexType.sub(r'\1\2\3Bib_Environment', lines[i])
|
|
||||||
match = re_Style.match(lines[i])
|
match = re_Style.match(lines[i])
|
||||||
if match:
|
if match:
|
||||||
style = match.group(4)
|
style = match.group(4)
|
||||||
label = ""
|
label = ""
|
||||||
space1 = ""
|
space1 = ""
|
||||||
latextype = ""
|
latextype_line = -1
|
||||||
if re_End.match(lines[i]) and string.lower(label) == "bibliography":
|
if re_End.match(lines[i]) and string.lower(label) == "bibliography":
|
||||||
if (latextype == ""):
|
if (latextype_line < 0):
|
||||||
lines.insert(i, "%sLatexType Bib_Environment" % space1)
|
lines.insert(i, "%sLatexType Bib_Environment" % space1)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
else:
|
||||||
|
lines[latextype_line] = re_LatexType.sub(r'\1\2\3Bib_Environment', lines[latextype_line])
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user