]> git.lyx.org Git - features.git/commitdiff
* src/LaTeXFeatures.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 4 Sep 2008 14:39:08 +0000 (14:39 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 4 Sep 2008 14:39:08 +0000 (14:39 +0000)
- handle case where natbib is loaded internally by a class, but still plain cite commands
  have to be output (bug 5182)
* lib/revtex4.layout:
- this is such a case.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26298 a592a061-630c-0410-9148-cb99ea01b6c8

lib/layouts/revtex4.layout
src/LaTeXFeatures.cpp

index 3b653601a6afd3c95c800fadab1ea42356beb9ae..8e80d2c04406d343287f2fc1e3db0f00aed4d486 100644 (file)
@@ -14,7 +14,7 @@ Format 8
 Columns                 1
 Sides                   1
 PageStyle               Headers
-Provides natbib                1
+Provides natbib-internal       1
 Provides url           1
 
 # Default textclass options. The user may need to modify this.
index ed12ea2934f8ffe806acb715b0900c6873705890..581e9b4029992382bce8d47243e3fce7602a1871 100644 (file)
@@ -599,7 +599,11 @@ string const LaTeXFeatures::getPackages() const
                packages << "\\usepackage{esint}\n";
 
        // natbib.sty
-       if (mustProvide("natbib")) {
+       // Some classes load natbib themselves, but still allow (or even require)
+       // plain numeric citations (ReVTeX is such a case, see bug 5182).
+       // This special case is indicated by the "natbib-internal" key.
+       if (mustProvide("natbib")
+           && !params_.getTextClass().provides("natbib-internal")) {
                packages << "\\usepackage[";
                if (params_.citeEngine() == ENGINE_NATBIB_NUMERICAL)
                        packages << "numbers";