2000-06-26 18:48:45 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1998 The LyX Team.
|
|
|
|
*
|
2000-06-28 16:03:01 +00:00
|
|
|
* ======================================================
|
|
|
|
*/
|
2000-06-26 18:48:45 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetmarginal.h"
|
|
|
|
#include "gettext.h"
|
|
|
|
#include "lyxfont.h"
|
|
|
|
#include "BufferView.h"
|
|
|
|
#include "lyxtext.h"
|
2000-07-04 11:30:07 +00:00
|
|
|
#include "insets/insettext.h"
|
2000-06-26 18:48:45 +00:00
|
|
|
#include "support/LOstream.h"
|
2000-07-04 19:16:35 +00:00
|
|
|
#include "debug.h"
|
2000-06-26 18:48:45 +00:00
|
|
|
|
|
|
|
|
2000-07-04 19:16:35 +00:00
|
|
|
InsetMarginal::InsetMarginal()
|
|
|
|
: InsetFootlike()
|
2000-06-28 13:35:52 +00:00
|
|
|
{
|
2000-07-04 19:16:35 +00:00
|
|
|
setLabel(_("margin"));
|
|
|
|
setInsetName("Marginal");
|
2000-06-28 13:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
string const InsetMarginal::editMessage() const
|
2000-06-26 18:48:45 +00:00
|
|
|
{
|
2000-07-04 19:16:35 +00:00
|
|
|
return _("Opened Marginal Note Inset");
|
2000-06-26 18:48:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
int InsetMarginal::latex(Buffer const * buf,
|
2001-04-04 20:34:04 +00:00
|
|
|
std::ostream & os, bool fragile, bool fp) const
|
2000-06-26 18:48:45 +00:00
|
|
|
{
|
2001-06-29 14:01:29 +00:00
|
|
|
os << "%\n\\marginpar{";
|
2000-07-15 23:51:46 +00:00
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
int const i = inset.latex(buf, os, fragile, fp);
|
2001-06-29 14:01:29 +00:00
|
|
|
os << "%\n}";
|
2000-07-15 23:51:46 +00:00
|
|
|
|
|
|
|
return i + 2;
|
2000-06-26 18:48:45 +00:00
|
|
|
}
|