]> git.lyx.org Git - features.git/commitdiff
Fix bug #8464: stackrel with subscript.
authorGeorg Baum <baum@lyx.org>
Fri, 28 Dec 2012 18:51:28 +0000 (19:51 +0100)
committerGeorg Baum <baum@lyx.org>
Fri, 28 Dec 2012 19:08:43 +0000 (20:08 +0100)
The fix is basically mechanical, the additional code for fraction like insets
with three arguments was stolen from \unitfrac. As any math package,
stackrel.sty needs a buffer parameter to switch it off.
I also added the two stackrel flavours to the toolbar.

28 files changed:
development/FORMAT
lib/Makefile.am
lib/chkconfig.ltx
lib/doc/LaTeXConfig.lyx
lib/images/math/stackrel.png [new file with mode: 0644]
lib/images/math/stackrelthree.png [new file with mode: 0644]
lib/lyx2lyx/lyx_2_1.py
lib/ui/stdtoolbars.inc
src/BufferParams.cpp
src/BufferParams.h
src/LaTeXFeatures.cpp
src/frontends/qt4/GuiDocument.cpp
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathStackrel.cpp
src/mathed/InsetMathStackrel.h
src/mathed/MathFactory.cpp
src/mathed/MathParser.cpp
src/tex2lyx/Preamble.cpp
src/tex2lyx/TODO.txt
src/tex2lyx/test/CJK.lyx.lyx
src/tex2lyx/test/DummyDocument.lyx
src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
src/tex2lyx/test/box-color-size-space-align.lyx.lyx
src/tex2lyx/test/test-insets.lyx.lyx
src/tex2lyx/test/test-modules.lyx.lyx
src/tex2lyx/test/test-structure.lyx.lyx
src/tex2lyx/test/test.lyx.lyx
src/version.h

index 033e9be83b22cbf39abefb55c85db19179cfc17c..0a8bdbfa37185b127b7dd7cb500d0e9c52522751 100644 (file)
@@ -11,6 +11,11 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
 
 -----------------------
 
+2012-12-28 Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+       * Format incremented to 457
+         support for the LaTeX-package stackrel (fix bug 8464)
+         New buffer param \use_package stackrel
+
 2012-12-28 Jürgen Spitzmüller <spitz@lyx.org>
        * Format incremented to 456: Proper support for memoir \epigraph
          \epigraph{text}{source} > begin_layout Epigraph, <source> as
index 7fe8e42679401b0fdd35c02606494951c99bcd8b..96ed54545316f8096c794838069d4632a642fa7e 100644 (file)
@@ -978,6 +978,8 @@ dist_imagesmath_DATA = \
        images/math/ssearrow.png \
        images/math/sslash.png \
        images/math/sswarrow.png \
+       images/math/stackrel.png \
+       images/math/stackrelthree.png \
        images/math/star.png \
        images/math/style.png \
        images/math/sub.png \
index 22297e5e8eab2e7294ab0597134dbcb23e53a788..b9926b5415cb48336e5b73c853fbceb780c98fd0 100644 (file)
 \TestPackage{slashed}
 \TestPackage{soul}
 \TestPackage{splitidx}
+\TestPackage{stackrel}
 \TestPackage{stmaryrd}
 \TestPackage{subfig}
 \TestPackage{Sweave}
index 01de5ab3aedccb5a434583faa15f0d5b5bcf8b93..e961727cae52fa0c615074ecd9239eccf48cb7f0 100644 (file)
@@ -6580,6 +6580,36 @@ splitindex
  converter programs.
 \end_layout
 
+\begin_layout Subsection
+stackrel
+\end_layout
+
+\begin_layout Description
+Found: 
+\begin_inset Info
+type  "package"
+arg   "stackrel"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN: 
+\family typewriter
+macros/latex/contrib/oberdiek
+\end_layout
+
+\begin_layout Description
+Notes: The package 
+\family sans
+stackrel
+\family default
+ is needed by LyX to be able to output formulas using the 
+\backslash
+stackrel command with subscript.
+\end_layout
+
 \begin_layout Subsection
 stmaryrd
 \end_layout
