14 Atom::Atom(const Symbol * s)
20 Atom::TeXstring() const
22 // whugh.. Hard coded...
24 s+= String(off.y * VERT_TO_PT)+"pt\\hbox to 0pt{\\kern ";
25 s+= String(off.x * HOR_TO_PT) + "pt";
26 s+= sym->tex + "\\hss}";
30 /****************************************************************/
33 Molecule::TeXstring() const
36 for(Cursor<Atom> c(ats); c.ok(); c++)
42 Molecule::extent() const
45 for(Cursor<Atom> c(ats); c.ok(); c++)
46 b.unite((*c).extent());
51 Molecule::translate(Offset o)
53 for(Cursor<Atom> c(ats); c.ok(); c++)
58 Molecule::add(const Molecule &m)
60 for (Cursor<Atom> c(m.ats); c.ok(); c++) {
67 Molecule::add_right(const Molecule &m)
69 Real xof=extent().x.max - m.extent().x.min;
71 toadd.translate(Offset(xof, 0.0));
76 Molecule::add_left(const Molecule &m)
78 Real xof=extent().x.min - m.extent().x.max;
80 toadd.translate(Offset(xof, 0.0));
86 Molecule::add_top(const Molecule &m)
88 Real yof=extent().y.max - m.extent().y.min;
90 toadd.translate(Offset(0,yof));
95 Molecule::add_bot(const Molecule &m)
97 Real yof=extent().y.min- m.extent().y.max;
99 toadd.translate(Offset(0,yof));