mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +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>
|
||||
|
||||
* scripts/layout2layout.py: add "LatexType Bib_Environment" to style
|
||||
|
@ -70,7 +70,7 @@ def convert(lines):
|
||||
only_comment = 1
|
||||
label = ""
|
||||
space1 = ""
|
||||
latextype = ""
|
||||
latextype_line = -1
|
||||
style = ""
|
||||
while i < len(lines):
|
||||
|
||||
@ -79,7 +79,7 @@ def convert(lines):
|
||||
i = i + 1
|
||||
continue
|
||||
|
||||
# insert file format if not already there
|
||||
# insert file format if not already there
|
||||
if (only_comment):
|
||||
match = re_Format.match(lines[i])
|
||||
if match:
|
||||
@ -128,18 +128,19 @@ def convert(lines):
|
||||
# (or change the existing LatexType)
|
||||
match = re_LatexType.match(lines[i])
|
||||
if match:
|
||||
latextype = match.group(4)
|
||||
lines[i] = re_LatexType.sub(r'\1\2\3Bib_Environment', lines[i])
|
||||
latextype_line = i
|
||||
match = re_Style.match(lines[i])
|
||||
if match:
|
||||
style = match.group(4)
|
||||
label = ""
|
||||
space1 = ""
|
||||
latextype = ""
|
||||
latextype_line = -1
|
||||
if re_End.match(lines[i]) and string.lower(label) == "bibliography":
|
||||
if (latextype == ""):
|
||||
if (latextype_line < 0):
|
||||
lines.insert(i, "%sLatexType Bib_Environment" % space1)
|
||||
i = i + 1
|
||||
else:
|
||||
lines[latextype_line] = re_LatexType.sub(r'\1\2\3Bib_Environment', lines[latextype_line])
|
||||
|
||||
i = i + 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user