diff --git a/lib/images/math/stackrel.png b/lib/images/math/stackrel.png
new file mode 100644 (file)
index 0000000..05bee5f
Binary files /dev/null and b/lib/images/math/stackrel.png differ
diff --git a/lib/images/math/stackrelthree.png b/lib/images/math/stackrelthree.png
new file mode 100644 (file)
index 0000000..0c53985
Binary files /dev/null and b/lib/images/math/stackrelthree.png differ
index 847fc4b3d55faf5f9908b0c64443f741528ac049..6bc97101ba11a3c1a92b022c0e6be271d8065870 100644 (file)
@@ -495,6 +495,49 @@ def revert_use_stmaryrd(document):
             i = j
 
 
+def convert_use_stackrel(document):
+    "insert use_package stackrel"
+    i = find_token(document.header, "\\use_package", 0)
+    if i == -1:
+        document.warning("Malformed LyX document: Can't find \\use_package.")
+        return;
+    j = find_token(document.preamble, "\\usepackage{stackrel}", 0)
+    if j == -1:
+        document.header.insert(i + 1, "\\use_package stackrel 0")
+    else:
+        document.header.insert(i + 1, "\\use_package stackrel 2")
+        del document.preamble[j]
+
+
+def revert_use_stackrel(document):
+    "remove use_package stackrel"
+    regexp = re.compile(r'(\\use_package\s+stackrel)')
+    i = find_re(document.header, regexp, 0)
+    value = "1" # default is auto
+    if i != -1:
+        value = get_value(document.header, "\\use_package" , i).split()[1]
+        del document.header[i]
+    if value == "2": # on
+        add_to_preamble(document, ["\\usepackage{stackrel}"])
+    elif value == "1": # auto
+        regcmd = re.compile(r'.*\\stackrel\s*\[')
+        i = 0
+        while True:
+            i = find_token(document.body, '\\begin_inset Formula', i)
+            if i == -1:
+                return
+            j = find_end_of_inset(document.body, i)
+            if j == -1:
+                document.warning("Malformed LyX document: Can't find end of Formula inset at line " + str(i))
+                i += 1
+                continue
+            code = "\n".join(document.body[i:j])
+            if regcmd.match(code):
+                add_to_preamble(document, ["\\usepackage{stackrel}"])
+                return
+            i = j
+
+
 def convert_cite_engine_type(document):
     "Determine the \\cite_engine_type from the citation engine."
     i = find_token(document.header, "\\cite_engine", 0)
@@ -3022,10 +3065,12 @@ convert = [
            [453, [convert_use_stmaryrd]],
            [454, [convert_overprint]],
            [455, []],
-           [456, [convert_epigraph]]
+           [456, [convert_epigraph]],
+           [457, [convert_use_stackrel]]
           ]
 
 revert =  [
+           [456, [revert_use_stackrel]],
            [455, [revert_epigraph]],
            [454, [revert_frametitle]],
            [453, [revert_overprint]],
index 2098dea1b71b9524bd19eac4294f245f24556bbe..5e5f0381bb7952cfccc0a4167e242d5538dfe301 100644 (file)
@@ -435,6 +435,8 @@ ToolbarSet
                Item "bcancel" "math-insert \bcancel"
                Item "xcancel" "math-insert \xcancel"
                Item "cancelto" "math-insert \cancelto"
+               Item "stackrel" "math-insert \stackrel"
+               Item "stackrelthree" "math-insert \stackrelthree"
        End
 
        Toolbar "latex_arrow" "Arrows"
index 4a009aa009ff51a4f66716d22a339a14a8e654f6..0b0965c236218925af6d655a4ef77333fe44b14a 100644 (file)
@@ -454,6 +454,7 @@ vector<string> const & BufferParams::auto_packages()
                packages.push_back("mathdots");
                packages.push_back("mathtools");
                packages.push_back("mhchem");
+               packages.push_back("stackrel");
                packages.push_back("stmaryrd");
                packages.push_back("undertilde");
        }
