if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel) {
// insert this into the table of contents
docstring tocstring;
+ int const length = output_active ? INT_MAX : TOC_ENTRY_LENGTH;
if (arginset) {
tocstring = par.labelString();
if (!tocstring.empty())
tocstring += ' ';
- arginset->text().forToc(tocstring, TOC_ENTRY_LENGTH);
+ arginset->text().forToc(tocstring, length);
} else
- par.forToc(tocstring, TOC_ENTRY_LENGTH);
+ par.forToc(tocstring, length);
dit.pos() = 0;
toc.push_back(TocItem(dit, toclevel - min_toclevel,
tocstring, output_active, tocstring));