mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Add list of notes and list of footnotes to the outline pane.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22942 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0014ca7eee
commit
7c38391754
@ -221,6 +221,12 @@ docstring GuiToc::guiName(string const & type) const
|
||||
if (type == "tableofcontents")
|
||||
return _("Table of Contents");
|
||||
|
||||
if (type == "footnote")
|
||||
return _("List of Foot notes");
|
||||
|
||||
if (type == "note")
|
||||
return _("List of Notes");
|
||||
|
||||
FloatList const & floats = buffer().params().getTextClass().floats();
|
||||
if (floats.typeExist(type))
|
||||
return _(floats.getType(type).listName());
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "OutputParams.h"
|
||||
#include "ParIterator.h"
|
||||
#include "TextClass.h"
|
||||
#include "TocBackend.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
@ -74,6 +75,18 @@ void InsetFoot::updateLabels(Buffer const & buf, ParIterator const & it)
|
||||
}
|
||||
|
||||
|
||||
void InsetFoot::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
|
||||
Toc & toc = toclist["footnote"];
|
||||
// FIXME: we probably want the footnote number too.
|
||||
docstring str;
|
||||
str = getNewLabel(str);
|
||||
toc.push_back(TocItem(pit, 0, str));
|
||||
}
|
||||
|
||||
|
||||
int InsetFoot::latex(Buffer const & buf, odocstream & os,
|
||||
OutputParams const & runparams_in) const
|
||||
{
|
||||
|
@ -42,6 +42,8 @@ public:
|
||||
virtual docstring const editMessage() const;
|
||||
/// Update the counters of this inset and of its contents
|
||||
void updateLabels(Buffer const &, ParIterator const &);
|
||||
///
|
||||
void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
|
||||
|
||||
protected:
|
||||
InsetFoot(InsetFoot const &);
|
||||
|
@ -30,7 +30,9 @@
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
#include "ParIterator.h"
|
||||
#include "TextClass.h"
|
||||
#include "TocBackend.h"
|
||||
|
||||
#include "support/docstream.h"
|
||||
#include "support/Translator.h"
|
||||
@ -218,6 +220,18 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it)
|
||||
}
|
||||
|
||||
|
||||
void InsetNote::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
|
||||
Toc & toc = toclist["note"];
|
||||
// FIXME: we probably want the note type too.
|
||||
docstring str;
|
||||
str = getNewLabel(str);
|
||||
toc.push_back(TocItem(pit, 0, str));
|
||||
}
|
||||
|
||||
|
||||
bool InsetNote::isMacroScope(Buffer const & buf) const
|
||||
{
|
||||
// LyX note has no latex output
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
|
||||
// Update the counters of this inset and of its contents
|
||||
virtual void updateLabels(Buffer const &, ParIterator const &);
|
||||
///
|
||||
void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
|
||||
protected:
|
||||
InsetNote(InsetNote const &);
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user