<doc>

<newmacro name="fox" nargs="0">
    The quick brown fox jumps over the lazy dog.
</newmacro>

<newmacro name="short" nargs="0">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
</newmacro>

<newmacro name="lorem" nargs="0">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula
    eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient
    montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu,
    pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
    aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis
    vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras
    dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean
    leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante,
    dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius
    laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur
    ullamcorper ultricies nisi.
</newmacro>


<!-- ****************************************************************** -->

<title>A complete sample of <caps>Lambxml</caps></title>
<subtitle>Dario Teixeira</subtitle>
<subtitle>January 2010</subtitle>

<abstract>
<p><lorem/></p>
</abstract>

<toc/>


<!-- ****************************************************************** -->
<part order="">Inline features</part>

<p>
You can declare HTML entities by name (ex: &euro;), by decimal code point (ex:
&#8364;), or by hexadecimal code point (ex: &#x20ac;).  Here we have examples
of text in <b>bold</b> and <i>emphasised</i> and <mono>monospaced</mono> and in
<caps>small-caps</caps> and with <sup>superscripts</sup> and <sub>subscripts</sub>. You
may also correct <del>perfect</del><ins>broken</ins> text.  Also, <mbox><i>all of this
emphasised text should appear on the same line.</i></mbox>
</p>

<p>
You can embed TeX mathematics in an inline context like this: <mathtexinl>y=x^2</mathtexinl>.
You can embed MathML mathematics in an inline context like this: <mathmlinl><math><mi>y</mi><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup></math></mathmlinl>.
You can also embed highlighted source-code like <code style="lang=caml">type t = Alpha | Beta</code> into an inline context.
It is possible to embed images like <glyph src="circle-tiny.png" alt="o"/> into an inline context.
</p>

<p>
Here is a link to section number <dref href="sec:foobar"/> or smartly, <sref
href="sec:foobar"/>.  And here is a link to <mref href="sec:foobar">that same
section</mref>.  You can also link to Tip <dref href="tip:one"/>, or smarly <sref
href="tip:one"/>, or a link to <mref href="tip:one"> that same tip</mref>. The
bibliography is at the end<cite href="bib:one"/><cite href="bib:two"/><cite
href="bib:three"/>.  You can also place multiple citations in the same square
brackets<cite href="bib:one bib:two bib:three"/>.  There is also<see href="note:one"/>
a list<see href="note:two"/> of notes<see href="note:three"/>, which if you prefer you
can reference them with a single command<see href="note:one note:two note:three"/>.
</p>


<!-- ****************************************************************** -->
<part order="">Block features</part>


<!-- ****************************************************************** -->
<h1 label="sec:foobar">Text paragraphs</h1>

<p><lorem/></p>
<p><lorem/></p>
<p><lorem/></p>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Unordered lists</h1>

<p><lorem/></p>
<ul>
    <li><lorem/></li>
    <li><lorem/></li>
    <li><lorem/></li>
</ul>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Ordered lists</h1>

<p><lorem/></p>
<ol>
    <li><lorem/></li>
    <li><lorem/></li>
    <li><lorem/></li>
</ol>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Definition lists</h1>

<p><lorem/></p>
<dl>
    <dt>Alpha</dt>
    <dd><lorem/></dd>

    <dt>Beta</dt>
    <dd><lorem/></dd>

    <dt>Gamma</dt>
    <dd><lorem/></dd>
</dl>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Q&amp;A environments</h1>

<p><lorem/></p>
<qanda>
    <question>
        <dt>Q:</dt>
        <dd><lorem/></dd>
    </question>

    <answer>
        <dt>A:</dt>
        <dd><lorem/></dd>
    </answer>

    <rquestion>
        <lorem/>
    </rquestion>

    <ranswer>
        <lorem/>
    </ranswer>

    <question>
        <dd><lorem/></dd>
    </question>

    <answer>
        <dd><lorem/></dd>
    </answer>

    <rquestion>
        <lorem/>
    </rquestion>

    <ranswer>
        <lorem/>
    </ranswer>
</qanda>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Verse environments</h1>

<p><lorem/></p>
<verse>
    <p>
    <fox/><br/>
    <fox/><br/>
    <fox/><br/>
    <fox/>
    </p>

    <p>
    <fox/><br/>
    <fox/><br/>
    <fox/><br/>
    <fox/>
    </p>

    <p>
    <fox/><br/>
    <fox/><br/>
    <fox/><br/>
    <fox/>
    </p>
</verse>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Quote environments</h1>

<p><lorem/></p>
<quote>
<p><lorem/></p>
</quote>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Mathtex blocks</h1>

<p><lorem/></p>
<mathtexblk>
x = \frac{a^2 + \sqrt{a^2 + b^2}}{1+y^2}
</mathtexblk>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Presentation Mathml blocks</h1>

<p><lorem/></p>
<mathmlblk>
<math>
    <mrow>
        <mi>x</mi>
        <mo>=</mo>
        <mfrac>
            <mrow>
                <mo form="prefix">&minus;</mo>
                <mi>b</mi>
                <mo>&PlusMinus;</mo>
                <msqrt>
                    <msup>
                        <mi>b</mi>
                        <mn>2</mn>
                    </msup>
                    <mo>&minus;</mo>
                    <mn>4</mn>
                    <mo>&InvisibleTimes;</mo>
                    <mi>a</mi>
                    <mo>&InvisibleTimes;</mo>
                    <mi>c</mi>
                </msqrt>
            </mrow>
            <mrow>
                <mn>2</mn>
                <mo>&InvisibleTimes;</mo>
                <mi>a</mi>
            </mrow>
        </mfrac>
    </mrow>
</math>
</mathmlblk>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Content Mathml blocks</h1>

<p><lorem/></p>
<mathmlblk>
<math>
<apply><in/>
<ci>x</ci>
<set>
<apply><divide/>
<apply><plus/>
<apply><minus/>
<ci>b</ci>
</apply>
<apply><root/>
<apply><minus/>
<apply><power/>
<ci>b</ci>
<cn>2</cn>
</apply>
<apply><times/>
<cn>4</cn>
<ci>a</ci>
<ci>c</ci>
</apply>
</apply>
</apply>
</apply>
<apply><times/>
<cn>2</cn>
<ci>a</ci>
</apply>
</apply>
<apply><divide/>
<apply><minus/>
<apply><minus/>
<ci>b</ci>
</apply>
<apply><root/>
<apply><minus/>
<apply><power/>
<ci>b</ci>
<cn>2</cn>
</apply>
<apply><times/>
<cn>4</cn>
<ci>a</ci>
<ci>c</ci>
</apply>
</apply>
</apply>
</apply>
<apply><times/>
<cn>2</cn>
<ci>a</ci>
</apply>
</apply>
</set>
</apply>
</math>
</mathmlblk>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Source environments</h1>

<p><lorem/></p>
<source style="lang=caml">
type 'a tree =
    | Leaf
    | Node of 'a * 'a tree * 'a tree

let rec count = function
    | Leaf                     -> 0
    | Node (node, left, right) -> 1 + (count left) + (count right);;
</source>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Tabular environments</h1>

<p><lorem/></p>
<tabular style="cols=cccc">
<thead>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
</thead>
<tbody>
    <tr>
        <td>One</td>
        <td>Two</td>
        <td>Three</td>
        <td>Four</td>
    </tr>
</tbody>
<tbody>
    <tr>
        <td>Um</td>
        <td>Dois</td>
        <td>TrÃªs</td>
        <td>Quatro</td>
    </tr>
</tbody>
<tbody>
    <tr>
        <td>Alpha</td>
        <td>Beta</td>
        <td>Gamma</td>
        <td>Delta</td>
    </tr>
</tbody>
<tbody>
    <tr>
        <td>Alpha</td>
        <td>Bravo</td>
        <td>Charlie</td>
        <td>Delta</td>
    </tr>
</tbody>
</tabular>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Subpages</h1>

<p><lorem/></p>
<subpage>
    <h1 order="">Title in subpage</h1>
    <p><lorem/></p>
</subpage>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Verbatim environments</h1>

<p><lorem/></p>
<pre>
       -------
       |  A  |
       -------
          |
          |
          |
         / \
        /   \
       /     \
      /       \
     /         \
    /           \
-------       -------
|  A  |       |  C  |
-------       -------
</pre>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Pictures</h1>

<p><lorem/></p>
<picture src="circle-small.png" alt="Small Circle"/>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Pull-quotes</h1>

<p><lorem/></p>
<pull>
    <dd><short/></dd>
</pull>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Custom boxout environments</h1>

<newboxout name="warning">Warning</newboxout>

<newboxout name="tip" counter="tip">Tip</newboxout>

<p><lorem/></p>
<warning>
    <dd><lorem/></dd>
</warning>
<p><lorem/></p>
<tip label="tip:one">
    <dt>This is a title</dt>
    <dd><lorem/></dd>
</tip>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Custom theorem environments</h1>

<newtheorem name="theorem" counter="thm">Thereom</newtheorem>

<p><lorem/></p>
<theorem>
    <dd><lorem/></dd>
</theorem>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Equation wrapper</h1>

<p><lorem/></p>
<equation>
    <mathtexblk>
    x = \frac{a^2 + \sqrt{a^2 + b^2}}{1+y^2}
    </mathtexblk>
    <caption><short/></caption>
</equation>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Printout wrapper</h1>

<p><lorem/></p>
<printout>
<source style="lang=caml">
type 'a tree =
    | Leaf
    | Node of 'a * 'a tree * 'a tree

let rec count = function
    | Leaf                     -> 0
    | Node (node, left, right) -> 1 + (count left) + (count right);;
</source>
<caption><short/></caption>
</printout>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Table wrapper</h1>

<p><lorem/></p>
<table>
    <tabular style="cols=cccc">
    <thead>
        <tr>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="cell=2l">One</td>
            <td>Three</td>
            <td>Four</td>
        </tr>
    </tbody>
    </tabular>
    <caption><short/></caption>
</table>
<p><lorem/></p>


<!-- ****************************************************************** -->
<h1>Figure wrapper</h1>

<p><lorem/></p>
<figure>
    <picture src="circle-small.png" alt="Small Circle"/>
    <caption><short/></caption>
</figure>
<p><lorem/></p>


<!-- ****************************************************************** -->
<part order="">Sectioning</part>

<h1 label="sec:intro">Level 1 section</h1>
<p><lorem/></p>

<h2>Level 2 section</h2>
<p><lorem/></p>

<h3>Level 3 section</h3>
<p><lorem/></p>

<h4>Level 4 section</h4>
<p><lorem/></p>

<h5>Level 5 section</h5>
<p><lorem/></p>

<h6>Level 6 section</h6>
<p><lorem/></p>


<!-- ****************************************************************** -->
<part order="">Backmatter</part>


<!-- ****************************************************************** -->
<bibliography/>

<lbib label="bib:one">
    <who>John McAuthor</who>
    <what>Title of the article</what>
    <where><a href="http://en.wikipedia.org/"/></where>
</lbib>

<lbib label="bib:two">
    <who>John McAuthor</who>
    <what>Title of the article</what>
    <where><a href="http://en.wikipedia.org/"/></where>
</lbib>

<lbib label="bib:three">
    <who>John McAuthor</who>
    <what>Title of the article</what>
    <where><a href="http://en.wikipedia.org/"/></where>
</lbib>

<sbib><a href="http://ocaml.org/"/></sbib>


<!-- ****************************************************************** -->
<notes/>

<note label="note:one">
<p><lorem/></p>
</note>

<note label="note:two">
<p><lorem/></p>
</note>

<note label="note:three">
<p><lorem/></p>
</note>

</doc>

