]> git.lyx.org Git - features.git/commitdiff
fix bug 1942: http://bugzilla.lyx.org/show_bug.cgi?id=1942
authorUwe Stöhr <uwestoehr@web.de>
Fri, 22 Jun 2007 21:25:41 +0000 (21:25 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Fri, 22 Jun 2007 21:25:41 +0000 (21:25 +0000)
- we don't require wasysym any more. Either esint or amsmath is used, depending if esint is installed

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

lib/symbols
src/LaTeXFeatures.cpp
src/mathed/MathFactory.cpp

index 2b4eaa16904a5d2ca538e4d9e0ef292bd4f64b73..2a61daa18f56279cadfa10e117de4626f6c21b6c 100644 (file)
@@ -761,14 +761,20 @@ varoint            wasy         117    0  mathop  x
 # It is important that they have the same requirements in both cases,
 # otherwise the LaTeX output would depend on the availability of the esint10
 # font in the GUI
+# Note that we do _not_ require the wasysym package for any integral besides
+# \varint and \varoint. The reason is that the integrals of the wasysym
+# package do not match the standard \int and \intop. See
+# http://bugzilla.lyx.org/show_bug.cgi?id=1942 for details.
+# If the wasysym integrals are really wanted then one has to load the package
+# manually and disable automatic loading of amsmath and esint.
 iffont esint
 int                esint        001    0  mathop  &int;  esint
 intop              esint        001    0  mathop  &int;  esint
-iint               esint        003    0  mathop  x      esint
+iint               esint        003    0  mathop  x      esintoramsmath
 iintop             esint        003    0  mathop  x      esint
-iiint              esint        005    0  mathop  x      esint
+iiint              esint        005    0  mathop  x      esintoramsmath
 iiintop            esint        005    0  mathop  x      esint
-iiiint             esint        007    0  mathop  x      esint
+iiiint             esint        007    0  mathop  x      esintoramsmath
 iiiintop           esint        007    0  mathop  x      esint
 dotsint            esint        009    0  mathop  x      esint
 dotsintop          esint        009    0  mathop  x      esint
@@ -787,11 +793,11 @@ ointclockwiseop    esint        025    0  mathop  x      esint
 else
 int                cmex          82  242  mathop  &int;  esint
 intop              cmex          82  242  mathop  &int;  esint
-iint               wasy         115    0  mathop  x      esint
+iint               wasy         115    0  mathop  x      esintoramsmath
 iintop             wasy         115    0  mathop  x      esint
-iiint              wasy         116    0  mathop  x      esint
+iiint              wasy         116    0  mathop  x      esintoramsmath
 iiintop            wasy         116    0  mathop  x      esint
-\def\iiiint{\int\kern-6mu\int\kern-6mu\int\kern-6mu\int}        esint
+\def\iiiint{\int\kern-6mu\int\kern-6mu\int\kern-6mu\int}        esintoramsmath
 \def\iiiintop{\int\kern-6mu\int\kern-6mu\int\kern-6mu\int}      esint
 \def\dotsint{\int\kern-3mu\cdots\kern-3mu\int}                  esint
 \def\dotsintop{\int\kern-3mu\cdots\kern-3mu\int}                esint
@@ -925,3 +931,4 @@ endif
 
 #"{\hat{}}
 
+
index dae61ec0695457ecc983d48d66a40571f956eb64..dc363fcf44aca1c76d63b9b5e000a375a36fb5c5 100644 (file)
@@ -445,8 +445,11 @@ string const LaTeXFeatures::getPackages() const
        // than those above.
        //
 
-       if (mustProvide("amsmath")
-           && params_.use_amsmath != BufferParams::package_off) {
+       // esint is preferred for esintoramsmath
+       if ((mustProvide("amsmath") &&
+            params_.use_amsmath != BufferParams::package_off) ||
+           (mustProvide("esintoramsmath") &&
+            params_.use_esint == BufferParams::package_off)) {
                packages << "\\usepackage{amsmath}\n";
        }
 
@@ -539,8 +542,8 @@ string const LaTeXFeatures::getPackages() const
 
        // esint must be after amsmath and wasysym, since it will redeclare
        // inconsistent integral symbols
-       if (mustProvide("esint")
-           && params_.use_esint != BufferParams::package_off)
+       if ((mustProvide("esint") || mustProvide("esintoramsmath")) &&
+           params_.use_esint != BufferParams::package_off)
                packages << "\\usepackage{esint}\n";
 
        // url.sty
index 7f8c2192241bebdce37212be6a22554888834e2a..85d0b3f60b7aed36852229508541c0856afdb675 100644 (file)
@@ -175,11 +175,12 @@ void initSymbols()
                        // create fallbacks if necessary
 
                        // store requirements as long as we can
-                       if (tmp.requires.empty() &&
-                           (tmp.inset == "msa" || tmp.inset == "msb"))
-                               tmp.requires = from_ascii("amssymb");
-                       else if (tmp.inset == "wasy")
-                               tmp.requires = from_ascii("wasysym");
+                       if (tmp.requires.empty()) {
+                               if (tmp.inset == "msa" || tmp.inset == "msb")
+                                       tmp.requires = from_ascii("amssymb");
+                               else if (tmp.inset == "wasy")
+                                       tmp.requires = from_ascii("wasysym");
+                       }
 
                        // symbol font is not available sometimes
                        docstring symbol_font = from_ascii("lyxsymbol");