]> git.lyx.org Git - lyx.git/blob - autotests/export/docbook/basic.xml
ctests: add test cases for DocBook
[lyx.git] / autotests / export / docbook / basic.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- This DocBook file was created by LyX 2.4.0dev
3   See https://www.lyx.org/ for more information -->
4 <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">
5 <info>
6 <title>I am a title</title>
7 <author>
8 <personname>I am an author</personname>
9 </author>
10 <date>I am a date</date>
11 <abstract>
12 <para>I am an abstract</para>
13 <para>I am also an abstract</para>
14 </abstract>
15 </info>
16 <para>I am a standard paragraph. </para>
17 <section xml:id="sec.Sec-1">
18 <title>I am the first section </title>
19 <para>I am the first paragraph of the first section. </para>
20 <para>I am the second paragraph of the first section. </para>
21 <blockquote>
22 <para>I am a quote<inlineequation>
23 <alt role='tex'>\,with\,a\,formula</alt>
24 <m:math display="inline">
25  
26 <m:mrow>
27  <m:mrow>
28   <m:mspace width="6px"/>
29   <m:mi>w</m:mi>
30   <m:mi>i</m:mi>
31   <m:mi>t</m:mi>
32   <m:mi>h</m:mi>
33   <m:mspace width="6px"/>
34   <m:mi>a</m:mi>
35   <m:mspace width="6px"/>
36   <m:mi>f</m:mi>
37   <m:mi>o</m:mi>
38   <m:mi>r</m:mi>
39   <m:mi>m</m:mi>
40   <m:mi>u</m:mi>
41   <m:mi>l</m:mi>
42   <m:mi>a</m:mi>
43  </m:mrow>
44 </m:mrow>
45 </m:math>
46 </inlineequation>. </para>
47 </blockquote>
48 <para>Now, we're outside quotes.</para>
49 <informalequation>
50 <alt role='tex'>Formula!</alt>
51 <m:math display="block">
52  
53 <m:mrow>
54  <m:mrow>
55   <m:mi>F</m:mi>
56   <m:mi>o</m:mi>
57   <m:mi>r</m:mi>
58   <m:mi>m</m:mi>
59   <m:mi>u</m:mi>
60   <m:mi>l</m:mi>
61   <m:mi>a</m:mi>
62   <m:mo>!</m:mo>
63  </m:mrow>
64 </m:mrow>
65 </m:math>
66 </informalequation>
67 <informalequation xml:id="eq.EQ.">
68 <alt role='tex'>\text{I am a formula with a ref.}\label{eq:EQ.}</alt>
69 <m:math display="block">
70  
71 <m:mtable displaystyle='true'>
72  <m:mtr>
73   <m:mtd>
74    <m:mstyle mathvariant='normal'>
75     <m:mrow>
76      <m:mi>I</m:mi>&#0160;
77      <m:mi>a</m:mi>
78      <m:mi>m</m:mi>&#0160;
79      <m:mi>a</m:mi>&#0160;
80      <m:mi>f</m:mi>
81      <m:mi>o</m:mi>
82      <m:mi>r</m:mi>
83      <m:mi>m</m:mi>
84      <m:mi>u</m:mi>
85      <m:mi>l</m:mi>
86      <m:mi>a</m:mi>&#0160;
87      <m:mi>w</m:mi>
88      <m:mi>i</m:mi>
89      <m:mi>t</m:mi>
90      <m:mi>h</m:mi>&#0160;
91      <m:mi>a</m:mi>&#0160;
92      <m:mi>r</m:mi>
93      <m:mi>e</m:mi>
94      <m:mi>f</m:mi>
95      <m:mn>.</m:mn>
96     </m:mrow>
97    </m:mstyle>
98   </m:mtd>
99   <m:mtd>
100    <m:mtext>(1)</m:mtext>
101   </m:mtd>
102  </m:mtr>
103 </m:mtable>
104 </m:math>
105 </informalequation>
106
107 <para>See <xref linkend="sec.Sec-2kqgsdiflhqsdlifgjuzer-povtuizmvnuer-t-vmsrmfli--uh--a--rtpfuo----rtpc.m-ca-rgifzapeu-tvgz" />.</para>
108 <para>Also, a formula with an user-defined macro that outputs well in LaTeX but cannot in MathML: <inlineequation>
109 <alt role='tex'>\testmacro</alt>
110 <mathphrase>MathML export failed. Please report this as a bug to the LyX developers: https://www.lyx.org/trac.</mathphrase>
111 </inlineequation>. </para>
112 <!-- \latexCommandThatShouldBeCommented --><section>
113 <title>I am the first subsection</title>
114 <para>I am the only paragraph of the first subsection. </para>
115 </section>
116 <section>
117 <title>I am the second subsection</title>
118 <para>I am the only paragraph of the second subsection. </para>
119 </section>
120 </section>
121 <section xml:id="sec.Sec-2kqgsdiflhqsdlifgjuzer-povtuizmvnuer-t-vmsrmfli--uh--a--rtpfuo----rtpc.m-ca-rgifzapeu-tvgz">
122 <title>I am the second section </title>
123 <para>I am the only paragraph of the second section. <link xlink:href="http://example.org">Hyperlink.</link> &#8220;Text between quotes.&#8221;</para>
124 <para>See <xref linkend="sec.Sec-1" />.</para>
125 </section>
126 <section>
127 <title>I am the third section and I have fun with lists</title>
128 <orderedlist>
129 <listitem>
130 <para>First item.</para>
131 <para> Second line of the first item, after a line break. </para>
132 </listitem>
133 <listitem>
134 <para>Second item. </para>
135 </listitem>
136 </orderedlist>
137 <itemizedlist>
138 <listitem>
139 <para>Item has no order (1). </para>
140 </listitem>
141 <listitem>
142 <para>Item has no order (2). </para>
143 </listitem>
144 </itemizedlist>
145 <variablelist>
146 <varlistentry>
147 <term>Word</term>
148 <listitem>
149 <para>description</para>
150 </listitem>
151 </varlistentry>
152 <varlistentry>
153 <term>Sentence</term>
154 <listitem>
155 <para>meaning</para>
156 </listitem>
157 </varlistentry>
158 </variablelist>
159 </section>
160 <section>
161 <title>I am the fourth section and I deal with formatting. </title>
162 <para>The following paragraph should be code. </para>
163 <para><programlisting>I am some code. 
164 I am a second line of code. </programlisting>
165 I am no more code. </para>
166 <para>This line has inline code. <code>This has typewriter font</code><footnote>
167 <para>I repeat that in a footnote.</para>
168 </footnote>. </para>
169 <para>On the other hand, <footnote>
170 <para>this footnote</para>
171 <para>has multiple </para>
172 <para>paragraphs.</para>
173 </footnote>. </para>
174 </section>
175 <section>
176 <title>I am the fifth section and I deal with floats</title>
177 <para>Now, three tables: </para>
178 <table>
179 <caption>I am a table caption below the table.</caption>
180 <tbody>
181 <tr>
182 <td align='center' valign='top'>
183 <para>Table 1</para>
184 </td>
185 <td align='center' valign='top'>
186 <para>Table 2</para>
187 </td>
188 <td align='center' valign='top'>
189 <para>Table 3</para>
190 </td>
191 </tr>
192 <tr>
193 <td align='center' valign='top'>
194 <para>Row 1</para>
195 </td>
196 <td align='center' valign='top'></td>
197 <td align='center' valign='top'>
198 <para>Col 3, row 1</para>
199 </td>
200 </tr>
201 <tr>
202 <td align='center' valign='top'>
203 <para>Row 2</para>
204 </td>
205 <td align='center' valign='top'></td>
206 <td align='center' valign='top'>
207 <para>Col 3, row 2</para>
208 </td>
209 </tr>
210 </tbody>
211 </table>
212 <table>
213 <caption>I am a table caption above the table.</caption>
214 <tbody>
215 <tr>
216 <td align='center' valign='top'>
217 <para>Table 1</para>
218 </td>
219 <td align='center' valign='top'>
220 <para>Table 2</para>
221 </td>
222 <td align='center' valign='top'>
223 <para>Table 3</para>
224 </td>
225 </tr>
226 <tr>
227 <td align='center' valign='top'>
228 <para>Row 1</para>
229 </td>
230 <td align='center' valign='top'></td>
231 <td align='center' valign='top'>
232 <para>Col 3, row 1</para>
233 </td>
234 </tr>
235 <tr>
236 <td align='center' valign='top'>
237 <para>Row 2</para>
238 </td>
239 <td align='center' valign='top'></td>
240 <td align='center' valign='top'>
241 <para>Col 3, row 2</para>
242 </td>
243 </tr>
244 </tbody>
245 </table>
246 <informaltable>
247 <tbody>
248 <tr>
249 <td align='center' valign='top'>
250 <para>Table that has no caption 1</para>
251 </td>
252 <td align='center' valign='top'>
253 <para>Table that has no caption 2</para>
254 </td>
255 <td align='center' valign='top'>
256 <para>Table that has no caption 3</para>
257 </td>
258 </tr>
259 <tr>
260 <td align='center' valign='top'>
261 <para>Row 1</para>
262 </td>
263 <td align='center' valign='top'></td>
264 <td align='center' valign='top'>
265 <para>Col 3, row 1</para>
266 </td>
267 </tr>
268 <tr>
269 <td align='center' valign='top'>
270 <para>Row 2</para>
271 </td>
272 <td align='center' valign='top'></td>
273 <td align='center' valign='top'>
274 <para>Col 3, row 2</para>
275 </td>
276 </tr>
277 </tbody>
278 </informaltable>
279
280 <para>Then, one figure: </para>
281 <figure>
282 <title>Caption.</title>
283 <mediaobject>
284 <imageobject>
285 <imagedata fileref="D:/LyX/lyx-unstable/autotests/export/docbook/lyx-logo.png"  />
286 </imageobject>
287 </mediaobject>
288 </figure>
289 </section>
290 <section>
291 <title>I am the sixth section and I really like bibliographies</title>
292 <para>This text has references. First reference: <biblioref endterm="big" />. Second reference: <biblioref endterm="small" />. Both at the same time: <biblioref endterm="big" />, <biblioref endterm="small" />. A book: <biblioref endterm="Gro60" />. </para>
293 <para>Many things, just testing for completeness: <biblioref endterm="article" />, <biblioref endterm="book" />, <biblioref endterm="booklet" />, <biblioref endterm="conference" />, <biblioref endterm="inbook" />, <biblioref endterm="incollection" />. </para>
294 </section>
295 <section>
296 <title>I am the seventh section and I deal with indices</title>
297 <para>First, a term to index: <indexterm type="idx"><primary>Term to index</primary></indexterm>. Then a term to add to the second index: <indexterm type="oth"><primary>Term to add to the second index</primary></indexterm>. </para>
298 <para>Then several terms for the first index: <indexterm type="idx"><primary>Term</primary><secondary>to</secondary><tertiary>index</tertiary></indexterm>. </para>
299 <para>With a see: <indexterm type="idx"><primary>Term</primary><see>index</see></indexterm>. With a see also: <indexterm type="idx"><primary>Term</primary><seealso>index</seealso></indexterm>. </para>
300 <para>Several terms with a see: <indexterm type="idx"><primary>Term</primary><secondary>to</secondary><tertiary>index</tertiary><see>index</see></indexterm>. Several terms with a see also: <indexterm type="idx"><primary>Term</primary><secondary>to</secondary><tertiary>index</tertiary><seealso>index</seealso></indexterm>. </para>
301 <para>A start of range: <indexterm type="idx" class="startofrange" xml:id="Term-to-index"><primary>Term to index</primary></indexterm>. The corresponding end of range: <indexterm class="endofrange" startref="Term-to-index" />.</para>
302 <para>Several terms with a start of range: <indexterm type="idx" class="startofrange" xml:id="Term.to.index"><primary>Term</primary><secondary>to</secondary><tertiary>index</tertiary></indexterm>. The corresponding end of range: <indexterm class="endofrange" startref="Term.to.index" />.</para>
303 <para>These terms already appeared before! Start of range: <indexterm type="idx" class="startofrange" xml:id="Term.to.index-0"><primary>Term</primary><secondary>to</secondary><tertiary>index</tertiary></indexterm>. The corresponding end of range: <indexterm class="endofrange" startref="Term.to.index-0" />.</para>
304 </section>
305 <section>
306 <title>I am the eight section and I deal with star sections</title>
307 <bridgehead renderas='other' otherrenderas='part'>Star part</bridgehead>
308 <bridgehead renderas='sect1'>Star section (sect1)</bridgehead>
309 <bridgehead renderas='sect2'>Star subsection (sect2)</bridgehead>
310 <bridgehead renderas='sect3'>Star subsubsection (sect3)</bridgehead>
311 <bridgehead renderas='sect4'>Star paragraph (sect4)</bridgehead>
312 <bridgehead renderas='sect5'>Star subparagraph (sect5)</bridgehead>
313 </section>
314 <bibliography>
315 <title>References</title>
316 <biblioentry xml:id="article">
317 <title>The title of the work</title>
318 <volumenum>4</volumenum>
319 <artpagenums>201-213</artpagenums>
320 <bibliomisc role="type">article</bibliomisc>
321 <pubdate>1993</pubdate>
322 <biblioset relation="journal">
323 <title>The name of the journal</title>
324 </biblioset>
325 <authorgroup>
326 <author>
327 <personname>
328 <firstname>Peter</firstname>
329 <surname>Adams</surname>
330 </personname>
331 </author>
332 </authorgroup>
333 <biblioid class="pubsnumber">2</biblioid>
334 <bibliomisc role="note">An optional note</bibliomisc>
335 </biblioentry>
336 <biblioentry xml:id="book">
337 <title>The title of the work</title>
338 <volumenum>4</volumenum>
339 <edition>3</edition>
340 <bibliomisc role="type">book</bibliomisc>
341 <publisher>
342 <publishername>The name of the publisher</publishername>
343 <address>The address</address></publisher>
344 <pubdate>1993</pubdate>
345 <authorgroup>
346 <author>
347 <personname>
348 <firstname>Peter</firstname>
349 <surname>Babington</surname>
350 </personname>
351 </author>
352 </authorgroup>
353 <bibliomisc role="note">An optional note</bibliomisc>
354 </biblioentry>
355 <biblioentry xml:id="booklet">
356 <title>The title of the work</title>
357 <bibliomisc role="type">booklet</bibliomisc>
358 <pubdate>1993</pubdate>
359 <authorgroup>
360 <author>
361 <personname>
362 <firstname>Peter</firstname>
363 <surname>Caxton</surname>
364 </personname>
365 </author>
366 </authorgroup>
367 </biblioentry>
368 <biblioentry xml:id="conference">
369 <title>The title of the work</title>
370 <artpagenums>213</artpagenums>
371 <bibliomisc role="type">conference</bibliomisc>
372 <publisher>
373 <publishername>The publisher</publishername>
374 </publisher>
375 <pubdate>1993</pubdate>
376 <authorgroup>
377 <author>
378 <personname>
379 <firstname>Peter</firstname>
380 <surname>Draper</surname>
381 </personname>
382 </author>
383 </authorgroup>
384 </biblioentry>
385 <biblioentry xml:id="inbook">
386 <title>The title of the work</title>
387 <artpagenums>201-213</artpagenums>
388 <bibliomisc role="type">inbook</bibliomisc>
389 <publisher>
390 <publishername>The name of the publisher</publishername>
391 </publisher>
392 <pubdate>1993</pubdate>
393 <authorgroup>
394 <author>
395 <personname>
396 <firstname>Peter</firstname>
397 <surname>Eston</surname>
398 </personname>
399 </author>
400 </authorgroup>
401 </biblioentry>
402 <biblioentry xml:id="incollection">
403 <title>The title of the work</title>
404 <volumenum>4</volumenum>
405 <edition>3</edition>
406 <artpagenums>201-213</artpagenums>
407 <bibliomisc role="type">incollection</bibliomisc>
408 <publisher>
409 <publishername>The name of the publisher</publishername>
410 <address>The address of the publisher</address></publisher>
411 <pubdate>1993</pubdate>
412 <biblioset relation="book">
413 <title>The title of the book</title>
414 </biblioset>
415 <authorgroup>
416 <author>
417 <personname>
418 <firstname>Peter</firstname>
419 <surname>Farindon</surname>
420 </personname>
421 </author>
422 </authorgroup>
423 <bibliomisc role="note">An optional note</bibliomisc>
424 </biblioentry>
425 <biblioentry xml:id="small">
426 <title>A small paper</title>
427 <volumenum>-1</volumenum>
428 <bibliomisc role="type">article</bibliomisc>
429 <pubdate>1997</pubdate>
430 <biblioset relation="journal">
431 <title>The journal of small papers</title>
432 </biblioset>
433 <authorgroup>
434 <author>
435 <personname>
436 <surname>Freely</surname>
437 <othername role="suffix">I. P.</othername>
438 </personname>
439 </author>
440 <author>
441 <personname>
442 <firstname>Ditto</firstname>
443 <surname>Johannes</surname>
444 </personname>
445 </author>
446 </authorgroup>
447 <bibliomisc role="note">to appear</bibliomisc>
448 </biblioentry>
449 <biblioentry xml:id="Gro60">
450 <title>Éléments de géométrie algébrique</title>
451 <bibliomisc role="type">book</bibliomisc>
452 <pubdate>1960</pubdate>
453 <authorgroup>
454 <author>
455 <personname>
456 <firstname>Alexander</firstname>
457 <surname>Grothendieck</surname>
458 </personname>
459 </author>
460 </authorgroup>
461 </biblioentry>
462 <biblioentry xml:id="big">
463 <title>A big paper</title>
464 <volumenum>MCMXCVII</volumenum>
465 <bibliomisc role="type">article</bibliomisc>
466 <pubdate>7991</pubdate>
467 <biblioset relation="journal">
468 <title>The journal of big papers</title>
469 </biblioset>
470 <authorgroup>
471 <author>
472 <personname>
473 <firstname>Hugh</firstname>
474 <surname>Jass</surname>
475 </personname>
476 </author>
477 </authorgroup>
478 </biblioentry>
479 </bibliography>
480 </article>