DocBook: bug fixing with wrapper merging.

This commit is contained in:
Thibaut Cuvelier 2020-08-30 03:30:56 +02:00
parent 7ec0307b13
commit 976bd91fc2
2 changed files with 18 additions and 19 deletions

View File

@ -40,16 +40,15 @@
<affiliation role="alternate">
<orgname>Patron, Alonso's Bar and Grill</orgname>
</affiliation>
<keyword>
clusters: globular, peanut—bosons: bozos
</keyword>
<!-- Output Error: Tried to close `keywordset' when tag was not open. Tag discarded. -->
</author>
<keywordset>
<keyword>clusters: globular, peanut—bosons: bozos</keyword>
</keywordset>
<abstract>
<para>This is a preliminary report on surface photometry of the major fraction of known globular clusters, to see which of them show the signs of a collapsed core. We also explore some diversionary mathematics and recreational tables. </para>
</abstract>
<!-- Output Error: Closing tag `info' when other tags are open, namely: -->
<!-- Output Error: author -->
</author></info>
</info>
<section>
<title>Introduction</title>
<para>A focal problem today in the dynamics of globular clusters is core collapse. It has been predicted by theory for decades <biblioref endterm="hen61" />, <biblioref endterm="lyn68" />, <biblioref endterm="spi85" />, but observation has been less alert to the phenomenon. For many years the central brightness peak in M15 <biblioref endterm="kin75" />, <biblioref endterm="new78" /> seemed a unique anomaly. Then <biblioref endterm="aur82" /> suggested a central peak in NGC 6397, and a limited photographic survey of ours <biblioref endterm="djo84" /> found three more cases, including NGC 6624, whose sharp center had often been remarked on <biblioref endterm="can78" />. </para>
@ -1005,11 +1004,8 @@ v(p,\lambda)_{\pm} &amp; = &amp; \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
</inlineequation> of the electronically submitted abstracts for AAS meetings are error-free. </para>
<acknowledgements>
<para>We are grateful to V. Barger, T. Han, and R. J. N. Phillips for doing the math in section&#xA0;<xref linkend="bozomath" />. More information on the AASTeX macros package are available at <link xlink:href="http://www.aas.org/publications/aastex">http://www.aas.org/publications/aastex</link> or the <link xlink:href="ftp://www.aas.org/pubs/AAS ftp site">AAS ftp site</link>.</para>
<application>
IRAF, AIPS, Astropy, ...
</application>
<!-- Output Error: Tried to close `para' when tag was not open. Tag discarded. -->
</acknowledgements>
<remark role='software'>IRAF, AIPS, Astropy, ...</remark>
</section>
<bibliography>
<bibliomixed xml:id='aur82'>Aurière, M. 1982, <!-- \aap -->

View File

@ -274,8 +274,10 @@ void openParTag(XMLStream & xs, const Paragraph * par, const Paragraph * prevpar
if (prevpar != nullptr) {
Layout const & prevlay = prevpar->layout();
if (prevlay.docbookwrappertag() != "NONE") {
openWrapper = prevlay.docbookwrappertag() == lay.docbookwrappertag()
&& !lay.docbookwrappermergewithprevious();
if (prevlay.docbookwrappertag() == lay.docbookwrappertag())
openWrapper = !lay.docbookwrappermergewithprevious();
else
openWrapper = true;
}
}
@ -308,8 +310,10 @@ void closeParTag(XMLStream & xs, Paragraph const * par, Paragraph const * nextpa
if (nextpar != nullptr) {
Layout const & nextlay = nextpar->layout();
if (nextlay.docbookwrappertag() != "NONE") {
closeWrapper = nextlay.docbookwrappertag() == lay.docbookwrappertag()
&& !nextlay.docbookwrappermergewithprevious();
if (nextlay.docbookwrappertag() == lay.docbookwrappertag())
closeWrapper = !nextlay.docbookwrappermergewithprevious();
else
closeWrapper = true;
}
}
@ -948,8 +952,7 @@ void outputDocBookInfo(
// that mandating a wrapper like <info> would repel users. Thus, generate them first.
makeAny(text, buf, xs, runparams, paragraphs.iterator_at(pit));
for (auto pit : info.mustBeInInfo)
if (info.abstract.find(pit) == info.abstract.end()) // The abstract must be in info, but is dealt with after.
makeAny(text, buf, xs, runparams, paragraphs.iterator_at(pit));
makeAny(text, buf, xs, runparams, paragraphs.iterator_at(pit));
// Always output the abstract as the last item of the <info>, as it requires special treatment (especially if
// it contains several paragraphs that are empty).