return qt_("List of Citations");
if (type == "label")
return qt_("Labels and References");
+ if (type == "branch")
+ return qt_("List of Branches");
FloatList const & floats = bp.documentClass().floats();
if (floats.typeExist(type))
#include "Lexer.h"
#include "OutputParams.h"
#include "TextClass.h"
+#include "TocBackend.h"
#include "support/debug.h"
#include "support/gettext.h"
}
+void InsetBranch::addToToc(DocIterator const & cpit)
+{
+ DocIterator pit = cpit;
+ pit.push_back(CursorSlice(*this));
+
+ Toc & toc = buffer().tocBackend().toc("branch");
+ docstring const str = params_.branch + ": " + text_.getPar(0).asString();
+ toc.push_back(TocItem(pit, 0, str));
+}
+
+
void InsetBranchParams::write(ostream & os) const
{
os << "Branch " << to_utf8(branch) << '\n';
///
void validate(LaTeXFeatures &) const;
///
+ void addToToc(DocIterator const &);
+ ///
InsetBranchParams const & params() const { return params_; }
///
void setParams(InsetBranchParams const & params) { params_ = params; }