mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
support for \xrightarrow and \xleftarrow
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3483 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b5fd9ac98d
commit
961105ec0e
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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 },
|
||||
|
@ -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 << ")";
|
||||
}
|
@ -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
|
Loading…
Reference in New Issue
Block a user