]> git.lyx.org Git - lyx.git/blobdiff - lib/reLyX/MakePreamble.pm
The Box patch
[lyx.git] / lib / reLyX / MakePreamble.pm
index 5568c78627fc429922807ad0cf9f42edd54aa43f..728973f3d996d3a63931958d8ae6bffd0347bd75 100644 (file)
@@ -148,7 +148,8 @@ sub translate_preamble {
 #}
 
     # Write first line of the lyx file
-    $LyX_Preamble .= "\#LyX 1.2 created this file. For more info see http://www.lyx.org/\n";
+    $LyX_Preamble .= "\# The reLyX bundled with LyX 1.3 created this file.\n" .
+       "# For more info see http://www.lyx.org/\n";
 
     # Print \lyxformat.
     $LyX_Preamble .= "\\lyxformat $Format\n";
@@ -299,6 +300,14 @@ sub translate_preamble {
        }
     }
 
+    # Natbib is a little more complex than that.
+    if ($Latex_Preamble =~ s/\\usepackage(.*)\{natbib\}\s*//) {
+       $LyX_Preamble .= "\\use_natbib 1\n\\use_numerical_citations ";
+       $LyX_Preamble .= ($1 =~ /numbers/) ? "1\n" : "0\n";
+    } else {
+       $LyX_Preamble .= "\\use_natbib 0\n\\use_numerical_citations 0\n";
+    }
+
     ## Handle geometry options
     ## The custom paper missing from the options list since it involves two parameters
     my %Geometry_Options =(