+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
2006-02-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* lyx_1_4.py (convert_amsmath, revert_amsmath): new, convert ams math
paperpackage = split(file.header[i])[1]
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]]
-
+ 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"
i = find_token(file.header, '\\papersize', 0)
if i != -1:
file.header[i] = "\\papersize default"