3 * \file InsetMathSymbol.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_SYMBOLINSET_H
13 #define MATH_SYMBOLINSET_H
15 #include "InsetMath.h"
22 /** "normal" symbols that don't take limits and don't grow in displayed
25 class InsetMathSymbol : public InsetMath {
28 explicit InsetMathSymbol(latexkeys const * l);
30 explicit InsetMathSymbol(char const * name);
32 explicit InsetMathSymbol(docstring const & name);
34 void metrics(MetricsInfo & mi, Dimension & dim) const;
36 void draw(PainterInfo &, int x, int y) const;
38 int kerning(BufferView const *) const { return kerning_; }
41 mode_type currentMode() const;
43 MathClass mathClass() const;
45 bool isOrdAlpha() const;
46 /// do we take scripts?
47 bool isScriptable() const;
48 /// do we take \limits or \nolimits?
49 bool takesLimits() const;
50 /// identifies SymbolInset as such
51 InsetMathSymbol const * asSymbolInset() const { return this; }
52 /// the LaTeX name of the symbol (without the backslash)
53 docstring name() const;
54 /// request "external features"
55 void validate(LaTeXFeatures & features) const;
58 void normalize(NormalStream &) const;
60 void maple(MapleStream &) const;
62 void maxima(MaximaStream &) const;
64 void mathematica(MathematicaStream &) const;
66 void mathmlize(MathStream &) const;
68 void htmlize(HtmlStream &) const;
69 /// \param spacing controls whether we print spaces around
70 /// "operator"-type symbols or just print them raw
71 void htmlize(HtmlStream &, bool spacing) const;
73 void octave(OctaveStream &) const;
75 void write(WriteStream & os) const;
77 void infoize2(odocstream & os) const;
79 InsetCode lyxCode() const { return MATH_SYMBOL_CODE; }
82 virtual Inset * clone() const;
84 latexkeys const * sym_;
87 /// cached superscript kerning
90 mutable bool scriptable_;