mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
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.
This commit is contained in:
parent
fb8c07a2c7
commit
7ec0307b13
@ -382,9 +382,7 @@ clusters: globular, peanut—bosons: bozos
|
|||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</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>
|
</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>
|
<remark role='to-editor'>Figures 1 and 2 should appear side-by-side in print</remark>
|
||||||
Figures 1 and 2 should appear side-by-side in print
|
|
||||||
</NoteToEditor>
|
|
||||||
<para>In the chiral representation the <inlineequation>
|
<para>In the chiral representation the <inlineequation>
|
||||||
<alt role='tex'>\gamma</alt>
|
<alt role='tex'>\gamma</alt>
|
||||||
<m:math>
|
<m:math>
|
||||||
@ -634,7 +632,6 @@ Figures 1 and 2 should appear side-by-side in print
|
|||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</inlineequation> by </para>
|
</inlineequation> by </para>
|
||||||
<MathLetters>
|
|
||||||
<informalequation>
|
<informalequation>
|
||||||
<alt role='tex'>u(p,\lambda)_{\pm} & = & (E\pm\lambda|{\textbf{p}}|)^{1/2}\chi_{\lambda}(p),\\
|
<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)
|
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:mtr>
|
||||||
</m:mtable>
|
</m:mtable>
|
||||||
</m:math>
|
</m:math>
|
||||||
</informalequation>
|
</informalequation></section>
|
||||||
</MathLetters>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Floating material and so forth</title>
|
<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:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</inlineequation> of the electronically submitted abstracts for AAS meetings are error-free. </para>
|
</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 <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>
|
<para>We are grateful to V. Barger, T. Han, and R. J. N. Phillips for doing the math in section <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>
|
<application>
|
||||||
IRAF, AIPS, Astropy, ...
|
IRAF, AIPS, Astropy, ...
|
||||||
@ -1139,7 +1134,7 @@ IRAF, AIPS, Astropy, ...
|
|||||||
<m:mrow><m:mi>P</m:mi>
|
<m:mrow><m:mi>P</m:mi>
|
||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</inlineequation>a</td>
|
</inlineequation><remark role='tablenotemark'>a</remark></td>
|
||||||
<td align='right' valign='top'> <inlineequation>
|
<td align='right' valign='top'> <inlineequation>
|
||||||
<alt role='tex'>PR_{maj}</alt>
|
<alt role='tex'>PR_{maj}</alt>
|
||||||
<m:math>
|
<m:math>
|
||||||
@ -1183,7 +1178,7 @@ IRAF, AIPS, Astropy, ...
|
|||||||
<m:mrow><m:mo>Θ</m:mo>
|
<m:mrow><m:mo>Θ</m:mo>
|
||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</inlineequation>b</td>
|
</inlineequation><remark role='tablenotemark'>b</remark></td>
|
||||||
<td align='center' valign='top'>Ref.</td>
|
<td align='center' valign='top'>Ref.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -1235,7 +1230,7 @@ IRAF, AIPS, Astropy, ...
|
|||||||
<tr>
|
<tr>
|
||||||
<td align='center' valign='top'> 4 </td>
|
<td align='center' valign='top'> 4 </td>
|
||||||
<td align='right' valign='top'>32733.8 </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'>-0.5 </td>
|
||||||
<td align='right' valign='top'>41 </td>
|
<td align='right' valign='top'>41 </td>
|
||||||
<td align='right' valign='top'>54.8 </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'>-0.4 </td>
|
||||||
<td align='right' valign='top'>60 </td>
|
<td align='right' valign='top'>60 </td>
|
||||||
<td align='right' valign='top'>1.4 </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'>1.574 </td>
|
||||||
<td align='right' valign='top'>2.343 </td>
|
<td align='right' valign='top'>2.343 </td>
|
||||||
<td align='right' valign='top'>8.0 </td>
|
<td align='right' valign='top'>8.0 </td>
|
||||||
@ -1279,23 +1274,13 @@ IRAF, AIPS, Astropy, ...
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<Table note>
|
<remark role='tablenote'>a<!-- }{ -->
|
||||||
a<!-- }{ -->
|
Sample footnote for table <xref linkend="tbl-2" /> that was generated with the LaTeX table environment</remark>
|
||||||
Sample footnote for table <xref linkend="tbl-2" /> that was generated with the LaTeX table environment
|
<remark role='tablenote'>b<!-- }{ -->
|
||||||
</Table note>
|
Yet another sample footnote for table <xref linkend="tbl-2" /></remark>
|
||||||
<Table note>
|
<remark role='tablenote'>c<!-- }{ -->
|
||||||
b<!-- }{ -->
|
Another sample footnote for table <xref linkend="tbl-2" /></remark>
|
||||||
Yet another sample footnote for table <xref linkend="tbl-2" />
|
<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>
|
||||||
</Table note>
|
<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 note>
|
|
||||||
c<!-- }{ -->
|
|
||||||
Another sample footnote for table <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>
|
</table>
|
||||||
</article>
|
</article>
|
20
development/DocBookToDo
Normal file
20
development/DocBookToDo
Normal file
@ -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.
|
@ -285,6 +285,11 @@ Style Abstract
|
|||||||
Series Bold
|
Series Bold
|
||||||
Size Normal
|
Size Normal
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookAbstract true
|
||||||
|
DocBookInInfo always
|
||||||
|
DocBookWrapperTag abstract
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookTag para
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -335,6 +340,7 @@ Style Keywords
|
|||||||
Size Normal
|
Size Normal
|
||||||
EndFont
|
EndFont
|
||||||
DocBookTag keyword
|
DocBookTag keyword
|
||||||
|
DocBookTagType paragraph
|
||||||
DocBookWrapperTag keywordset
|
DocBookWrapperTag keywordset
|
||||||
DocBookInInfo always
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
@ -359,7 +365,7 @@ Style Acknowledgements
|
|||||||
Shape Italic
|
Shape Italic
|
||||||
EndFont
|
EndFont
|
||||||
DocBookTag para
|
DocBookTag para
|
||||||
DocBookWrapperTag acknowledgement
|
DocBookWrapperTag acknowledgements
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -432,6 +438,7 @@ Style MathLetters
|
|||||||
Font
|
Font
|
||||||
Size Normal
|
Size Normal
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag NONE
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -495,6 +502,9 @@ Style NoteToEditor
|
|||||||
Size Normal
|
Size Normal
|
||||||
Shape Italic
|
Shape Italic
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag remark
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookAttr role='to-editor'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -515,6 +525,9 @@ Style TableRefs
|
|||||||
Family Roman
|
Family Roman
|
||||||
Size Normal
|
Size Normal
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag remark
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookAttr role='tablerefs'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -535,6 +548,9 @@ Style TableComments
|
|||||||
Family Roman
|
Family Roman
|
||||||
Size Normal
|
Size Normal
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag remark
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookAttr role='tablecomments'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -550,6 +566,9 @@ Style "Table note"
|
|||||||
LabelFont
|
LabelFont
|
||||||
Color magenta
|
Color magenta
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag remark
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookAttr role='tablenote'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
@ -572,6 +591,9 @@ InsetLayout "Flex:tablenotemark"
|
|||||||
Color magenta
|
Color magenta
|
||||||
Size Small
|
Size Small
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag remark
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookAttr role='tablenotemark'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,8 +67,11 @@ Style Software
|
|||||||
LabelFont
|
LabelFont
|
||||||
Shape Italic
|
Shape Italic
|
||||||
EndFont
|
EndFont
|
||||||
DocBookWrapperTag para
|
DocBookTag remark
|
||||||
DocBookTag application
|
DocBookAttr role='software'
|
||||||
|
# Override what's taken from Keywords, but not really wanted.
|
||||||
|
DocBookWrapperTag NONE
|
||||||
|
DocBookInInfo never
|
||||||
End
|
End
|
||||||
|
|
||||||
# other new commands are mainly for the user preamble
|
# other new commands are mainly for the user preamble
|
||||||
|
@ -78,8 +78,11 @@ Style Software
|
|||||||
LabelFont
|
LabelFont
|
||||||
Shape Italic
|
Shape Italic
|
||||||
EndFont
|
EndFont
|
||||||
DocBookWrapperTag para
|
DocBookTag remark
|
||||||
DocBookTag application
|
DocBookAttr role='software'
|
||||||
|
# Override what's taken from Keywords, but not really wanted.
|
||||||
|
DocBookWrapperTag NONE
|
||||||
|
DocBookInInfo never
|
||||||
End
|
End
|
||||||
|
|
||||||
# other new commands are mainly for the user preamble
|
# other new commands are mainly for the user preamble
|
||||||
|
Loading…
Reference in New Issue
Block a user