// setting as longtable is not allowed when table is inside a float
bool const is_tabular_star = !tabularWidthED->text().isEmpty();
- longTabularCB->setEnabled(!is_tabular_star && funcEnabled(Tabular::SET_LONGTABULAR));
+ longTabularCB->setEnabled(funcEnabled(Tabular::SET_LONGTABULAR));
bool const longtabular = longTabularCB->isChecked();
longtableGB->setEnabled(true);
newpageCB->setEnabled(longtabular);
<< write_attribute("lastFootBottomDL", endlastfoot.bottomDL)
<< write_attribute("lastFootEmpty", endlastfoot.empty);
// longtables cannot be aligned vertically
- if (!is_long_tabular) {
+ if (!is_long_tabular)
os << write_attribute("tabularvalignment", tabular_valignment);
- os << write_attribute("tabularwidth", tabular_width);
- }
+ os << write_attribute("tabularwidth", tabular_width);
if (is_long_tabular)
os << write_attribute("longtabularalignment", longtabular_alignment);
os << ">\n";
void Tabular::latex(otexstream & os, OutputParams const & runparams) const
{
bool const is_tabular_star = !tabular_width.zero() && !hasVarwidthColumn();
+ bool const is_xltabular = is_long_tabular
+ && (hasVarwidthColumn() || !tabular_width.zero());
TexRow::RowEntry pos = TexRow::textEntry(runparams.lastid, runparams.lastpos);
//+---------------------------------------------------------------------
}
if (is_long_tabular) {
- if (hasVarwidthColumn())
+ if (is_xltabular)
os << "\\begin{xltabular}";
else
os << "\\begin{longtable}";
os << "[r]";
break;
}
- if (hasVarwidthColumn()) {
+ if (is_xltabular) {
if (tabular_width.zero())
os << "{" << from_ascii("\\columnwidth") << "}";
else
//+---------------------------------------------------------------------
if (is_long_tabular) {
- if (hasVarwidthColumn())
+ if (is_xltabular)
os << "\\end{xltabular}";
else
os << "\\end{longtable}";
features.require("NeedTabularnewline");
if (use_booktabs)
features.require("booktabs");
- if (is_long_tabular && !hasVarwidthColumn())
- features.require("longtable");
+ if (is_long_tabular && !hasVarwidthColumn()) {
+ if (tabular_width.zero())
+ features.require("longtable");
+ else
+ features.require("xltabular");
+ }
if (rotate && is_long_tabular)
features.require("lscape");
if (needRotating())