+
+2002-02-08 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * formulabase.C (localDispatch): fix umlaut handling
+
+
2002-02-01 André Pönitz <poenitz@gmx.net>
* math_xarrowinset.[Ch]: support for \xrightarrow and \xleftarrow
math_xarrowinset.h \
math_xdata.C \
math_xdata.h \
+ math_xyarrowinset.C \
+ math_xyarrowinset.h \
math_xymatrixinset.C \
math_xymatrixinset.h
case LFUN_WORDLEFTSEL:
break;
- // --- accented characters ------------------------------
-
- case LFUN_UMLAUT: handleAccent(bv, arg, "ddot"); break;
- case LFUN_CIRCUMFLEX: handleAccent(bv, arg, "hat"); break;
- case LFUN_GRAVE: handleAccent(bv, arg, "grave"); break;
- case LFUN_ACUTE: handleAccent(bv, arg, "acute"); break;
- case LFUN_TILDE: handleAccent(bv, arg, "tilde"); break;
- case LFUN_MACRON: handleAccent(bv, arg, "bar"); break;
- case LFUN_DOT: handleAccent(bv, arg, "dot"); break;
- case LFUN_CARON: handleAccent(bv, arg, "check"); break;
- case LFUN_BREVE: handleAccent(bv, arg, "breve"); break;
- case LFUN_VECTOR: handleAccent(bv, arg, "vec"); break;
- case LFUN_UNDERBAR: handleAccent(bv, arg, "underbar"); break;
+ // Special casing for superscript in case of LyX handling
+ // dead-keys:
+ case LFUN_CIRCUMFLEX:
+ if (arg.empty()) {
+ // do superscript if LyX handles
+ // deadkeys
+ bv->lockedInsetStoreUndo(Undo::EDIT);
+ mathcursor->script(true);
+ updateLocal(bv, true);
+ }
+ break;
+ case LFUN_UMLAUT:
+ case LFUN_ACUTE:
+ case LFUN_GRAVE:
+ case LFUN_BREVE:
+ case LFUN_DOT:
+ case LFUN_MACRON:
+ case LFUN_CARON:
+ case LFUN_TILDE:
+ case LFUN_CEDILLA:
+ case LFUN_CIRCLE:
+ case LFUN_UNDERDOT:
+ case LFUN_TIE:
+ case LFUN_OGONEK:
+ case LFUN_HUNG_UMLAUT:
+ break;
// Math fonts
case LFUN_GREEK_TOGGLE: handleFont(bv, arg, LM_TC_GREEK); break;
}
-
-void InsetFormulaBase::handleAccent(BufferView * bv,
- string const & arg, string const & name)
-{
- bv->lockedInsetStoreUndo(Undo::EDIT);
- MathAtom at = createMathInset(name);
- mathed_parse_cell(at->cell(0), arg);
- mathcursor->insert(at);
- updateLocal(bv, true);
-}
-
-
/////////////////////////////////////////////////////////////////////
#include "math_unknowninset.h"
#include "math_xarrowinset.h"
#include "math_xymatrixinset.h"
+#include "math_xyarrowinset.h"
MathAtom createMathInset(latexkeys const * l)
else if (t.cs() == "xymatrix") {
array.push_back(createMathInset(t.cs()));
parse_lines2(array.back());
- // skip closing brace
}
// Disabled
#if 0
+ else if (0 && t.cs() == "ar") {
+ array.push_back(createMathInset(t.cs()));
+ parse_lines2(array.back());
+ }
+
else if (t.cs() == "mbox") {
array.push_back(createMathInset(t.cs()));
// slurp in the argument of mbox
--- /dev/null
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "math_xyarrowinset.h"
+#include "math_mathmlstream.h"
+#include "math_streamstr.h"
+
+
+MathXYArrowInset::MathXYArrowInset()
+ : MathNestInset(1)
+{}
+
+
+MathInset * MathXYArrowInset::clone() const
+{
+ return new MathXYArrowInset(*this);
+}
+
+
+void MathXYArrowInset::metrics(MathMetricsInfo const & mi) const
+{
+ MathNestInset::metrics(mi);
+}
+
+
+void MathXYArrowInset::write(WriteStream & os) const
+{
+ os << "\\ar{";
+ MathNestInset::write(os);
+ os << "}\n";
+}
+
+
+void MathXYArrowInset::normalize(NormalStream & os) const
+{
+ os << "[xyarrow ";
+ MathNestInset::normalize(os);
+ os << "]";
+}
--- /dev/null
+// -*- C++ -*-
+#ifndef MATH_XYARROWINSET_H
+#define MATH_ARROWINSET_H
+
+#include "math_nestinset.h"
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+
+class MathXYArrowInset : public MathNestInset {
+public:
+ ///
+ MathXYArrowInset();
+ ///
+ MathInset * clone() const;
+ ///
+ void metrics(MathMetricsInfo const & st) const;
+ ///
+ MathXYArrowInset * asXYArrowInset() { return this; }
+ ///
+ void normalize();
+
+ ///
+ void write(WriteStream & os) const;
+ ///
+ void normalize(NormalStream &) const;
+};
+
+#endif
void metrics(MathMetricsInfo const & st) const;
///
MathXYMatrixInset * asXYMatrixInset() { return this; }
+ ///
+ void normalize();
///
void write(WriteStream & os) const;