commit a021548b7d9c3157e5eba3c8ef89fb63bb389c00
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Sat Jul 27 22:27:40 2013 +0200

    LaTeXFeatures.cpp: fix bug #8731 for branch

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 7393876..48809b2 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -773,6 +773,14 @@ string const LaTeXFeatures::getPackages() const
        if (mustProvide("setspace") && !tclass.provides("SetSpace"))
                packages << "\\usepackage{setspace}\n";
 
+       // we need to assure that mhchem is loaded before esint
+       // because esint must be loaded AFTER amslatex and mhchem loads amlatex
+       // (this info is from the author of mhchem from June 2013)
+       if (mustProvide("mhchem") &&
+           params_.use_package("mhchem") != BufferParams::package_off)
+               packages << "\\PassOptionsToPackage{version=3}{mhchem}\n"
+                           "\\usepackage{mhchem}\n";
+
        // esint must be after amsmath and wasysym, since it will redeclare
        // inconsistent integral symbols
        if (mustProvide("esint") &&
@@ -810,12 +818,6 @@ string const LaTeXFeatures::getPackages() const
                packages << "\\PassOptionsToPackage{normalem}{ulem}\n"
                            "\\usepackage{ulem}\n";
 
-       if (params_.use_mhchem == BufferParams::package_on ||
-           (mustProvide("mhchem") &&
-            params_.use_mhchem != BufferParams::package_off))
-               packages << "\\PassOptionsToPackage{version=3}{mhchem}\n"
-                           "\\usepackage{mhchem}\n";
-
        if (mustProvide("nomencl")) {
                // Make it work with the new and old version of the package,
                // but don't use the compatibility option since it is
diff --git a/status.20x b/status.20x
index c1f891c..6eb64a0 100644
--- a/status.20x
+++ b/status.20x
@@ -60,7 +60,10 @@ What's new
 - Fix state of certain language packages (polyglossia, japanese) in
   child documents (bug 8770).
 
-- Added h5 and h6 as tags for Paragraph and Subparagraph.
+- Fix compilation of documents containing chemical equations and math
+  integrals (bug 8731).
+
+- Added h5 and h6 as HTML tags for Paragraph and Subparagraph.
 
 - Include alt tag when exporting math as images (bug 8746).
 

Reply via email to