return;
// caption handling
- // the caption must be output before the headers
+ // output caption which is in no header or footer
if (haveLTCaption()) {
for (row_type r = 0; r < nrows(); ++r) {
- if (row_info[r].caption)
+ if (row_info[r].caption &&
+ !row_info[r].endfirsthead && !row_info[r].endhead &&
+ !row_info[r].endfoot && !row_info[r].endlastfoot)
TeXRow(os, r, runparams);
}
}
}
+void InsetTableCell::addToToc(DocIterator const & di, bool output_active) const
+{
+ InsetText::iterateForToc(di, output_active);
+}
+
+
docstring InsetTableCell::xhtml(XHTMLStream & xs, OutputParams const & rp) const
{
if (!isFixedWidth)
// In a longtable, tell captions what the current float is
Counters & cnts = buffer().masterBuffer()->params().documentClass().counters();
string const saveflt = cnts.current_float();
- if (tabular.is_long_tabular)
+ if (tabular.is_long_tabular) {
cnts.current_float("table");
+ // in longtables, we only step the counter once
+ cnts.step(from_ascii("table"), utype);
+ cnts.isLongtable(true);
+ }
ParIterator it2 = it;
it2.forwardPos();
buffer().updateBuffer(it2, utype);
//reset afterwards
- if (tabular.is_long_tabular)
+ if (tabular.is_long_tabular) {
cnts.current_float(saveflt);
+ cnts.isLongtable(false);
+ }
}
break;
case Tabular::UNSET_LTFIRSTHEAD:
- status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
+ status.setEnabled(sel_row_start == sel_row_end);
status.setOnOff(!tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
break;
break;
case Tabular::UNSET_LTHEAD:
- status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
+ status.setEnabled(sel_row_start == sel_row_end);
status.setOnOff(!tabular.getRowOfLTHead(sel_row_start, dummyltt));
break;
break;
case Tabular::UNSET_LTFOOT:
- status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
+ status.setEnabled(sel_row_start == sel_row_end);
status.setOnOff(!tabular.getRowOfLTFoot(sel_row_start, dummyltt));
break;
break;
case Tabular::UNSET_LTLASTFOOT:
- status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
+ status.setEnabled(sel_row_start == sel_row_end);
status.setOnOff(!tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
break;