[LyX/master] DocBook: fix appendices.
Thibaut Cuvelier
tcuvelier at lyx.org
Fri Nov 27 01:20:20 UTC 2020
commit 6201158e5d02e441debda9f55f10d41ef9c8e433
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Fri Nov 27 02:50:03 2020 +0100
DocBook: fix appendices.
---
src/output_docbook.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index 0deed24..214c2a8 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -1101,7 +1101,7 @@ void docbookParagraphs(Text const &text,
Layout const &style = par->layout();
// Think about adding <section> and/or </section>s.
- if (isLayoutSectioning(style)) {
+ if (isLayoutSectioning(style) || par->params().startOfAppendix()) {
int level = style.toclevel;
// Need to close a previous section if it has the same level or a higher one (close <section> if opening a
@@ -1122,8 +1122,7 @@ void docbookParagraphs(Text const &text,
}
// Open the new section: first push it onto the stack, then output it in DocBook.
- string sectionTag = (currentlyInAppendix && style.docbooksectiontag() == "chapter") ?
- "appendix" : style.docbooksectiontag();
+ string sectionTag = (par->params().startOfAppendix()) ? "appendix" : style.docbooksectiontag();
headerLevels.push(std::make_pair(level, sectionTag));
// Some sectioning-like elements should not be output (such as FrontMatter).
More information about the lyx-cvs
mailing list