DocBook: bug fixes for JASA.

Includes more consistent behaviour for bibliographies in appendix (do the same as LyX shows the user, i.e. bibliography in appendix).
This commit is contained in:
Thibaut Cuvelier 2020-11-27 05:53:46 +01:00
parent eea884aba2
commit bd9dce3749
3 changed files with 9 additions and 4 deletions

View File

@ -504,8 +504,6 @@ export/templates/Articles/R_Journal_docbook5
export/templates/Articles/REVTeX_%28V._4.1%29_docbook5
# - Address at the end of the document (only allowed in abstract).
export/templates/Articles/Kluwer_docbook5
# - Broken references, empty figures.
export/templates/Articles/Journal_of_the_Acoustical_Society_of_America_%28JASA%29_docbook5
# - Broken references, empty figures, misplaced acknowledgements (template not viable for DocBook).
export/templates/Articles/International_Union_of_Crystallography_%28IUCr%29_docbook5
# - Biographies after bibliography: DocBook does not allow content after a bibliography.
@ -513,6 +511,7 @@ export/templates/Articles/Mathematical_Monthly_docbook5
# - Empty figure, very custom table caption (maybe fixable?), strange appendices (not in ToC).
export/templates/Articles/Int._Journal_of_Modern_Physics_(C|D)_docbook5
# - Broken references.
export/templates/Articles/Journal_of_the_Acoustical_Society_of_America_%28JASA%29_docbook5
export/templates/Articles/Astronomy_%26_Astrophysics_docbook5
Sublabel: docbook poster

View File

@ -227,7 +227,7 @@ Style Abstract
Series Bold
Size Large
EndFont
DocBookTag NONE
DocBookTag para
DocBookAbstract true
End
@ -297,6 +297,7 @@ Style Acknowledgments
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
DocBookAbstract false
End

View File

@ -1161,11 +1161,16 @@ void docbookParagraphs(Text const &text,
Inset const *firstInset = par->getInset(0);
if (firstInset && (firstInset->lyxCode() == BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
while (!headerLevels.empty()) {
// Don't close appendices before bibliographies.
if (headerLevels.top().second == "appendix")
break;
// Pop the section from the stack.
int level = headerLevels.top().first;
docstring tag = from_utf8("</" + headerLevels.top().second + ">");
headerLevels.pop();
// Output the tag only if it corresponds to a legit section.
// Output the tag only if it corresponds to a legit section, as the rest of the code.
if (level != Layout::NOT_IN_TOC) {
xs << XMLStream::ESCAPE_NONE << tag;
xs << xml::CR();