Only reset the papersize for a4* paperpackages

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13305 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2006-03-06 18:48:59 +00:00
parent d88562e357
commit ba2c7c6739
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2006-03-06 José Matos <jamatos@lyx.org>
* lyx_1_4.py (remove_paperpackage): Only reset the papersize for
a4* paperpackages.
2006-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* lyx_1_4.py (convert_amsmath, revert_amsmath): new, convert ams math

View File

@ -2342,14 +2342,16 @@ def remove_paperpackage(file):
paperpackage = split(file.header[i])[1]
if paperpackage in ("a4", "a4wide", "widemarginsa4"):
conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}",
"widemarginsa4": "\\usepackage[widemargins]{a4}"}
# for compatibility we ensure it is the first entry in preamble
file.preamble[0:0] = [conv[paperpackage]]
del file.header[i]
if paperpackage not in ("a4", "a4wide", "widemarginsa4"):
return
conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}",
"widemarginsa4": "\\usepackage[widemargins]{a4}"}
# for compatibility we ensure it is the first entry in preamble
file.preamble[0:0] = [conv[paperpackage]]
i = find_token(file.header, '\\papersize', 0)
if i != -1:
file.header[i] = "\\papersize default"