index 80025abff1550b1d9d73d170bc3d1f450e5c78ff..1bff132187d287966dc28dad9404d2cf4a733277 100644 (file)
@@ -519,7 +519,7 @@ private:
 
        typedef std::map<std::string, Package> PackageMap;
        /** Whether and how to load packages like amsmath, esint, mhchem,
-        *  mathdots and undertilde.
+        *  mathdots, stackrel, stmaryrd and undertilde.
         */
        PackageMap use_packages;
 
index 9a73c8e21ed36f0a6b6cbb4ab8f205899cf4b43c..6b23fc537b4f69d497235965e6d6df51d5d403a4 100644 (file)
@@ -851,6 +851,10 @@ string const LaTeXFeatures::getPackages() const
            params_.use_package("stmaryrd") != BufferParams::package_off)
                packages << "\\usepackage{stmaryrd}\n";
 
+       if (mustProvide("stackrel") &&
+           params_.use_package("stackrel") != BufferParams::package_off)
+               packages << "\\usepackage{stackrel}\n";
+
        if (mustProvide("undertilde") &&
                params_.use_package("undertilde") != BufferParams::package_off)
                packages << "\\usepackage{undertilde}\n";
index 180a83aeee9727951fd60b945a32227b555df472..2ce8393da6db3ee415b8034c3b741c2627e512fc 100644 (file)
@@ -156,6 +156,10 @@ char const * packages_gui[][4] =
         N_("Use mhchem &package automatically"),
         N_("Use mh&chem package"),
         N_("The LaTeX package mhchem is only used if either the command \\ce or \\cf is inserted into formulas")},
+       {"stackrel",
+        N_("Use stackrel package automatically"),
+        N_("Use stackrel package"),
+        N_("The LaTeX package stackrel is only used if the command \\stackrel with subscript is inserted into formulas")},
        {"stmaryrd",
         N_("Use stmaryrd package automatically"),
         N_("Use stmaryrd package"),
index 0e4352546ca31151fdc220fa3f16d3c7c7f1cfd9..e3ed60a22ccd46fb49b34522eac848cf935ad017 100644 (file)
@@ -2099,6 +2099,7 @@ MathCompletionList::MathCompletionList(Cursor const & cur)
        globals.push_back(from_ascii("\\root"));
        globals.push_back(from_ascii("\\tabular"));
        globals.push_back(from_ascii("\\stackrel"));
+       globals.push_back(from_ascii("\\stackrelthree"));
        globals.push_back(from_ascii("\\binom"));
        globals.push_back(from_ascii("\\choose"));
        globals.push_back(from_ascii("\\brace"));
index 200fde5a358a748f1e63b3c13cee957c6627f4ef..d8b9e97d255c1b69d0c9740260898dbfe70cad04 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "InsetMathStackrel.h"
 
+#include "Cursor.h"
 #include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
@@ -20,7 +21,8 @@ using namespace std;
 
 namespace lyx {
 
-InsetMathStackrel::InsetMathStackrel(Buffer * buf) : InsetMathFracBase(buf)
+InsetMathStackrel::InsetMathStackrel(Buffer * buf, bool sub)
+       : InsetMathFracBase(buf, sub ? 3 : 2)
 {}
 
 
@@ -30,6 +32,24 @@ Inset * InsetMathStackrel::clone() const
 }
 
 
+bool InsetMathStackrel::idxUpDown(Cursor & cur, bool up) const
+{
+       if (up) {
+               if (cur.idx() == 0)
+                       return false;
+       } else {
+               if (cur.idx() + 1 ==  nargs())
+                       return false;
+       }
+       InsetMath::idx_type target = up ? cur.idx() - 1 : cur.idx() + 1;
+       if (cur.idx() == target)
+               return false;
+       cur.idx() = target;
+       cur.pos() = cell(target).x2pos(&cur.bv(), cur.x_target());
+       return true;
+}
+
+
 void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Dimension dim1;
@@ -37,9 +57,17 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       dim.wid = max(dim0.width(), dim1.width()) + 4;
-       dim.asc = dim1.ascent() + dim0.height() + 4;
-       dim.des = dim1.descent();
+       if (nargs() > 2) {
+               Dimension dim2;
+               cell(2).metrics(mi, dim2);
+               dim.wid = max(max(dim0.width(), dim1.width()), dim2.width()) + 4;
+               dim.asc = dim1.ascent() + dim0.height() + 4;
+               dim.des = dim1.descent() + dim2.height() + dim2.descent() + 1;
+       } else {
+               dim.wid = max(dim0.width(), dim1.width()) + 4;
+               dim.asc = dim1.ascent() + dim0.height() + 4;
+               dim.des = dim1.descent();
+       }
        metricsMarkers(dim);
 }
 
