]> git.lyx.org Git - lyx.git/blob - src/mathed/math_substackinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_substackinset.C
1 #include <config.h>
2
3 #ifdef __GNUG__
4 #pragma implementation
5 #endif
6
7 #include "math_substackinset.h"
8 #include "math_mathmlstream.h"
9 #include "math_streamstr.h"
10
11
12 MathSubstackInset::MathSubstackInset()
13         : MathGridInset(1, 1)
14 {}
15
16
17 MathInset * MathSubstackInset::clone() const
18 {
19         return new MathSubstackInset(*this);
20 }
21
22
23 void MathSubstackInset::metrics(MathMetricsInfo & mi) const
24 {
25         if (mi.base.style == LM_ST_DISPLAY) {
26                 MathStyleChanger dummy(mi.base, LM_ST_TEXT);
27                 MathGridInset::metrics(mi);
28         } else {
29                 MathGridInset::metrics(mi);
30         }
31 }
32
33
34 void MathSubstackInset::write(WriteStream & os) const
35 {
36         os << "\\substack{";
37         MathGridInset::write(os);
38         os << "}\n";
39 }
40
41
42 void MathSubstackInset::normalize(NormalStream & os) const
43 {
44         os << "[substack ";
45         MathGridInset::normalize(os);
46         os << ']';
47 }
48
49
50 void MathSubstackInset::maplize(MapleStream & os) const
51 {
52         os << "substack(";
53         MathGridInset::maplize(os);
54         os << ')';
55 }