[LyX features/feature/docbook] DocBook: bug fixing with wrapper merging.

Thibaut Cuvelier tcuvelier at lyx.org
Sun Aug 30 01:05:19 UTC 2020


The branch, feature/docbook, has been updated.

- Log -----------------------------------------------------------------

commit 61a0883ed6e24ea051db13fd459375c3fceca2cc
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Aug 30 03:30:56 2020 +0200

    DocBook: bug fixing with wrapper merging.

diff --git a/autotests/export/docbook/bibliography_precooked_aastex.xml b/autotests/export/docbook/bibliography_precooked_aastex.xml
index 70b19af..2ab4a79 100644
--- a/autotests/export/docbook/bibliography_precooked_aastex.xml
+++ b/autotests/export/docbook/bibliography_precooked_aastex.xml
@@ -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} & = & \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 -->
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index 5ee906f..21c25e2 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -272,8 +272,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;
 		}
 	}
 
@@ -306,8 +308,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;
 		}
 	}
 
@@ -946,8 +950,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).

commit cc4667b87051cb88ef571dcbe7c6dccec715284e
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Aug 30 03:08:55 2020 +0200

    DocBook: bug fixing in AASTeX layout.
    
    That's mostly generating DocBook tags at an inappropriate place with some metadata, rather than outputting whatever you have at your disposal. Far from satisfying, but good enough for a generic tool (see details in the new TODO). Doesn't trigger assertions. Is valid XML.

diff --git a/autotests/export/docbook/bibliography_precooked_aastex.xml b/autotests/export/docbook/bibliography_precooked_aastex.xml
index 71fe700..70b19af 100644
--- a/autotests/export/docbook/bibliography_precooked_aastex.xml
+++ b/autotests/export/docbook/bibliography_precooked_aastex.xml
@@ -382,9 +382,7 @@ clusters: globular, peanut—bosons: bozos
  </m:mrow>
  </m:math>
 </inlineequation> may be formed from particle four-momenta, gauge-boson polarization vectors or fermion strings with an uncontracted Lorentz index associated with final-state fermions.</para>
-<NoteToEditor>
-Figures 1 and 2 should appear side-by-side in print
-</NoteToEditor>
+<remark role='to-editor'>Figures 1 and 2 should appear side-by-side in print</remark>
 <para>In the chiral representation the <inlineequation>
 <alt role='tex'>\gamma</alt>
  <m:math>
@@ -634,7 +632,6 @@ Figures 1 and 2 should appear side-by-side in print
  </m:mrow>
  </m:math>
 </inlineequation> by </para>
-<MathLetters>
 <informalequation>
 <alt role='tex'>u(p,\lambda)_{\pm} & = & (E\pm\lambda|{\textbf{p}}|)^{1/2}\chi_{\lambda}(p),\\
 v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi_{-\lambda}(p)
@@ -724,9 +721,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
   </m:mtr>
  </m:mtable>
  </m:math>
-</informalequation>
-</MathLetters>
-</section>
+</informalequation></section>
 </section>
 <section>
 <title>Floating material and so forth</title>
@@ -1008,7 +1003,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation> of the electronically submitted abstracts for AAS meetings are error-free. </para>
-<acknowledgement>
+<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, ...
@@ -1139,7 +1134,7 @@ IRAF, AIPS, Astropy, ...
  <m:mrow><m:mi>P</m:mi>
  </m:mrow>
  </m:math>
-</inlineequation>a</td>
+</inlineequation><remark role='tablenotemark'>a</remark></td>
 <td align='right' valign='top'> <inlineequation>
 <alt role='tex'>PR_{maj}</alt>
  <m:math>
@@ -1183,7 +1178,7 @@ IRAF, AIPS, Astropy, ...
  <m:mrow><m:mo>&#x398;</m:mo>
  </m:mrow>
  </m:math>
-</inlineequation>b</td>
+</inlineequation><remark role='tablenotemark'>b</remark></td>
 <td align='center' valign='top'>Ref.</td>
 </tr>
 <tr>
@@ -1235,7 +1230,7 @@ IRAF, AIPS, Astropy, ...
 <tr>
 <td align='center' valign='top'> 4 </td>
 <td align='right' valign='top'>32733.8 </td>
-<td align='right' valign='top'>-1.2c</td>
+<td align='right' valign='top'>-1.2<remark role='tablenotemark'>c</remark></td>
 <td align='right' valign='top'>-0.5 </td>
 <td align='right' valign='top'>41 </td>
 <td align='right' valign='top'>54.8 </td>
@@ -1254,7 +1249,7 @@ IRAF, AIPS, Astropy, ...
 <td align='right' valign='top'>-0.4 </td>
 <td align='right' valign='top'>60 </td>
 <td align='right' valign='top'>1.4 </td>
-<td align='right' valign='top'>1.669c</td>
+<td align='right' valign='top'>1.669<remark role='tablenotemark'>c</remark></td>
 <td align='right' valign='top'>1.574 </td>
 <td align='right' valign='top'>2.343 </td>
 <td align='right' valign='top'>8.0 </td>
@@ -1279,23 +1274,13 @@ IRAF, AIPS, Astropy, ...
 </tr>
 </tbody>
 
