]> git.lyx.org Git - features.git/commitdiff
support for \xrightarrow and \xleftarrow
authorAndré Pönitz <poenitz@gmx.net>
Tue, 5 Feb 2002 09:51:40 +0000 (09:51 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 5 Feb 2002 09:51:40 +0000 (09:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3483 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/Makefile.am
src/mathed/math_factory.C
src/mathed/math_support.C
src/mathed/math_xymatrix.C [deleted file]
src/mathed/math_xymatrix.h [deleted file]

index 2e8b7ad51d06100b28228ffd434751ba33511d86..87d2f0a23d8e5ae5e0f483d4119614b116c952cc 100644 (file)
@@ -1,3 +1,6 @@
+2002-02-01  André Pönitz <poenitz@gmx.net>
+
+       * math_xarrowinset.[Ch]: support for \xrightarrow and \xleftarrow
 
 2002-02-01  André Pönitz <poenitz@gmx.net>
 
index 5a5a05fe9715fee9d129118ff3e2370c694e839f..4a400b364783a4052558c1a9ecbf243caf1d8ffc 100644 (file)
@@ -127,7 +127,9 @@ libmathed_la_SOURCES = \
        math_unknowninset.h \
        math_undersetinset.C \
        math_undersetinset.h \
+       math_xarrowinset.C \
+       math_xarrowinset.h \
        math_xdata.C \
        math_xdata.h \
-       math_xymatrix.C \
-       math_xymatrix.h
+       math_xymatrixinset.C \
+       math_xymatrixinset.h
index c7a72f873d80eda87847ff0094a4062889eb7361..540c86e1a0dad21405b35f16503973d8ea457224 100644 (file)
@@ -23,7 +23,8 @@
 #include "math_symbolinset.h"
 #include "math_undersetinset.h"
 #include "math_unknowninset.h"
-#include "math_xymatrix.h"
+#include "math_xarrowinset.h"
+#include "math_xymatrixinset.h"
 
 
 MathAtom createMathInset(latexkeys const * l)
@@ -94,6 +95,9 @@ MathAtom createMathInset(string const & s)
        if (s == "xymatrix")
                return MathAtom(new MathXYMatrixInset);
 
+       if (s == "xrightarrow")
+               return MathAtom(new MathXArrowInset(s));
+
        latexkeys const * l = in_word_set(s);
        if (l)
                return createMathInset(l);
index e562200ac6c096fcde0ea81673aa0f1430a6356a..83ed49e7939785dbbf8f38cce626cf1315fbf5d4 100644 (file)
@@ -463,6 +463,8 @@ named_deco_struct deco_table[] = {
        {"overbrace",      brace,      3 },
        {"overleftarrow",  arrow,      1 },
        {"overrightarrow", arrow,      3 },
+       {"xleftarrow",     arrow,      1 },
+       {"xrightarrow",    arrow,      3 },
        
        // Delimiters
        {"(",              parenth,    0 },
diff --git a/src/mathed/math_xymatrix.C b/src/mathed/math_xymatrix.C
deleted file mode 100644 (file)
index f71a46c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "math_xymatrix.h"
-#include "math_mathmlstream.h"
-#include "math_streamstr.h"
-
-
-MathXYMatrixInset::MathXYMatrixInset()
-       : MathGridInset(1, 1)
-{}
-
-
-MathInset * MathXYMatrixInset::clone() const
-{
-       return new MathXYMatrixInset(*this);
-}
-
-
-void MathXYMatrixInset::metrics(MathMetricsInfo const & st) const
-{
-       MathMetricsInfo mi = st;
-       if (mi.style == LM_ST_DISPLAY)
-               mi.style = LM_ST_TEXT;
-       MathGridInset::metrics(mi);
-}
-
-
-void MathXYMatrixInset::write(WriteStream & os) const
-{
-       os << "\\xymatrix{";
-       MathGridInset::write(os);
-       os << "}\n";
-}
-
-
-void MathXYMatrixInset::normalize(NormalStream & os) const
-{
-       os << "[xymatrix ";
-       MathGridInset::normalize(os);
-       os << "]";
-}
-
-
-void MathXYMatrixInset::maplize(MapleStream & os) const
-{
-       os << "xymatrix(";
-       MathGridInset::maplize(os);
-       os << ")";
-}
diff --git a/src/mathed/math_xymatrix.h b/src/mathed/math_xymatrix.h
deleted file mode 100644 (file)
index bfebb04..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-#ifndef MATH_XYMATRIX_H
-#define MATH_XYMATRIX_H
-
-#include "math_gridinset.h"
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-
-class MathXYMatrixInset : public MathGridInset {
-public: 
-       ///
-       MathXYMatrixInset();
-       ///
-       MathInset * clone() const;
-       ///
-       void metrics(MathMetricsInfo const & st) const;
-       ///
-       MathXYMatrixInset * asXYMatrixInset() { return this; }
-
-       ///
-       void write(WriteStream & os) const;
-       ///
-       void normalize(NormalStream &) const;
-       ///
-       void maplize(MapleStream &) const;
-};
-
-#endif