1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 * ======================================================
14 #pragma implementation
17 #include "insetfoot.h"
20 #include "BufferView.h"
22 #include "insets/insettext.h"
23 #include "support/LOstream.h"
25 // the following are needed just to get the layout of the enclosing
26 // paragraph. This seems a bit too much to me (JMarc)
27 #include "lyxlayout.h"
29 #include "paragraph.h"
35 InsetFoot::InsetFoot(BufferParams const & bp)
43 InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
44 : InsetFootlike(in, same_id)
51 Inset * InsetFoot::clone(Buffer const &, bool same_id) const
53 return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
57 string const InsetFoot::editMessage() const
59 return _("Opened Footnote Inset");
63 int InsetFoot::latex(Buffer const * buf,
64 ostream & os, bool fragile, bool fp) const
66 if (buf && parOwner()) {
67 LyXLayout_ptr const & layout = parOwner()->layout();
68 fragile |= layout->intitle;
71 os << "%\n\\footnote{";
73 int const i = inset.latex(buf, os, fragile, fp);
80 int InsetFoot::docbook(Buffer const * buf, ostream & os, bool mixcont) const
83 int const i = inset.docbook(buf, os, mixcont);