-<Table note>
-a<!-- }{ -->
-Sample footnote for table&#xA0;<xref linkend="tbl-2" /> that was generated with the LaTeX table environment
-</Table note>
-<Table note>
-b<!-- }{ -->
-Yet another sample footnote for table&#xA0;<xref linkend="tbl-2" />
-</Table note>
-<Table note>
-c<!-- }{ -->
-Another sample footnote for table&#xA0;<xref linkend="tbl-2" />
-</Table note>
-<TableComments>
-We can also attach a long-ish paragraph of explanatory material to a table. Use \tablerefs to append a list of references. The following references were from a different table: I've patched them in here to show how they look, but don't take them too seriously—I certainly have not.
-</TableComments>
-<TableRefs>
-(1) Barbuy, Spite, & Spite 1985; (2) Bond 1980; (3) Carbon et al. 1987; (4) Hobbs & Duncan 1987; (5) Gilroy et al. 1988: (6) Gratton & Ortolani 1986; (7) Gratton & Sneden 1987; (8) Gratton & Sneden (1988); (9) Gratton & Sneden 1991; (10) Kraft et al. 1982; (11) LCL, or Laird, 1990; (12) Leep & Wallerstein 1981; (13) Luck & Bond 1981; (14) Luck & Bond 1985; (15) Magain 1987; (16) Magain 1989; (17) Peterson 1981; (18) Peterson, Kurucz, & Carney 1990; (19) RMB; (20) Schuster & Nissen 1988; (21) Schuster & Nissen 1989b; (22) Spite et al. 1984; (23) Spite & Spite 1986; (24) Hobbs & Thorburn 1991; (25) Hobbs et al. 1991; (26) Olsen 1983.
-</TableRefs>
+<remark role='tablenote'>a<!-- }{ -->
+Sample footnote for table&#xA0;<xref linkend="tbl-2" /> that was generated with the LaTeX table environment</remark>
+<remark role='tablenote'>b<!-- }{ -->
+Yet another sample footnote for table&#xA0;<xref linkend="tbl-2" /></remark>
+<remark role='tablenote'>c<!-- }{ -->
+Another sample footnote for table&#xA0;<xref linkend="tbl-2" /></remark>
+<remark role='tablecomments'>We can also attach a long-ish paragraph of explanatory material to a table. Use \tablerefs to append a list of references. The following references were from a different table: I've patched them in here to show how they look, but don't take them too seriously—I certainly have not.</remark>
+<remark role='tablerefs'>(1) Barbuy, Spite, & Spite 1985; (2) Bond 1980; (3) Carbon et al. 1987; (4) Hobbs & Duncan 1987; (5) Gilroy et al. 1988: (6) Gratton & Ortolani 1986; (7) Gratton & Sneden 1987; (8) Gratton & Sneden (1988); (9) Gratton & Sneden 1991; (10) Kraft et al. 1982; (11) LCL, or Laird, 1990; (12) Leep & Wallerstein 1981; (13) Luck & Bond 1981; (14) Luck & Bond 1985; (15) Magain 1987; (16) Magain 1989; (17) Peterson 1981; (18) Peterson, Kurucz, & Carney 1990; (19) RMB; (20) Schuster & Nissen 1988; (21) Schuster & Nissen 1989b; (22) Spite et al. 1984; (23) Spite & Spite 1986; (24) Hobbs & Thorburn 1991; (25) Hobbs et al. 1991; (26) Olsen 1983.</remark>
 </table>
 </article>
\ No newline at end of file
diff --git a/development/DocBookToDo b/development/DocBookToDo
new file mode 100644
index 0000000..39ca534
--- /dev/null
+++ b/development/DocBookToDo
@@ -0,0 +1,20 @@
+Things specific to layouts
+==========================
+
+AASTeX
+------
+
+No support for table notes. They could be implemented through <footnoteref>, but it becomes a nightmare to ensure xml:id uniqueness (the only ID available here is in the inset; mix it with the table ID?). Anyway, it would require a lot of specific code to make it work, probably not worth the effort right now. 
+
+	Related parts of the layout: 
+		Style "Table note"
+		InsetLayout "Flex:tablenotemark"
+	Alreayd used in the following test: 
+		bibliography_precooked_aastex.lyx
+		
+Notion of MathLetters: a group of equations. No good mapping in DocBook, maybe an informalgroup? To discuss with DocBook TC. 
+TableRefs, TableComments: no mapping in DocBook, not really a way to add these things. To discuss with DocBook TC. 
+
+Clearly, with this kind of template, we're reaching the limits of such a system! Having a really good converter for all these cases would require a lot of very specific code. 
+
+More general: what the heck with appendices? It's not handled in the LyX way (Document > Start Appendix Here), but in a custom way. Making this work would solve some correctness issues with this template. 
\ No newline at end of file
diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index d79cd02..78089a4 100644
--- a/lib/layouts/aastex.layout
+++ b/lib/layouts/aastex.layout
@@ -285,6 +285,11 @@ Style Abstract
 	  Series	Bold
 	  Size		Normal
 	EndFont
+	DocBookAbstract       true
+	DocBookInInfo         always
+	DocBookWrapperTag     abstract
+	DocBookWrapperMergeWithPrevious    true
+	DocBookTag            para
 End
 
 
@@ -335,6 +340,7 @@ Style Keywords
 	  Size		Normal
 	EndFont
 	DocBookTag          keyword
+	DocBookTagType      paragraph
 	DocBookWrapperTag   keywordset
 	DocBookInInfo       always
 End
@@ -359,7 +365,7 @@ Style Acknowledgements
 	  Shape		Italic
 	EndFont
 	DocBookTag            para
-	DocBookWrapperTag     acknowledgement
+	DocBookWrapperTag     acknowledgements
 End
 
 
@@ -432,6 +438,7 @@ Style MathLetters
 	Font
 	  Size		Normal
 	EndFont
+	DocBookTag  NONE
 End
 
 
@@ -495,6 +502,9 @@ Style NoteToEditor
 	  Size		Normal
 	  Shape		Italic
 	EndFont
+	DocBookTag      remark
+	DocBookTagType  paragraph
+	DocBookAttr     role='to-editor'
 End
 
 
@@ -515,6 +525,9 @@ Style TableRefs
 	  Family	Roman
 	  Size		Normal
 	EndFont
+	DocBookTag      remark
+	DocBookTagType  paragraph
+	DocBookAttr     role='tablerefs'
 End
 
 
@@ -535,6 +548,9 @@ Style TableComments
 	  Family	Roman
 	  Size		Normal
 	EndFont
+	DocBookTag      remark
+	DocBookTagType  paragraph
+	DocBookAttr     role='tablecomments'
 End
 
 
@@ -550,6 +566,9 @@ Style "Table note"
 	LabelFont
 	  Color		magenta
 	EndFont
+	DocBookTag      remark
+	DocBookTagType  paragraph
+	DocBookAttr     role='tablenote'
 End
 
 
@@ -572,6 +591,9 @@ InsetLayout "Flex:tablenotemark"
 	  Color		magenta
 	  Size		Small
 	EndFont
+	DocBookTag      remark
+	DocBookTagType  paragraph
+	DocBookAttr     role='tablenotemark'
 End
 
 
diff --git a/lib/layouts/aastex6.layout b/lib/layouts/aastex6.layout
index 03d585e..6935365 100644
--- a/lib/layouts/aastex6.layout
+++ b/lib/layouts/aastex6.layout
@@ -67,8 +67,11 @@ Style Software
 	LabelFont
 	  Shape		Italic
 	EndFont
-	DocBookWrapperTag   para
-	DocBookTag          application
+	DocBookTag      remark
+	DocBookAttr     role='software'
+	# Override what's taken from Keywords, but not really wanted.
+	DocBookWrapperTag   NONE
+	DocBookInInfo       never
 End
 
 # other new commands are mainly for the user preamble
diff --git a/lib/layouts/aastex62.layout b/lib/layouts/aastex62.layout
index 3eb7dcc..1ef8636 100644
--- a/lib/layouts/aastex62.layout
+++ b/lib/layouts/aastex62.layout
@@ -78,8 +78,11 @@ Style Software
 	LabelFont
 		Shape           Italic
 	EndFont
-	DocBookWrapperTag   para
-	DocBookTag          application
+	DocBookTag      remark
+	DocBookAttr     role='software'
+	# Override what's taken from Keywords, but not really wanted.
+	DocBookWrapperTag   NONE
+	DocBookInInfo       never
 End
 
 # other new commands are mainly for the user preamble

commit c7452a539fa1ff5b7c9528e0cbb177e4aad2d1c4
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Aug 30 02:34:49 2020 +0200

    DocBook: adapt AASTeX for tag types (new-line behaviour).

diff --git a/autotests/export/docbook/bibliography_precooked_aastex.xml b/autotests/export/docbook/bibliography_precooked_aastex.xml
index fe77b72..71fe700 100644
--- a/autotests/export/docbook/bibliography_precooked_aastex.xml
+++ b/autotests/export/docbook/bibliography_precooked_aastex.xml
@@ -3,25 +3,53 @@
   See http://www.lyx.org/ for more information -->
 <article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
 <info>
-<!-- shouldBeInInfo --><title>Collapsed Cores in Globular Clusters,  Gauge-Boson Couplings, and AASTeX Examples</title>
-<!-- mustBeInInfo --><author><personname>S. Djorgovski and Ivan R. King</personname>
-<affiliation><orgname>Astronomy Department, University of California, Berkeley, CA 94720</orgname></affiliation>
-<affiliation role="alternate"><orgname>Visiting Astronomer Cerro Tololo Inter-American Observatory.CTIO is operated by AURA Inc. under contract to the National Science Foundation.</orgname></affiliation>
-<affiliation role="alternate"><orgname>Society of Fellows, Harvard University.</orgname></affiliation>
-<affiliation role="alternate"><orgname>present address: Center for Astrophysics60 Garden Street, Cambridge, MA 02138</orgname></affiliation></author>
-<author><personname>C. D. Biemesderfer</personname>
-<affiliation><orgname>National Optical Astronomy Observatories, Tucson, AZ 85719</orgname></affiliation>
-<affiliation role="alternate"><orgname>Visiting Programmer, Space Telescope Science Institute</orgname></affiliation>
-<affiliation role="alternate"><orgname>Patron, Alonso's Bar and Grill</orgname></affiliation>
-<email>aastex-help at aas.org</email></author>
-<author><personname>R. J. Hanisch</personname>
-<affiliation><orgname>Space Telescope Science Institute, Baltimore, MD 21218</orgname></affiliation>
-<affiliation role="alternate"><orgname>Patron, Alonso's Bar and Grill</orgname></affiliation></author>
-<keywordset><keyword>clusters: globular, peanut—bosons: bozos</keyword></keywordset>
-<!-- /info --><!-- abs --><abstract><para>
+<title>Collapsed Cores in Globular Clusters,  Gauge-Boson Couplings, and AASTeX Examples</title>
+<author>
+<personname>S. Djorgovski and Ivan R. King</personname>
+<affiliation>
+<orgname>Astronomy Department, University of California, Berkeley, CA 94720</orgname>
+</affiliation>
+<affiliation role="alternate">
+<orgname>Visiting Astronomer Cerro Tololo Inter-American Observatory.CTIO is operated by AURA Inc. under contract to the National Science Foundation.</orgname>
+</affiliation>
+<affiliation role="alternate">
+<orgname>Society of Fellows, Harvard University.</orgname>
+</affiliation>
+<affiliation role="alternate">
+<orgname>present address: Center for Astrophysics60 Garden Street, Cambridge, MA 02138</orgname>
+</affiliation>
+</author>
+<author>
+<personname>C. D. Biemesderfer</personname>
+<affiliation>
+<orgname>National Optical Astronomy Observatories, Tucson, AZ 85719</orgname>
+</affiliation>
+<affiliation role="alternate">
+<orgname>Visiting Programmer, Space Telescope Science Institute</orgname>
+</affiliation>
+<affiliation role="alternate">
+<orgname>Patron, Alonso's Bar and Grill</orgname>
+</affiliation>
+<email>aastex-help at aas.org</email>
+</author>
+<author>
+<personname>R. J. Hanisch</personname>
+<affiliation>
+<orgname>Space Telescope Science Institute, Baltimore, MD 21218</orgname>
+</affiliation>
+<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. -->
+
 <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>
-</para></abstract>
-<!-- 15 --><!-- /abs --></info>
+
+<!-- Output Error: Closing tag `info' when other tags are open, namely: -->
+<!-- Output Error: author -->
+</author></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>
@@ -107,7 +135,8 @@
 </section>
 <section>
 <title>Helicity Amplitudes</title>
-<para>It has been realized that helicity amplitudes provide a convenient means for Feynman diagram<footnote><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><para>Footnotes can be inserted like this.</para>
+<para>It has been realized that helicity amplitudes provide a convenient means for Feynman diagram<footnote>
+<para>Footnotes can be inserted like this.</para>
 </footnote> evaluations. These amplitude-level techniques are particularly convenient for calculations involving many Feynman diagrams, where the usual trace techniques for the amplitude squared becomes unwieldy. Our calculations use the helicity techniques developed by other authors <biblioref endterm="hag86" />; we briefly summarize below.</para>
 <section>
 <title>Formalism</title>
@@ -133,7 +162,8 @@
   </m:mrow>
  </m:mrow>
  </m:math>
-</inlineequation> collisions can be expressed in terms of fermion strings of the form <informalequation>
+</inlineequation> collisions can be expressed in terms of fermion strings of the form 
+<informalequation>
 <alt role='tex'>\bar{v}(p_{2},\sigma_{2})P_{-\tau}\hat{a}_{1}\hat{a}_{2}\cdots\hat{a}_{n}u(p_{1},\sigma_{1}),</alt>
  <m:math>
  
@@ -352,7 +382,9 @@
  </m:mrow>
  </m:math>
 </inlineequation> may be formed from particle four-momenta, gauge-boson polarization vectors or fermion strings with an uncontracted Lorentz index associated with final-state fermions.</para>
-<NoteToEditor>Figures 1 and 2 should appear side-by-side in print</NoteToEditor>
+<NoteToEditor>
+Figures 1 and 2 should appear side-by-side in print
+</NoteToEditor>
 <para>In the chiral representation the <inlineequation>
 <alt role='tex'>\gamma</alt>
  <m:math>
@@ -376,7 +408,8 @@
  <m:mrow><m:mi>&#x3C3;</m:mi>
  </m:mrow>
  </m:math>
-</inlineequation> and the unit matrix 1 as <informalequation>
+</inlineequation> and the unit matrix 1 as 
+<informalequation>
 <alt role='tex'>\gamma^{\mu} & = & \left(\begin{array}{cc}
 0 & \sigma_{+}^{\mu}\\
 \sigma_{-}^{\mu} & 0
@@ -486,7 +519,8 @@
   </m:mtr>
  </m:mtable>
  </m:math>
-</informalequation> giving <informalequation>
+</informalequation> giving 
+<informalequation>
 <alt role='tex'>\hat{a}=\left(\begin{array}{cc}
 0 & (\hat{a})_{+}\\
 (\hat{a})_{-} & 0
@@ -564,11 +598,13 @@
   </m:mrow>
  </m:mrow>
  </m:math>
-</informalequation> The spinors are expressed in terms of two-component Weyl spinors as <informalequation>
+</informalequation> The spinors are expressed in terms of two-component Weyl spinors as 
+<informalequation>
 <alt role='tex'>u=\left(\begin{array}{c}
 (u)_{-}\\
 (u)_{+}
-\end{array}\right),v={\textbf{(}}\vdag_{+}{\textbf{,}}\vdag_{-}{\textbf{)}}.</alt>MathML export failed. Please report this as a bug.
+\end{array}\right),v={\textbf{(}}\vdag_{+}{\textbf{,}}\vdag_{-}{\textbf{)}}.</alt>
+<mathphrase>MathML export failed. Please report this as a bug.</mathphrase>
 </informalequation></para>
 <para>The Weyl spinors are given in terms of helicity eigenstates <inlineequation>
 <alt role='tex'>\chi_{\lambda}(p)</alt>
@@ -694,7 +730,8 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
 </section>
 <section>
 <title>Floating material and so forth</title>
-<para>Consider a task that computes profile parameters for a modified Lorentzian of the form <informalequation>
+<para>Consider a task that computes profile parameters for a modified Lorentzian of the form 
+<informalequation>
 <alt role='tex'>I=\frac{1}{1+d_{1}^{P(1+d_{2})}}</alt>
  <m:math>
  
@@ -732,7 +769,8 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
   </m:mrow>
  </m:mrow>
  </m:math>
-</informalequation> where <informalequation>
+</informalequation> where 
+<informalequation>
 <alt role='tex'>d_{1}=\sqrt{\left(\begin{array}{c}
 \frac{x_{1}}{R_{maj}}\end{array}\right)^{2}+\left(\begin{array}{c}
 \frac{y_{1}}{R_{min}}\end{array}\right)^{2}}</alt>
@@ -817,11 +855,14 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
   </m:mrow>
  </m:mrow>
  </m:math>
-</informalequation><informalequation>
+</informalequation>
+<informalequation>
 <alt role='tex'>d_{2}=\sqrt{\left(\begin{array}{c}
 \frac{x_{1}}{PR_{maj}}\end{array}\right)^{2}+\left(\begin{array}{c}
-\case{y_{1}}{PR_{min}}\end{array}\right)^{2}}</alt>MathML export failed. Please report this as a bug.
-</informalequation><informalequation>
+\case{y_{1}}{PR_{min}}\end{array}\right)^{2}}</alt>
+<mathphrase>MathML export failed. Please report this as a bug.</mathphrase>
+</informalequation>
+<informalequation>
 <alt role='tex'>x_{1}=(x-x_{0})\cos\Theta+(y-y_{0})\sin\Theta</alt>
  <m:math>
  
@@ -858,7 +899,8 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
   </m:mrow>
  </m:mrow>
  </m:math>
-</informalequation><informalequation>
+</informalequation>
+<informalequation>
 <alt role='tex'>y_{1}=-(x-x_{0})\sin\Theta+(y-y_{0})\cos\Theta</alt>
  <m:math>
  
@@ -951,7 +993,8 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
   </m:msub>
  </m:mrow>
  </m:math>
-</inlineequation>, but the assumption is that the alternate results should be less than 90° out of phase with previous values. We have no observations of <!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><!-- \ion{Ca}{2} -->. Roughly <inlineequation>
+</inlineequation>, but the assumption is that the alternate results should be less than 90° out of phase with previous values. We have no observations of <!-- \ion{Ca}{2} -->
+. Roughly <inlineequation>
 <alt role='tex'>\nicefrac{4}{5}</alt>
  <m:math>
  
@@ -965,33 +1008,49 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation> of the electronically submitted abstracts for AAS meetings are error-free. </para>
-<acknowledgement><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"><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->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. -->
+<acknowledgement>
+<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. -->
 
+</section>
 <bibliography>
-<bibliomixed xml:id='aur82'>Aurière, M. 1982, <!-- \aap -->, 109, 301 </bibliomixed>
-<bibliomixed xml:id='can78'>Canizares, C. R., Grindlay, J. E., Hiltner, W. A., Liller, W., and McClintock, J. E. 1978, <!-- \apj -->, 224, 39 </bibliomixed>
-<bibliomixed xml:id='djo84'>Djorgovski, S., and King, I. R. 1984, <!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><!-- \apjl -->, 277, L49 </bibliomixed>
+<bibliomixed xml:id='aur82'>Aurière, M. 1982, <!-- \aap -->
+, 109, 301 </bibliomixed>
+<bibliomixed xml:id='can78'>Canizares, C. R., Grindlay, J. E., Hiltner, W. A., Liller, W., and McClintock, J. E. 1978, <!-- \apj -->
+, 224, 39 </bibliomixed>
+<bibliomixed xml:id='djo84'>Djorgovski, S., and King, I. R. 1984, <!-- \apjl -->
+, 277, L49 </bibliomixed>
 <bibliomixed xml:id='hag86'>Hagiwara, K., and Zeppenfeld, D. 1986, Nucl.Phys., 274, 1 </bibliomixed>
-<bibliomixed xml:id='har84'>Harris, W. E., and van den Bergh, S. 1984, <!-- \aj -->, 89, 1816 </bibliomixed>
+<bibliomixed xml:id='har84'>Harris, W. E., and van den Bergh, S. 1984, <!-- \aj -->
+, 89, 1816 </bibliomixed>
 <bibliomixed xml:id='hen61'>Hénon, M. 1961, Ann.d'Ap., 24, 369 </bibliomixed>
-<bibliomixed xml:id='kin66'>King, I. R. 1966, <!-- \aj -->, 71, 276 </bibliomixed>
+<bibliomixed xml:id='kin66'>King, I. R. 1966, <!-- \aj -->
+, 71, 276 </bibliomixed>
 <bibliomixed xml:id='kin75'>King, I. R. 1975, Dynamics of Stellar Systems, A. Hayli, Dordrecht: Reidel, 1975, 99 </bibliomixed>
-<bibliomixed xml:id='kin68'>King, I. R., Hedemann, E., Hodge, S. M., and White, R. E. 1968, <!-- \aj -->, 73, 456 </bibliomixed>
-<bibliomixed xml:id='kro84'>Kron, G. E., Hewitt, A. V., and Wasserman, L. H. 1984, <!-- \pasp -->, 96, 198 </bibliomixed>
-<bibliomixed xml:id='lyn68'>Lynden-Bell, D., and Wood, R. 1968, <!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><!-- \mnras -->, 138, 495 </bibliomixed>
-<bibliomixed xml:id='new78'>Newell, E. B., and O'Neil, E. J. 1978, <!-- \apjs -->, 37, 27 </bibliomixed>
-<bibliomixed xml:id='ort85'>Ortolani, S., Rosino, L., and Sandage, A. 1985, <!-- \aj -->, 90, 473 </bibliomixed>
-<bibliomixed xml:id='pet76'>Peterson, C. J. 1976, <!-- \aj -->, 81, 617 </bibliomixed>
+<bibliomixed xml:id='kin68'>King, I. R., Hedemann, E., Hodge, S. M., and White, R. E. 1968, <!-- \aj -->
+, 73, 456 </bibliomixed>
+<bibliomixed xml:id='kro84'>Kron, G. E., Hewitt, A. V., and Wasserman, L. H. 1984, <!-- \pasp -->
+, 96, 198 </bibliomixed>
+<bibliomixed xml:id='lyn68'>Lynden-Bell, D., and Wood, R. 1968, <!-- \mnras -->
+, 138, 495 </bibliomixed>
+<bibliomixed xml:id='new78'>Newell, E. B., and O'Neil, E. J. 1978, <!-- \apjs -->
+, 37, 27 </bibliomixed>
+<bibliomixed xml:id='ort85'>Ortolani, S., Rosino, L., and Sandage, A. 1985, <!-- \aj -->
+, 90, 473 </bibliomixed>
+<bibliomixed xml:id='pet76'>Peterson, C. J. 1976, <!-- \aj -->
+, 81, 617 </bibliomixed>
 <bibliomixed xml:id='spi85'>Spitzer, L. 1985, Dynamics of Star Clusters, J. Goodman and P. Hut, Dordrecht: Reidel, 109 </bibliomixed>
 </bibliography>
 <table xml:id="tbl-2">
-<caption><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->Terribly relevant tabular information.</caption>
-<!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><tbody>
+<caption>Terribly relevant tabular information.</caption>
+<tbody>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->Star </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> Height </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='center' valign='top'>Star </td>
+<td align='right' valign='top'> Height </td>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>d_{x}</alt>
  <m:math>
  
@@ -1005,7 +1064,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>d_{y}</alt>
  <m:math>
  
@@ -1019,7 +1078,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>n</alt>
  <m:math>
  
@@ -1027,7 +1086,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>\chi^{2}</alt>
  <m:math>
  
@@ -1041,7 +1100,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>R_{maj}</alt>
  <m:math>
  
@@ -1057,7 +1116,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>R_{min}</alt>
  <m:math>
  
@@ -1073,15 +1132,15 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='center' valign='top' colspan='1'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><inlineequation>
+<td align='center' valign='top' colspan='1'><inlineequation>
 <alt role='tex'>P</alt>
  <m:math>
  
  <m:mrow><m:mi>P</m:mi>
  </m:mrow>
  </m:math>
-</inlineequation><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->a</td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+</inlineequation>a</td>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>PR_{maj}</alt>
  <m:math>
  
@@ -1099,7 +1158,7 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> <inlineequation>
+<td align='right' valign='top'> <inlineequation>
 <alt role='tex'>PR_{min}</alt>
  <m:math>
  
@@ -1117,113 +1176,126 @@ v(p,\lambda)_{\pm} & = & \pm\lambda(E\mp\lambda|{\textbf{p}}|)^{1/2}\chi
  </m:mrow>
  </m:math>
 </inlineequation></td>
-<td align='center' valign='top' colspan='1'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><inlineequation>
+<td align='center' valign='top' colspan='1'><inlineequation>
 <alt role='tex'>\Theta</alt>
  <m:math>
  
  <m:mrow><m:mo>&#x398;</m:mo>
  </m:mrow>
  </m:math>
-</inlineequation><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->b</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->Ref.</td>
+</inlineequation>b</td>
+<td align='center' valign='top'>Ref.</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --><!-- \tableline\tableline -->1 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->33472.5 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.1 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->0.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->53 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->27.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.065 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.940 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->3.900 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->68.3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->116.2 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-27.639</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1,2</td>
+<td align='center' valign='top'><!-- \tableline\tableline -->
+1 </td>
+<td align='right' valign='top'>33472.5 </td>
+<td align='right' valign='top'>-0.1 </td>
+<td align='right' valign='top'>0.4 </td>
+<td align='right' valign='top'>53 </td>
+<td align='right' valign='top'>27.4 </td>
+<td align='right' valign='top'>2.065 </td>
+<td align='right' valign='top'>1.940 </td>
+<td align='right' valign='top'>3.900 </td>
+<td align='right' valign='top'>68.3 </td>
+<td align='right' valign='top'>116.2 </td>
+<td align='right' valign='top'>-27.639</td>
+<td align='center' valign='top'>1,2</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 2 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->27802.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.2 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->60 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->3.7 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.628 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.510 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.156 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->6.8 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->7.5 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-26.764</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->3</td>
+<td align='center' valign='top'> 2 </td>
+<td align='right' valign='top'>27802.4 </td>
+<td align='right' valign='top'>-0.3 </td>
+<td align='right' valign='top'>-0.2 </td>
+<td align='right' valign='top'>60 </td>
+<td align='right' valign='top'>3.7 </td>
+<td align='right' valign='top'>1.628 </td>
+<td align='right' valign='top'>1.510 </td>
+<td align='right' valign='top'>2.156 </td>
+<td align='right' valign='top'>6.8 </td>
+<td align='right' valign='top'>7.5 </td>
+<td align='right' valign='top'>-26.764</td>
+<td align='center' valign='top'>3</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->29210.6 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->0.9 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->0.3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->60 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->3.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.622 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.551 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.159 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->6.7 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->7.3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-40.272</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->4</td>
+<td align='center' valign='top'> 3 </td>
+<td align='right' valign='top'>29210.6 </td>
+<td align='right' valign='top'>0.9 </td>
+<td align='right' valign='top'>0.3 </td>
+<td align='right' valign='top'>60 </td>
+<td align='right' valign='top'>3.4 </td>
+<td align='right' valign='top'>1.622 </td>
+<td align='right' valign='top'>1.551 </td>
+<td align='right' valign='top'>2.159 </td>
+<td align='right' valign='top'>6.7 </td>
+<td align='right' valign='top'>7.3 </td>
+<td align='right' valign='top'>-40.272</td>
+<td align='center' valign='top'>4</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->32733.8 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-1.2<!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->c</td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.5 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->41 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->54.8 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.282 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.156 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->4.313 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->117.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->78.2 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-35.847</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->5,6</td>
+<td align='center' valign='top'> 4 </td>
+<td align='right' valign='top'>32733.8 </td>
+<td align='right' valign='top'>-1.2c</td>
+<td align='right' valign='top'>-0.5 </td>
+<td align='right' valign='top'>41 </td>
+<td align='right' valign='top'>54.8 </td>
+<td align='right' valign='top'>2.282 </td>
+<td align='right' valign='top'>2.156 </td>
+<td align='right' valign='top'>4.313 </td>
+<td align='right' valign='top'>117.4 </td>
+<td align='right' valign='top'>78.2 </td>
+<td align='right' valign='top'>-35.847</td>
+<td align='center' valign='top'>5,6</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 5 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 9607.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-0.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->60 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.4 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.669<!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->c</td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.574 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->2.343 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->8.0 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->8.9 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-33.417</td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->7</td>
+<td align='center' valign='top'> 5 </td>
+<td align='right' valign='top'> 9607.4 </td>
+<td align='right' valign='top'>-0.4 </td>
+<td align='right' valign='top'>-0.4 </td>
+<td align='right' valign='top'>60 </td>
+<td align='right' valign='top'>1.4 </td>
+<td align='right' valign='top'>1.669c</td>
+<td align='right' valign='top'>1.574 </td>
+<td align='right' valign='top'>2.343 </td>
+<td align='right' valign='top'>8.0 </td>
+<td align='right' valign='top'>8.9 </td>
+<td align='right' valign='top'>-33.417</td>
+<td align='center' valign='top'>7</td>
 </tr>
 <tr>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 6 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->31638.6 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->1.6 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->0.1 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->39 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->315.2 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info --> 3.433 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->3.075 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->7.488 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->92.1 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->25.3 </td>
-<td align='right' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->-12.052 </td>
-<td align='center' valign='top'><!-- shouldBeInInfo --><!-- mustBeInInfo --><!-- /info -->8</td>
+<td align='center' valign='top'> 6 </td>
+<td align='right' valign='top'>31638.6 </td>
+<td align='right' valign='top'>1.6 </td>
+<td align='right' valign='top'>0.1 </td>
+<td align='right' valign='top'>39 </td>
+<td align='right' valign='top'>315.2 </td>
+<td align='right' valign='top'> 3.433 </td>
+<td align='right' valign='top'>3.075 </td>
+<td align='right' valign='top'>7.488 </td>
+<td align='right' valign='top'>92.1 </td>
+<td align='right' valign='top'>25.3 </td>
+<td align='right' valign='top'>-12.052 </td>
+<td align='center' valign='top'>8</td>
 </tr>
 </tbody>
-<Table note>a<!-- }{ -->Sample footnote for table&#xA0;<xref linkend="tbl-2" /> that was generated with the LaTeX table environment</Table note>
-<Table note>b<!-- }{ -->Yet another sample footnote for table&#xA0;<xref linkend="tbl-2" /></Table note>
-<Table note>c<!-- }{ -->Another sample footnote for table&#xA0;<xref linkend="tbl-2" /></Table note>
-<TableComments>We can also attach a long-ish paragraph of explanatory material to a table. Use \tablerefs to append a list of references. The following references were from a different table: I've patched them in here to show how they look, but don't take them too seriously—I certainly have not.</TableComments>
-<TableRefs>(1) Barbuy, Spite, & Spite 1985; (2) Bond 1980; (3) Carbon et al. 1987; (4) Hobbs & Duncan 1987; (5) Gilroy et al. 1988: (6) Gratton & Ortolani 1986; (7) Gratton & Sneden 1987; (8) Gratton & Sneden (1988); (9) Gratton & Sneden 1991; (10) Kraft et al. 1982; (11) LCL, or Laird, 1990; (12) Leep & Wallerstein 1981; (13) Luck & Bond 1981; (14) Luck & Bond 1985; (15) Magain 1987; (16) Magain 1989; (17) Peterson 1981; (18) Peterson, Kurucz, & Carney 1990; (19) RMB; (20) Schuster & Nissen 1988; (21) Schuster & Nissen 1989b; (22) Spite et al. 1984; (23) Spite & Spite 1986; (24) Hobbs & Thorburn 1991; (25) Hobbs et al. 1991; (26) Olsen 1983.</TableRefs>
-</table>
-</section>
 
+<Table note>
+a<!-- }{ -->
+Sample footnote for table&#xA0;<xref linkend="tbl-2" /> that was generated with the LaTeX table environment
+</Table note>
+<Table note>
+b<!-- }{ -->
+Yet another sample footnote for table&#xA0;<xref linkend="tbl-2" />
+</Table note>
+<Table note>
+c<!-- }{ -->
+Another sample footnote for table&#xA0;<xref linkend="tbl-2" />
+</Table note>
+<TableComments>
+We can also attach a long-ish paragraph of explanatory material to a table. Use \tablerefs to append a list of references. The following references were from a different table: I've patched them in here to show how they look, but don't take them too seriously—I certainly have not.
+</TableComments>
+<TableRefs>
+(1) Barbuy, Spite, & Spite 1985; (2) Bond 1980; (3) Carbon et al. 1987; (4) Hobbs & Duncan 1987; (5) Gilroy et al. 1988: (6) Gratton & Ortolani 1986; (7) Gratton & Sneden 1987; (8) Gratton & Sneden (1988); (9) Gratton & Sneden 1991; (10) Kraft et al. 1982; (11) LCL, or Laird, 1990; (12) Leep & Wallerstein 1981; (13) Luck & Bond 1981; (14) Luck & Bond 1985; (15) Magain 1987; (16) Magain 1989; (17) Peterson 1981; (18) Peterson, Kurucz, & Carney 1990; (19) RMB; (20) Schuster & Nissen 1988; (21) Schuster & Nissen 1989b; (22) Spite et al. 1984; (23) Spite & Spite 1986; (24) Hobbs & Thorburn 1991; (25) Hobbs et al. 1991; (26) Olsen 1983.
+</TableRefs>
+</table>
 </article>
\ No newline at end of file
diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index 74d2ab6..d79cd02 100644
--- a/lib/layouts/aastex.layout
+++ b/lib/layouts/aastex.layout
@@ -179,6 +179,7 @@ Style Affiliation
 	DocBookWrapperTag                 author
 	DocBookWrapperMergeWithPrevious   true
 	DocBookItemTag                    orgname
+	DocBookItemTagType                paragraph
 	DocBookInInfo                     always
 End
 
@@ -207,6 +208,7 @@ Style Altaffilation
 	DocBookWrapperTag                 author
 	DocBookWrapperMergeWithPrevious   true
 	DocBookItemTag                    orgname
+	DocBookItemTagType                paragraph
 	DocBookInInfo                     always
 End
 
@@ -228,6 +230,7 @@ Style Email
 	  Shape		Italic
 	EndFont
 	DocBookTag                        email
+	DocBookTagType                    paragraph
 	DocBookWrapperTag                 author
 	DocBookWrapperMergeWithPrevious   true
 	DocBookInInfo                     always

commit 5b8ef9979399e30a2b5b77fec38c2cc2aa3f6153
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Aug 30 02:30:24 2020 +0200

    DocBook: adapt SimpleCV for tag types (new-line behaviour).

diff --git a/lib/layouts/simplecv.layout b/lib/layouts/simplecv.layout
index 0a69f1e..1cf6c30 100644
--- a/lib/layouts/simplecv.layout
+++ b/lib/layouts/simplecv.layout
@@ -54,6 +54,7 @@ Style Section
 		IsTocCaption   1
 	EndArgument
 	DocBookTag            title
+	DocBookTagType        paragraph
 	DocBookSectionTag     section
 End
 
@@ -176,6 +177,7 @@ Style Title
 	EndFont
 	HTMLTitle             true
 	DocBookTag            title
+	DocBookTagType        paragraph
 	DocBookInInfo         maybe
 End
 

commit 3ee2640978a7e4ae84455b92c8126fa9d95de3fa
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Aug 30 02:30:04 2020 +0200

    DocBook: fix bibliographies (end of <bibliography> and sections).

diff --git a/autotests/export/docbook/bibliography_precooked.xml b/autotests/export/docbook/bibliography_precooked.xml
index 1f103bc..901abd4 100644
--- a/autotests/export/docbook/bibliography_precooked.xml
+++ b/autotests/export/docbook/bibliography_precooked.xml
@@ -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>
\ No newline at end of file
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index f584b8b..5ee906f 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -391,12 +391,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");
@@ -1122,7 +1119,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 + ">");

-----------------------------------------------------------------------

Summary of changes:
 .../export/docbook/bibliography_precooked.xml      |    3 +-
 .../docbook/bibliography_precooked_aastex.xml      |  357 +++++++++++---------
 development/DocBookToDo                            |   20 ++
 lib/layouts/aastex.layout                          |   27 ++-
 lib/layouts/aastex6.layout                         |    7 +-
 lib/layouts/aastex62.layout                        |    7 +-
 lib/layouts/simplecv.layout                        |    2 +
 src/output_docbook.cpp                             |   26 +-
 8 files changed, 277 insertions(+), 172 deletions(-)
 create mode 100644 development/DocBookToDo


hooks/post-receive
-- 
Repository for new features


More information about the lyx-cvs mailing list