@@ -54,6 +82,11 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
        cell(1).draw(pi, m - dim1.width() / 2, y);
        FracChanger dummy(pi.base);
        cell(0).draw(pi, m - dim0.width() / 2, yo);
+       if (nargs() > 2) {
+               Dimension const & dim2 = cell(2).dimension(*pi.base.bv);
+               int y2 = y + dim1.descent() + dim2.ascent() + 1;
+               cell(2).draw(pi, m - dim2.width() / 2, y2);
+       }
        drawMarkers(pi, x, y);
 }
 
@@ -61,40 +94,69 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 void InsetMathStackrel::write(WriteStream & os) const
 {
        MathEnsurer ensurer(os);
-       os << "\\stackrel{" << cell(0) << "}{" << cell(1) << '}';
+       os << "\\stackrel";
+       if (nargs() > 2)
+               os << '[' << cell(2) << ']';
+       os << '{' << cell(0) << "}{" << cell(1) << '}';
 }
 
 
 void InsetMathStackrel::normalize(NormalStream & os) const
 {
-       os << "[stackrel " << cell(0) << ' ' << cell(1) << ']';
+       os << "[stackrel " << cell(0) << ' ' << cell(1);
+       if (nargs() > 2)
+               os << ' ' << cell(2);
+       os << ']';
 }
 
 
 void InsetMathStackrel::mathmlize(MathStream & ms) const
 {
-       ms << "<mover accent='false'>" << cell(1) << cell(0) << "</mover>";
+       if (nargs() > 2)
+               ms << "<munderover>" << cell(1) << cell(2) << cell(0) << "</munderover>";
+       else
+               ms << "<mover accent='false'>" << cell(1) << cell(0) << "</mover>";
 }
 
 
 void InsetMathStackrel::htmlize(HtmlStream & os) const
 {
-       // at the moment, this is exactly the same as overset
-       os << MTag("span", "class='overset'")
-                << MTag("span", "class='top'") << cell(0) << ETag("span")
-                << MTag("span") << cell(1) << ETag("span")
-                << ETag("span");
+       if (nargs() > 2) {
+               os << MTag("span", "class='underoverset'")
+                  << MTag("span", "class='top'") << cell(0) << ETag("span")
+                  << MTag("span") << cell(1) << ETag("span")
+                  << MTag("span", "class='bottom'") << cell(2) << ETag("span");
+       } else {
+               // at the moment, this is exactly the same as overset
+               os << MTag("span", "class='overset'")
+                  << MTag("span", "class='top'") << cell(0) << ETag("span")
+                  << MTag("span") << cell(1) << ETag("span");
+       }
+       os << ETag("span");
 }
 
 
 void InsetMathStackrel::validate(LaTeXFeatures & features) const
 {
-       // from overset
-       if (features.runparams().math_flavor == OutputParams::MathAsHTML)
-               features.addCSSSnippet(
-                       "span.overset{display: inline-block; vertical-align: bottom; text-align:center;}\n"
-                       "span.overset span {display: block;}\n"
-                       "span.top{font-size: 66%;}");
+       if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
+               if (nargs() > 2) {
+                       // FIXME: "vertical-align: middle" works only if the
+                       // height of sub and super script is approximately equal.
+                       features.addCSSSnippet(
+                               "span.underoverset{display: inline-block; vertical-align: middle; text-align:center;}\n"
+                               "span.underoverset span {display: block;}\n"
+                               "span.bottom{font-size: 66%;}\n"
+                               "span.top{font-size: 66%;}");
+               } else {
+                       // from overset
+                       features.addCSSSnippet(
+                               "span.overset{display: inline-block; vertical-align: bottom; text-align:center;}\n"
+                               "span.overset span {display: block;}\n"
+                               "span.top{font-size: 66%;}");
+               }
+       }
+       if (nargs() > 2)
+               features.require("stackrel");
 
        InsetMathNest::validate(features);
 }
