3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS
14 #include "insettheorem.h"
17 #include "BufferView.h"
19 #include "support/LOstream.h"
21 #include "insets/insettext.h"
27 The intention is to be able to create arbitrary theorem like environments
28 sing this class and some helper/container classes. It should be possible
29 to create these theorems both from layout file and interactively by the
33 InsetTheorem::InsetTheorem()
36 setLabel(_("theorem"));
37 LyXFont font(LyXFont::ALL_SANE);
40 font.setColor(LColor::collapsable);
43 setAutoCollapse(false);
45 setInsetName("Theorem");
49 void InsetTheorem::write(Buffer const * buf, ostream & os) const
51 os << getInsetName() << "\n";
52 InsetCollapsable::write(buf, os);
56 Inset * InsetTheorem::clone() const
59 #warning Is this inset used? If YES this is WRONG!!! (Jug)
61 InsetTheorem * result = new InsetTheorem;
63 result->collapsed_ = collapsed_;
68 string const InsetTheorem::editMessage() const
70 return _("Opened Theorem Inset");
74 int InsetTheorem::latex(Buffer const * buf, ostream & os,
75 LatexRunParams const & runparams) const
77 os << "\\begin{theorem}%\n";
79 int i = inset.latex(buf, os, runparams);
80 os << "\\end{theorem}%\n";