]> git.lyx.org Git - lyx.git/blobdiff - lib/reLyX/MakePreamble.pm
cruft removal
[lyx.git] / lib / reLyX / MakePreamble.pm
index afb82aa12d7ba4b7d0e3e6b43e7efb6fd8f4a14e..bb3dfc2162d3a223e0dcdd70cc814a2def1689ec 100644 (file)
@@ -281,7 +281,7 @@ sub translate_preamble {
 
        "graphics"      => "\\graphics default",
        "rotating"      => "",
-       "makeidx"       => "\\makeindex"
+       "makeidx"       => ""
     );
 
     ## Babel with arguments specifing language
@@ -299,6 +299,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 =(