<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
<chapter revisionflag="changed">
<title>First chapter</title>
<titleabbrev>abbrev</titleabbrev>
<para>
This is text before the first section.
</para>
<section>
<title>First section</title>
<para>
<indexterm>
<primary>primary</primary>
<secondary>secondary</secondary>
</indexterm>
<indexterm id="ID" class="startofrange">
<primary>range</primary>
</indexterm>
This is the text of the first section.
We are going to have an index in the middle of a paragraph.
<indexterm>
<primary>primary two</primary>
<secondary>secondary two</secondary>
</indexterm>
This is the rest of the paragraph.
</para>
</section>
<section>
<title>Second section</title>
<para>
This is the text of the second section. Here&#x2019;s a reference to
chapter <xref linkend="CHAPsecond"/>. Here are some entities, both local and default:
&amp;abcd; is ABCD; &amp;amp is &amp;.
</para>
</section>
</chapter>

<chapter id="CHAPsecond">
<title>Second chapter</title>
<para>
This is the second chapter. Test a block quote:
<indexterm>
<primary>visions</primary>
<see>sights</see>
</indexterm>
<indexterm>
<primary>noises</primary>
<secondary>off</secondary>
<seealso>sounds</seealso>
</indexterm>
</para>
<blockquote revisionflag="changed">
<para revisionflag="changed">
All the world&#x2019;s a stage, and all the men and women merely players. They have
their exits and their entrances, and one man in his time plays many parts.
</para>
</blockquote>
<itemizedlist revisionflag="changed">
<listitem>
<para revisionflag="changed">
This is the first item in an itemized list.
</para>
<para revisionflag="changed">
There is more than one paragraph.
</para>
</listitem>
<listitem>
<para revisionflag="changed">
This is the second item in an itemized list.
</para>
</listitem>
</itemizedlist>
<orderedlist numeration="arabic" revisionflag="changed">
<listitem>
<para revisionflag="changed">
Now we have an ordered list.
</para>
<para revisionflag="changed">
Again more than one paragraph.
</para>
</listitem>
<listitem>
<para revisionflag="changed">
The second item.
</para>
</listitem>
<listitem>
<para revisionflag="changed">
The third item
</para>
</listitem>
</orderedlist>
<para revisionflag="changed">
<indexterm startref="ID" class="endofrange"/>
</para>
<orderedlist numeration="lowerroman">
<listitem>
<para>
Try lower case roman numerals.
</para>
<itemizedlist>
<listitem>
<para>
Try a nested list.
</para>
</listitem>
<listitem>
<para>
next
</para>
</listitem>
</itemizedlist>
<para>
back in the first of the ordered.
</para>
</listitem>
<listitem>
<para>
the next
</para>
</listitem>
</orderedlist>
<para revisionflag="changed">
This is a normal text paragraph.
</para>
<literallayout revisionflag="changed">
This is a display where the font
should be normal
even recognizing <emphasis>italic</emphasis> and stuff
but the
layout is literal
</literallayout>
<literallayout class="monospaced">
This, however is a code paragraph
where &amp;'italic'&amp; everything except
&lt;angle&gt; brackets is totally literal,
and &amp; is no longer a flag.
</literallayout>
<para>
And now we are back to a <emphasis role="bold">normal</emphasis> paragraph again.
</para>
<informaltable frame="none">
<tgroup cols="2" colsep="0" rowsep="0">
<tbody>
<row>
<entry>1</entry>
<entry>2</entry>
</row>
<row>
<entry>3</entry>
<entry>4</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<informaltable frame="all">
<tgroup cols="3" colsep="1" rowsep="1">
<colspec colwidth="1*" align="left"/>
<colspec colwidth="2*" align="center"/>
<colspec colwidth="3*" align="right"/>
<tbody>
<row>
<entry>1</entry>
<entry>2</entry>
<entry>3</entry>
</row>
<row>
<entry>4</entry>
<entry>5</entry>
<entry>6</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<variablelist>
<varlistentry>
<term><emphasis role="bold">First</emphasis></term>
<listitem>
<para>
This is a paragraph about the first item.
</para>
<para>
In fact, here is a second paragraph.
</para>
</listitem></varlistentry>
<varlistentry>
<term><emphasis role="bold">Second</emphasis></term>
<listitem>
<para>
And now we have the second item.
</para>
</listitem></varlistentry>
</variablelist>
<para>
The quick brown fox
jumps over the lazy dog.
</para>
<!--this should be--> <para>
completely untouched
.not even dot lines
.endxmliphant
are touched
</para>
<para>
whereas this should note concats
&lt;and stuff&gt;
Test &copy; and &#1234; and &#x4dc4; for size.
</para>
<para>
Check &#x2018;quote&#x2019; marks. And &#x2018;&#x2018;doublequote&#x2019;&#x2019; marks.
</para>
<para>
This is a paragraph
where things happen over multiple
lines.
</para>
<para>
Test some of the standard flags <emphasis>italic</emphasis> and <emphasis role="bold">bold</emphasis> text and
<literal>literal</literal> text and <filename>filename</filename> in text and <quote>quoted</quote> text and
we have &amp; and &ndash; as single replacements.
</para>
<para>
abcd
</para>
<para>
the X line 1
</para>
<para>
the X line 2
</para>
<para>
the B line
the X line 3
</para>
<para>
This is text after the macro definition.
This is the first line of the macro abcd.
This is the second line. Contains a dollar ($) character.
</para>
<para>
First line.
Insert args: 1="default 1" 2="default-2" 3=""
First line.
Insert args: 1="set 1" 2="default-2" 3=""
First line.
Insert args: 1="set1" 2="set2" 3=""
First line.
Insert args: 1="set1" 2="set2" 3="set 3"
</para>
<para>
Always.
There is no second argument.
Always.
If arg1: setarg1
There is no second argument.
Always.
If arg1: setarg1
If arg2: setarg2
</para>
<literallayout class="monospaced">
Inside literal text, unknown directives
.like this one
should be passed as data
</literallayout>
<literallayout>
<literal>&amp;m1(1,2)        </literal>  |1 2|
<literal>&amp;m1(1)          </literal>  |1 two|
<literal>&amp;m1()           </literal>  |one two|
<literal>&amp;m1("a(,b)")    </literal>  |a(,b) two|
<literal>&amp;m1("a(,b)", c) </literal>  |a(,b) c|

