Take into account the lines added to preamble.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10375 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2005-07-29 13:34:07 +00:00
parent a69c7f771d
commit 888342b465
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-07-29 José Matos <jamatos@lyx.org>
* lyx_1_4.py (remove_paperpackage): Take into account the lines
added to preamble.
2005-07-29 José Matos <jamatos@lyx.org> 2005-07-29 José Matos <jamatos@lyx.org>
* lyx_1_4.py: Fix a4 package removal when the preamble is already there. * lyx_1_4.py: Fix a4 package removal when the preamble is already there.

View File

@ -1882,9 +1882,12 @@ def remove_paperpackage(file):
j = len(file.header) - 2 j = len(file.header) - 2
file.header[j:j]=["\\begin_preamble", file.header[j:j]=["\\begin_preamble",
conv[paperpackage],"\\end_preamble"] conv[paperpackage],"\\end_preamble"]
i = i + 3
else: else:
file.header[j+1:j+1] = [conv[paperpackage]] file.header[j+1:j+1] = [conv[paperpackage]]
i = i + 1
print i, file.header[i]
del file.header[i] del file.header[i]
i = find_token(file.header, '\\papersize', 0) i = find_token(file.header, '\\papersize', 0)