+
+2003-09-12 André Pönitz <poenitz@gmx.net>
+
+ * math_boldsymbolinset.[Ch]: preliminary support
+
+ * Makefile.am: adjust
+
2003-09-05 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* math_kerninset.h:
math_biginset.h \
math_binominset.C \
math_binominset.h \
+ math_boldsymbolinset.C \
+ math_boldsymbolinset.h \
math_boxinset.C \
math_boxinset.h \
math_braceinset.C \
dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
{
- //lyxerr << "InsetFormulaBase::localDispatch: act: " << cmd.action
- // << " arg: '" << cmd.argument
- // << " x: '" << cmd.x
- // << " y: '" << cmd.y
- // << "' button: " << cmd.button() << endl;
+ lyxerr << "InsetFormulaBase::localDispatch: act: " << cmd.action
+ << " arg: '" << cmd.argument
+ << " x: '" << cmd.x
+ << " y: '" << cmd.y
+ << "' button: " << cmd.button() << endl;
BufferView * bv = cmd.view();
--- /dev/null
+/**
+ * \file math_boldsymbolinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "math_boldsymbolinset.h"
+#include "math_mathmlstream.h"
+#include "math_data.h"
+#include "LaTeXFeatures.h"
+#include "support/std_ostream.h"
+
+using std::auto_ptr;
+
+
+MathBoldsymbolInset::MathBoldsymbolInset()
+ : MathNestInset(1)
+{}
+
+
+auto_ptr<InsetBase> MathBoldsymbolInset::clone() const
+{
+ return auto_ptr<InsetBase>(new MathBoldsymbolInset(*this));
+}
+
+
+void MathBoldsymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
+{
+ //FontSetChanger dummy(mi.base, "mathbf");
+ cell(0).metrics(mi, dim);
+ metricsMarkers(1);
+ ++dim.wid; // for 'double stroke'
+ dim_ = dim;
+}
+
+
+void MathBoldsymbolInset::draw(PainterInfo & pi, int x, int y) const
+{
+ //FontSetChanger dummy(pi.base, "mathbf");
+ cell(0).draw(pi, x + 1, y);
+ cell(0).draw(pi, x + 2, y);
+ drawMarkers(pi, x, y);
+}
+
+
+void MathBoldsymbolInset::metricsT(TextMetricsInfo const & mi, Dimension & /*dim*/) const
+{
+ cell(0).metricsT(mi, dim_);
+}
+
+
+void MathBoldsymbolInset::drawT(TextPainter & pain, int x, int y) const
+{
+ cell(0).drawT(pain, x, y);
+}
+
+
+void MathBoldsymbolInset::validate(LaTeXFeatures & features) const
+{
+ MathNestInset::validate(features);
+ features.require("amssymb");
+}
+
+
+void MathBoldsymbolInset::write(WriteStream & os) const
+{
+ os << "\\boldsymbol{" << cell(0) << "}";
+}
+
+
+void MathBoldsymbolInset::infoize(std::ostream & os) const
+{
+ os << "Boldsymbol ";
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file math_boldsymbolinset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef MATH_BOLDSYMBOLINSET_H
+#define MATH_BOLDSYMBOLINSET_H
+
+#include "math_nestinset.h"
+
+
+/// Inset for AMSTeX's \boldsymbol
+class MathBoldsymbolInset : public MathNestInset {
+public:
+ ///
+ MathBoldsymbolInset();
+ ///
+ std::auto_ptr<InsetBase> clone() const;
+ ///
+ void metrics(MetricsInfo & mi, Dimension & dim) const;
+ ///
+ void draw(PainterInfo & pi, int x, int y) const;
+ ///
+ void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
+ ///
+ void drawT(TextPainter & pi, int x, int y) const;
+ ///
+ void validate(LaTeXFeatures & features) const;
+ ///
+ void write(WriteStream & os) const;
+ ///
+ void infoize(std::ostream & os) const;
+};
+
+#endif
#include "math_amsarrayinset.h"
#include "math_binominset.h"
#include "math_boxinset.h"
+#include "math_boldsymbolinset.h"
#include "math_casesinset.h"
#include "math_decorationinset.h"
#include "math_dotsinset.h"
return MathAtom(new MathLefteqnInset);
if (s == "lyxert")
return MathAtom(new MathErtInset);
+ if (s == "boldsymbol")
+ return MathAtom(new MathBoldsymbolInset);
if (MathMacroTable::has(s))
return MathAtom(new MathMacro(s));