label = _("List of Foot notes");
else if (cit->first == "label")
label = _("Labels and References");
+ else if (cit->first == "citation")
+ label = _("List of Citations");
// this should not happen now, but if something else like
// listings is added later, this can avoid an empty menu name.
else
return _("List of Marginal notes");
if (type == "note")
return _("List of Notes");
+ if (type == "citation")
+ return _("List of Citations");
if (type == "label")
return _("Labels and References");
#include "Buffer.h"
#include "BufferParams.h"
#include "DispatchResult.h"
-#include "support/gettext.h"
#include "EmbeddedFiles.h"
#include "FuncRequest.h"
#include "LaTeXFeatures.h"
+#include "ParIterator.h"
+#include "TocBackend.h"
#include "support/debug.h"
#include "support/docstream.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
#include <algorithm>
docstring InsetCitation::screenLabel() const
+{
+ return cache.screen_label;
+}
+
+
+void InsetCitation::updateLabels(ParIterator const &)
{
biblio::CiteEngine const engine = buffer().params().getEngine();
if (cache.params == params() && cache.engine == engine)
- return cache.screen_label;
+ return;
// The label has changed, so we have to re-create it.
docstring const glabel = generateLabel();
cache.params = params();
cache.generated_label = glabel;
cache.screen_label = label;
+}
- return label;
+
+void InsetCitation::addToToc(ParConstIterator const & cpit) const
+{
+ Toc & toc = buffer().tocBackend().toc("citation");
+ toc.push_back(TocItem(cpit, 0, cache.screen_label));
}
void textString(odocstream &) const;
///
void validate(LaTeXFeatures &) const;
+ ///
+ void updateLabels(ParIterator const & it);
+ ///
+ void addToToc(ParConstIterator const &) const;
+
///
static ParamInfo const & findInfo(std::string const &);
//FIXME This is the locus of the design problem we have.