mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
DocBook: fix bibliographies (end of <bibliography> and sections).
This commit is contained in:
parent
642b18aad0
commit
ec0f4885a7
@ -5,11 +5,10 @@
|
||||
<title>William Shakespeare</title>
|
||||
<section>
|
||||
<title>Publications</title>
|
||||
</section>
|
||||
<bibliography>
|
||||
<bibliomixed xml:id='first'>First Folio. </bibliomixed>
|
||||
<bibliomixed xml:id='second'>Second Folio. </bibliomixed>
|
||||
<bibliomixed xml:id='third'>Third Folio. </bibliomixed>
|
||||
</bibliography>
|
||||
</section>
|
||||
|
||||
</article>
|
@ -393,12 +393,9 @@ void makeBibliography(
|
||||
|
||||
// If this is the last paragraph in a bibliography, close the bibliography tag.
|
||||
auto const end = text.paragraphs().end();
|
||||
bool endBibliography = par == end;
|
||||
if (!endBibliography) {
|
||||
auto nextpar = par;
|
||||
++nextpar;
|
||||
endBibliography = par->layout().latextype != LATEX_BIB_ENVIRONMENT;
|
||||
}
|
||||
auto nextpar = par;
|
||||
++nextpar;
|
||||
bool endBibliography = nextpar == end || nextpar->layout().latextype != LATEX_BIB_ENVIRONMENT;
|
||||
|
||||
if (endBibliography) {
|
||||
xs << xml::EndTag("bibliography");
|
||||
@ -1124,7 +1121,7 @@ void docbookParagraphs(Text const &text,
|
||||
auto insetsLength = distance(par->insetList().begin(), par->insetList().end());
|
||||
if (insetsLength > 0) {
|
||||
Inset const *firstInset = par->getInset(0);
|
||||
if (firstInset && dynamic_cast<InsetBibtex const *>(firstInset)) {
|
||||
if (firstInset && (firstInset->lyxCode() == BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
|
||||
while (!headerLevels.empty()) {
|
||||
int level = headerLevels.top().first;
|
||||
docstring tag = from_utf8("</" + headerLevels.top().second + ">");
|
||||
|
Loading…
Reference in New Issue
Block a user