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 bool isMathRel() const;
45 bool isMathBin() const;
47 bool isMathPunct() const;
49 bool isOrdAlpha() const;
50 /// do we take scripts?
51 bool isScriptable() const;
52 /// do we take \limits or \nolimits?
53 bool takesLimits() const;
54 /// identifies SymbolInset as such
55 InsetMathSymbol const * asSymbolInset() const { return this; }
56 /// the LaTeX name of the symbol (without the backslash)
57 docstring name() const;
58 /// request "external features"
59 void validate(LaTeXFeatures & features) const;
62 void normalize(NormalStream &) const;
64 void maple(MapleStream &) const;
66 void maxima(MaximaStream &) const;
68 void mathematica(MathematicaStream &) const;
70 void mathmlize(MathStream &) const;
72 void htmlize(HtmlStream &) const;
73 /// \param spacing controls whether we print spaces around
74 /// "operator"-type symbols or just print them raw
75 void htmlize(HtmlStream &, bool spacing) const;
77 void octave(OctaveStream &) const;
79 void write(WriteStream & os) const;
81 void infoize2(odocstream & os) const;
83 InsetCode lyxCode() const { return MATH_SYMBOL_CODE; }
86 virtual Inset * clone() const;
88 latexkeys const * sym_;
91 /// cached superscript kerning
94 mutable bool scriptable_;