2 * \file insetmarginal.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
14 #include "insetmarginal.h"
17 #include "paragraph.h"
18 #include "outputparams.h"
20 #include "support/std_ostream.h"
30 InsetMarginal::InsetMarginal(BufferParams const & bp)
33 setLabel(_("margin"));
34 setInsetName(from_ascii("Marginal"));
38 InsetMarginal::InsetMarginal(InsetMarginal const & in)
41 setLabel(_("margin"));
42 setInsetName(from_ascii("Marginal"));
46 auto_ptr<InsetBase> InsetMarginal::doClone() const
48 return auto_ptr<InsetBase>(new InsetMarginal(*this));
52 docstring const InsetMarginal::editMessage() const
54 return _("Opened Marginal Note Inset");
58 int InsetMarginal::latex(Buffer const & buf, odocstream & os,
59 OutputParams const & runparams) const
61 os << "%\n\\marginpar{";
62 int const i = InsetText::latex(buf, os, runparams);
68 int InsetMarginal::plaintext(Buffer const & buf, odocstream & os,
69 OutputParams const & runparams) const
71 os << '[' << _("margin") << ":\n";
72 InsetText::plaintext(buf, os, runparams);
75 return PLAINTEXT_NEWLINE + 1; // one char on a separate line
79 int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
80 OutputParams const & runparams) const
82 os << "<note role=\"margin\">";
83 int const i = InsetText::docbook(buf, os, runparams);