DocBook: don't consider sectioning items that shouldn't be in TOC for anything section-related.

This commit is contained in:
Thibaut Cuvelier 2020-10-22 05:24:55 +02:00
parent 149e1ccc02
commit b816cb0f3c

View File

@ -718,7 +718,11 @@ void makeCommand(
bool isLayoutSectioning(Layout const & lay)
{
return lay.docbooksection() || lay.category() == from_utf8("Sectioning");
if (lay.docbooksection()) // Special case: some DocBook styles must be handled as sections.
return true;
else if (lay.category() == from_utf8("Sectioning")) // Generic case.
return lay.toclevel != Layout::NOT_IN_TOC;
return false;
}