2 * \file InsetMathKern.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathKern.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
18 #include "Dimension.h"
19 #include "MetricsInfo.h"
21 #include "support/docstring.h"
25 InsetMathKern::InsetMathKern()
30 InsetMathKern::InsetMathKern(Length const & w)
36 InsetMathKern::InsetMathKern(docstring const & s)
42 Inset * InsetMathKern::clone() const
44 return new InsetMathKern(*this);
48 void InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
52 dim.wid = mi.base.inPixels(wid_);
56 void InsetMathKern::draw(PainterInfo &, int, int) const
60 void InsetMathKern::write(TeXMathStream & os) const
63 os << "\\kern" << ' ';
64 else if (wid_.unit() == Length::MU)
65 os << "\\mkern" << from_utf8(wid_.asLatexString()) << ' ';
67 os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
71 void InsetMathKern::normalize(NormalStream & os) const
76 os << "[kern " << from_utf8(wid_.asLatexString()) << ']';
80 void InsetMathKern::infoize2(odocstream & os) const
84 os << ": " << from_utf8(wid_.asLatexString());