index 11160c37ef95ab27bd927277310dc528b5231b50..91862a7792b8ecf8e62629757cdc745b420a3c27 100644 (file)
@@ -20,7 +20,9 @@ namespace lyx {
 class InsetMathStackrel : public InsetMathFracBase {
 public:
        ///
-       InsetMathStackrel(Buffer * buf);
+       InsetMathStackrel(Buffer * buf, bool sub);
+       ///
+       bool idxUpDown(Cursor &, bool up) const;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 29d9a5f9a4839db950025e2e3991e2a563d15904..5266edae67e08d526c4ae91143a81e9811a784a4 100644 (file)
@@ -453,7 +453,10 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
        if (s == "tabular")
                return MathAtom(new InsetMathTabular(buf, s, 1, 1));
        if (s == "stackrel")
-               return MathAtom(new InsetMathStackrel(buf));
+               return MathAtom(new InsetMathStackrel(buf, false));
+       // This string value is only for math toolbar use, no LaTeX name
+       if (s == "stackrelthree")
+               return MathAtom(new InsetMathStackrel(buf, true));
        if (s == "binom")
                return MathAtom(new InsetMathBinom(buf, InsetMathBinom::BINOM));
        if (s == "dbinom")
index 1982af3c86c47b2b2e85f59fb367d4a1c9a654c0..3f20df5eb7acb4bd697e998f38dd6b8df72c6adb 100644 (file)
@@ -59,6 +59,7 @@ following hack as starting point to write some macros:
 #include "InsetMathSpace.h"
 #include "InsetMathSplit.h"
 #include "InsetMathSqrt.h"
+#include "InsetMathStackrel.h"
 #include "InsetMathString.h"
 #include "InsetMathTabular.h"
 #include "MathMacroTemplate.h"
@@ -1441,6 +1442,17 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        parse(cell->back().nucleus()->cell(1), FLAG_ITEM, mode);
                }
 
+               else if (t.cs() == "stackrel") {
+                       // Here allowed formats are \stackrel[subscript]{superscript}{operator}
+                       MathData ar;
+                       parse(ar, FLAG_OPTION, mode);
+                       cell->push_back(MathAtom(new InsetMathStackrel(buf, !ar.empty())));
+                       if (!ar.empty())
+                               cell->back().nucleus()->cell(2) = ar;
+                       parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
+                       parse(cell->back().nucleus()->cell(1), FLAG_ITEM, mode);
+               }
+
                else if (t.cs() == "xrightarrow" || t.cs() == "xleftarrow") {
                        cell->push_back(createInsetMath(t.cs(), buf));
                        parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
index fe6de6995f910e7dfaa46fb95d4deb7a88a95fb6..31ac0916e2409c93581cf7232b3c1a6f26ed4688 100644 (file)
@@ -517,6 +517,7 @@ Preamble::Preamble() : one_language(true), title_layout_found(false)
        h_use_packages["mhchem"]     = "0";
        h_use_packages["mathdots"]   = "0";
        h_use_packages["mathtools"]  = "0";
+       h_use_packages["stackrel"]   = "0";
        h_use_packages["stmaryrd"]   = "0";
        h_use_packages["undertilde"] = "0";
 }
@@ -703,8 +704,8 @@ void Preamble::handle_package(Parser &p, string const & name,
 
        else if (name == "amsmath" || name == "amssymb" ||
                 name == "esint" || name == "mhchem" || name == "mathdots" ||
-                name == "mathtools" || name == "stmaryrd" ||
-                name == "undertilde")
+                name == "mathtools" || name == "stackrel" ||
+                name == "stmaryrd" || name == "undertilde")
                h_use_packages[name] = "2";
 
        else if (name == "babel") {
index f2ae0efd7ee97f88de79d763afec8d48630cde14..162d07fd471f239294a6d0000d19b53660aafdf4 100644 (file)
@@ -97,6 +97,7 @@ Format LaTeX feature                        LyX feature
 455    beamer frametitle command            \begin_layout FrameTitle
        \frametitle<overlay>[short}{long}
 456    memoir: \epigraph{text}{source}      layout Epigraph, InsetArgument
+457    automatic stackrel loading           \use_package stackrel
 
 
 General
index 6ebad1a19a287f7716b3d25919ea80717d78defe..a6c5cdaaec82d79f76a072bd7f4f996c35e4bb64 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -46,6 +46,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index fefacc0a8252af5b6bdfaf9640587f57c6ef64fa..38d6bc323f44fe5192b22106b3e02fff3e160fca 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -44,6 +44,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine natbib
index 23bf90d94641649b53f94f393a02a2e600cb04f7..b9079495e5ba7274dd8c7a20319a8d06d02d1a7b 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -46,6 +46,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index 0ddc59d9f4f8fa0eaf483bd3740f818416ddabfa..1315f5ef13f938dce26bfe3a528c32ec0bb72f0c 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -70,6 +70,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index 7b1b4c9501548cb376b1988b093a84c12515cbae..df5c9cc89405605ec87131a1d741d7c18618a961 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -50,6 +50,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine natbib
index 226102c73013cfc255b7529f6860723587e4d4cb..f1bc38583694e8f2019539f8b289e5c649bf9860 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass amsart
@@ -42,6 +42,7 @@ theorems-ams
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index ea9ddab8d0abfdf4baf6589ab03725df696a2a43..65ee7a35bfb6acbb4fbc42610a063e7bff35db18 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -75,6 +75,7 @@ logicalmkup
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index ba14fabec6dc1b22dbb7f78f8b4fda58c63275b6..4eaaba78930fdb57acd4f72c507c7f6b9cd10567 100644 (file)
@@ -1,5 +1,5 @@
 #LyX file created by tex2lyx 2.1.0dev
-\lyxformat 456
+\lyxformat 457
 \begin_document
 \begin_header
 \textclass article
@@ -46,6 +46,7 @@
 \use_package mathdots 0
 \use_package mathtools 0
 \use_package mhchem 0
+\use_package stackrel 0
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
index 5cab79e8d58abc0b3ed4782e2ce263cb6de2e8cc..aad31feaac886c3e8dcde9902523182398e29c91 100644 (file)
@@ -30,8 +30,8 @@ extern char const * const lyx_version_info;
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 456 // spitz: proper support for memoir epigraph
-#define LYX_FORMAT_TEX2LYX 456 // spitz: proper support for memoir epigraph
+#define LYX_FORMAT_LYX 457 // gb: automatic stackrel package loading
+#define LYX_FORMAT_TEX2LYX 457 // gb: automatic stackrel package loading
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
 #ifndef _MSC_VER