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"
17 #include "Paragraph.h"
18 #include "OutputParams.h"
20 #include "support/std_ostream.h"
30 InsetMarginal::InsetMarginal(BufferParams const & bp)
33 setLabel(_("margin"));
37 InsetMarginal::InsetMarginal(InsetMarginal const & in)
40 setLabel(_("margin"));
44 auto_ptr<InsetBase> InsetMarginal::doClone() const
46 return auto_ptr<InsetBase>(new InsetMarginal(*this));
50 docstring const InsetMarginal::editMessage() const
52 return _("Opened Marginal Note Inset");
56 int InsetMarginal::latex(Buffer const & buf, odocstream & os,
57 OutputParams const & runparams) const
59 os << "%\n\\marginpar{";
60 int const i = InsetText::latex(buf, os, runparams);
66 int InsetMarginal::plaintext(Buffer const & buf, odocstream & os,
67 OutputParams const & runparams) const
69 os << '[' << _("margin") << ":\n";
70 InsetText::plaintext(buf, os, runparams);
73 return PLAINTEXT_NEWLINE + 1; // one char on a separate line
77 int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
78 OutputParams const & runparams) const
80 os << "<note role=\"margin\">";
81 int const i = InsetText::docbook(buf, os, runparams);