2 * \file InsetMarginal.cpp
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"
18 #include "Paragraph.h"
19 #include "OutputParams.h"
21 #include "support/std_ostream.h"
31 InsetMarginal::InsetMarginal(BufferParams const & bp)
34 setLabel(_("margin"));
38 InsetMarginal::InsetMarginal(InsetMarginal const & in)
41 setLabel(_("margin"));
45 auto_ptr<Inset> InsetMarginal::doClone() const
47 return auto_ptr<Inset>(new InsetMarginal(*this));
51 docstring const InsetMarginal::editMessage() const
53 return _("Opened Marginal Note Inset");
57 int InsetMarginal::latex(Buffer const & buf, odocstream & os,
58 OutputParams const & runparams) const
60 os << "%\n\\marginpar{";
61 int const i = InsetText::latex(buf, os, runparams);
67 int InsetMarginal::plaintext(Buffer const & buf, odocstream & os,
68 OutputParams const & runparams) const
70 os << '[' << buf.B_("margin") << ":\n";
71 InsetText::plaintext(buf, os, runparams);
74 return PLAINTEXT_NEWLINE + 1; // one char on a separate line
78 int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
79 OutputParams const & runparams) const
81 os << "<note role=\"margin\">";
82 int const i = InsetText::docbook(buf, os, runparams);