<literal>&amp;m2()           </literal>  |three|
<literal>&amp;m2(a)          </literal>  |a|
<literal>&amp;m2(a,b)        </literal>  |ab|

<literal>&amp;m2("&amp;m1(x,y)")        </literal>  |x y|
<literal>&amp;m2("&amp;m1(x,y)", 3, 4)  </literal>  |x y34|
</literallayout>
<para>
URL <emphasis role="bold"><ulink url="http://etc">http://etc</ulink></emphasis> and another <emphasis role="bold"><ulink url="http://etc">text</ulink></emphasis> and so on.
</para>
<para revisionflag="changed">
This is a paragraph marked new with .new/.wen.
</para>
<literallayout>
The first line in a display.
<phrase revisionflag="changed">This line is between .new/.wen.
</phrase>Another line.
</literallayout>
<literallayout class="monospaced">
The first line in a code section.
<phrase revisionflag="changed">This line is between .new/.wen.
</phrase>Another line.
</literallayout>
<literallayout>
A
<phrase revisionflag="changed">B
</phrase>C
</literallayout>
<literallayout>
A
<phrase revisionflag="changed">ZZZ</phrase>
C
</literallayout>
<literallayout class="monospaced">
A
<phrase revisionflag="changed">B
</phrase>C
</literallayout>
<literallayout class="monospaced">
A
&amp;&lt;phrase revisionflag="changed"&gt;&amp;ZZZ&amp;&lt;/phrase&gt;&amp;
C
</literallayout>
<literallayout>
A
B <phrase revisionflag="changed">BB</phrase> BBB
C
</literallayout>
<literallayout class="monospaced">
A
B &amp;new(BB) BBB
C
</literallayout>
<literallayout>
FOUR "1" "2" "3" "4"
END NOT FOUR
------------
NOT FOUR
THREE "1" "2" "3"
END NOT FOUR
------------
NOT FOUR
NOT THREE "1" "2"
END NOT FOUR
------------
NOT FOUR
NOT THREE "1" ""
END NOT FOUR
------------
NOT FOUR
NOT THREE "" ""
END NOT FOUR
</literallayout>
<para>
Test footnotes. The quick brown fox
<footnote>
<para>
Note?
</para>
</footnote>
jumps
<footnote>
<literallayout>
Display in footnote.
</literallayout>
</footnote>
over the lazy
<footnote>
<informaltable frame="all">
<tgroup cols="3" colsep="1" rowsep="1">
<colspec colwidth="1*" align="left"/>
<colspec colwidth="2*" align="center"/>
<colspec colwidth="3*" align="right"/>
<tbody>
<row>
<entry>1</entry>
<entry>2</entry>
</row>
<row>
<entry>3</entry>
<entry>4</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</footnote>
dog.
</para>
<para>
Another paragraph
<footnote>
<para>
First para in footnote.
</para>
<para>
Second para in footnote.
</para>
</footnote>
with some footnotes
<footnote>
<para>
This foot note will have text
</para>
<literallayout class="monospaced">
and a display
</literallayout>
</footnote>
in various forms.
</para>
<literallayout>
How about a footnote in a display?
<footnote>
<para>
This is the note.
</para>
</footnote>
Back in the display.
</literallayout>
<?sdop toc_sections="no" ?>
<para>
Here is a reference to figure <xref linkend="FIGfirst"/>.
</para>
<figure id="FIGfirst">
<title>This is the first figure</title>
<mediaobject><imageobject>
<imagedata fileref="eps1.eps" >
</imagedata></imageobject></mediaobject>
</figure>
<para>
Here is another reference to figure <xref linkend="FIGfirst"/>. We also have
figure <xref linkend="FIGsecond"/> below.
</para>
<figure id="FIGsecond">
<title>The second figure</title>
<mediaobject><imageobject>
<imagedata fileref="eps1.eps"  scale="80" align="centre">
</imagedata></imageobject></mediaobject>
</figure>
<table id="TAB123" >
<title>this is title</title>
<tgroup cols="2" colsep="" rowsep="">
<colspec colwidth="1*" align="left"/>
<colspec colwidth="1*" align="left"/>
<tbody>
<row>
<entry>AAA</entry>
<entry>BBB</entry>
</row>
<row>
<entry>CCC</entry>
<entry>DDD</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
A ref to table <xref linkend="TAB123"/>. Now check quotes: &#x2018;normal&#x2019; should be changed
to typographic ones. In <literal>literal text, `they' shouldn't be</literal> changed.
</para>
<literallayout class="monospaced">
Check `quoted' in literal monospaced block.
</literallayout>
<literallayout>
But in a literal block that is &#x2018;not monospaced&#x2019; ...
<literal>Check it's ok</literal> when &#x2018;in the same line&#x2019;.
</literallayout>
<para>
Extra checks on the use of .nonl.
ABCDEFGH should be joined on
NONL</para>
<para>
At the end of a paragraph? It just puts &lt;/para&gt; on the same line.
</para>
<para>
At the start of a paragraph should work too.
</para>
<literallayout>
What about in a display?
Use NONLWITH more stuff
</literallayout>
</chapter>

<index>
<title>Index</title>
</index>

</book>
