On Monday 06 March 2006 12:10, Lars Gullik Bjønnes wrote:
>
> If you are super sure then ok. But you have to take all the blame if
> something goes wrong as well :-)

 Does that means that I will have my share of a brown paper bag? That is an 
honour. ;-)

 I have redone the patch to be even more clear. I will apply it to devel and 
1.4.x.

 Other than that what is holding 1.4.0?
-- 
José Abílio
Index: lyx_1_4.py
===================================================================
--- lyx_1_4.py	(revision 13302)
+++ lyx_1_4.py	(working copy)
@@ -2342,14 +2342,16 @@
 
     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"

Reply via email to