From: José Matox Date: Tue, 7 Mar 2006 11:21:08 +0000 (+0000) Subject: Only reset the papersize for a4* paperpackages. X-Git-Tag: 1.6.10~13539 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d5da885f2197c315c72154da5dbeebc5d08bfe84;p=features.git Only reset the papersize for a4* paperpackages. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13312 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/ChangeLog b/lib/lyx2lyx/ChangeLog index 8c2169187f..77bb7ee3e4 100644 --- a/lib/lyx2lyx/ChangeLog +++ b/lib/lyx2lyx/ChangeLog @@ -1,3 +1,8 @@ +2006-03-06 José Matos + + * lyx_1_4.py (remove_paperpackage): Only reset the papersize for + a4* paperpackages. + 2006-02-22 Georg Baum * lyx_1_4.py (convert_amsmath, revert_amsmath): new, convert ams math diff --git a/lib/lyx2lyx/lyx_1_4.py b/lib/lyx2lyx/lyx_1_4.py index 1cfd585a58..ea6dddee26 100644 --- a/lib/lyx2lyx/lyx_1_4.py +++ b/lib/lyx2lyx/lyx_1_4.py @@ -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"