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 "InsetFoot.h"
18 // the following is needed just to get the layout of the enclosing
19 // paragraph. This seems a bit too much to me (JMarc)
20 #include "OutputParams.h"
22 #include "support/std_ostream.h"
32 InsetFoot::InsetFoot(BufferParams const & bp)
39 InsetFoot::InsetFoot(InsetFoot const & in)
46 auto_ptr<Inset> InsetFoot::doClone() const
48 return auto_ptr<Inset>(new InsetFoot(*this));
52 docstring const InsetFoot::editMessage() const
54 return _("Opened Footnote Inset");
58 int InsetFoot::latex(Buffer const & buf, odocstream & os,
59 OutputParams const & runparams_in) const
61 OutputParams runparams = runparams_in;
62 // footnotes in titling commands like \title have moving arguments
63 runparams.moving_arg |= runparams_in.intitle;
65 // in titling commands, \thanks should be used instead of \footnote.
66 // some classes (e.g. memoir) do not understand \footnote.
67 if (runparams_in.intitle)
70 os << "%\n\\footnote{";
72 int const i = InsetText::latex(buf, os, runparams);
74 runparams_in.encoding = runparams.encoding;
80 int InsetFoot::plaintext(Buffer const & buf, odocstream & os,
81 OutputParams const & runparams) const
83 os << '[' << buf.B_("footnote") << ":\n";
84 InsetText::plaintext(buf, os, runparams);
87 return PLAINTEXT_NEWLINE + 1; // one char on a separate line
91 int InsetFoot::docbook(Buffer const & buf, odocstream & os,
92 OutputParams const & runparams) const
95 int const i = InsetText::docbook(buf, os, runparams);