Toc & toc = buffer().tocBackend().toc(floattype_);
docstring str = full_label_;
- text().forToc(str, TOC_ENTRY_LENGTH);
+ 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.
if (first_arg == "changetype") {
string const type = cmd.getArg(1);
status.setOnOff(type == type_);
- bool varia = true;
+ bool varia = type != "LongTableNoNumber";
// check if the immediate parent inset allows caption variation
if (cur.depth() > 1) {
- if (&cur[cur.depth() - 2].inset()
- && !cur[cur.depth() - 2].inset().allowsCaptionVariation())
- varia = false;
+ if (&cur[cur.depth() - 2].inset())
+ varia = cur[cur.depth() - 2].inset().allowsCaptionVariation(type);
}
status.setEnabled(varia
&& buffer().params().documentClass().hasInsetLayout(