void InsetCitation::addToToc(DocIterator const & cpit) const { // NOTE // XHTML output uses the TOC to collect the citations // from the document. So if this gets changed, then we // will need to change how the citations are collected. docstring const tocitem = getParam("key"); Toc & toc = buffer().tocBackend().toc("citation"); toc.push_back(TocItem(cpit, 0, tocitem)); }
void InsetCitation::addToToc(DocIterator const & cpit, bool output_active) const { // NOTE // BiblioInfo::collectCitedEntries() uses the TOC to collect the citations // from the document. It is used indirectly, via BiblioInfo::makeCitationLables, // by both XHTML and plaintext output. So, if we change what goes into the TOC, // then we will also need to change that routine. docstring const tocitem = getParam("key"); Toc & toc = buffer().tocBackend().toc("citation"); toc.push_back(TocItem(cpit, 0, tocitem, output_active)); }
void InsetRef::addToToc(DocIterator const & cpit, bool output_active) const { docstring const & label = getParam("reference"); if (buffer().insetLabel(label)) // This InsetRef has already been taken care of in InsetLabel::addToToc(). return; // It seems that this reference does not point to any valid label. screen_label_ = _("BROKEN: ") + screen_label_; Toc & toc = buffer().tocBackend().toc("label"); toc.push_back(TocItem(cpit, 0, screen_label_, output_active)); }
void InsetCaption::addToToc(DocIterator const & cpit, bool output_active) const { if (floattype_.empty()) return; DocIterator pit = cpit; pit.push_back(CursorSlice(const_cast<InsetCaption &>(*this))); Toc & toc = buffer().tocBackend().toc(floattype_); docstring str = full_label_; int length = output_active ? INT_MAX : TOC_ENTRY_LENGTH; text().forToc(str, length); toc.push_back(TocItem(pit, 0, str, output_active)); // Proceed with the rest of the inset. InsetText::addToToc(cpit, output_active); }