Add Nomenclature to the TOC.

This commit is contained in:
Richard Heck 2013-03-27 18:40:08 -04:00
parent 79f428d201
commit 410c716bf7
3 changed files with 12 additions and 0 deletions

View File

@ -582,6 +582,8 @@ QString guiName(string const & type, BufferParams const & bp)
return qt_("List of Index Entries");
if (type == "marginalnote")
return qt_("List of Marginal notes");
if (type == "nomencl")
return qt_("Nomenclature Entries");
if (type == "note")
return qt_("List of Notes");
if (type == "citation")

View File

@ -30,6 +30,7 @@
#include "OutputParams.h"
#include "output_xhtml.h"
#include "sgml.h"
#include "TocBackend.h"
#include "frontends/FontMetrics.h"
@ -130,6 +131,13 @@ void InsetNomencl::validate(LaTeXFeatures & features) const
}
void InsetNomencl::addToToc(DocIterator const & cpit, bool output_active) const
{
docstring const str = getParam("symbol");
buffer().tocBackend().toc("nomencl").push_back(TocItem(cpit, 0, str, output_active));
}
/////////////////////////////////////////////////////////////////////
//
// InsetPrintNomencl

View File

@ -40,6 +40,8 @@ public:
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;
///
void addToToc(DocIterator const & di, bool output_active) const;
///
InsetCode lyxCode() const { return NOMENCL_CODE; }
///
int docbook(odocstream &, OutputParams const &) const;