<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m11216">
  <name>Example module for use of cnxml/mathml tags</name>
  <metadata>
  <md:version>1.3</md:version>
  <md:created>2003/05/23</md:created>
  <md:revised>2003/06/03 12:34:02.581 GMT-5</md:revised>
  <md:authorlist>
    <md:author id="charlet">
      <md:firstname>Charlet</md:firstname>
      
      <md:surname>Reedstrom</md:surname>
      <md:email>charlet@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="charlet">
      <md:firstname>Charlet</md:firstname>
      
      <md:surname>Reedstrom</md:surname>
      <md:email>charlet@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>cnxml</md:keyword>
    <md:keyword>mathml</md:keyword>
  </md:keywordlist>

  <md:abstract/>
</metadata>

  <content>
    <para id="intro">
      A paragraph is the place for text.  You can
      <emphasis>also</emphasis> include <term src="#vocterm">vocabulary terms</term>.  <note type="note">Do
      not use <code>&lt;emphasis&gt;</code> for vocabulary
      terms.</note> There are two ways to present definitions - using
      the glossary to define the term as above or using the
      <code>definition</code> tag within the text.

      <definition id="problem">
	<term>problem</term>
	<meaning>
	  a question raised for inquiry, consideration, or solution; a
	  proposition in mathematics or physics stating something to
	  be done
	</meaning>
	<meaning>
	  an intricate unsettled question; a source of perplexity,
	  distress, or vexation; difficulty in understanding or
	  accepting </meaning>
	<seealso>
	  <term>enigma</term>
	  <term>puzzle</term>
	</seealso>
      </definition>
    </para>

    <section id="section1">
      <name>Section Name</name>
      <para id="para1">
	A document can have sections, however they are
	<emphasis>not</emphasis> required.
      </para>
      <section id="subsection1">
	<name>Subsection Name</name>
	<para id="para2">
	  Sections can have subsections.  You can include quotes in
	  paragraphs.  <quote type="block"> The seasons alter:
	  hoary-headed frosts Fall in the fresh lap of the crimson
	  rose, And on old Hiems thin and icy crown An odorous chaplet
	  of sweet summer buds Is, as in mockery, set. The spring, the
	  summer, The childing autumn, angry winter, change Their
	  wonted liveries, and the mazed world, By their increase, now
	  knows not which is which.  <cite src="#shakespeare">William
	  Shakespeare; A Midsummer Night's Dream</cite>
	  </quote>

	  You can also denote words from another language,
	  such as biological genus and species,
	  <foreign>E.coli</foreign>, or the southern German greeting,
	  <foreign>Grüß Gott</foreign>.
	</para>

	<para id="para2a">
	  Paragraphs can contain many other tags such as lists and
	  figures.  <cnxn target="fig1"/> shows how a figure will
	  display in our system.

	  <figure id="fig1">
	    <name>Optional Figure Name</name>
	    <media type="image/png" src="distributed.png"/>
	    <caption>
	      The caption of the figure would be here.
	    </caption>
	  </figure>

	  There are four different options for list.  One type of list
	  is a <code type="inline">named-item</code> list.  
	  <list id="list1" type="named-item">
	    <name>List name</name>
	    <item>
	      <name>first name</name>
	      description of first item
	    </item>
	    <item>
	      <name>second name</name>
	      description of second item
	    </item>
	    <item>
	      <name>third name</name>
	      description of third item
	    </item>
	    <item>
	      <name>fourth name</name>
	      description of fourth item
	    </item>
	  </list>
	  See the <link src="http://cnx.rice.edu/cnxml/0.5/spec/">CNXML-0.5
	  Spec</link> for more information regarding list types.
	</para>
	<example id="ex1">
	  <name>Optional Name of Example</name>
	  <para id="examplepara">
	    Here is where you would put an example that relates to
	    what the previous paragraphs were discussing.  In an
	    example, you can include any tags that are allowed in any
	    other paragraph including tables (see <cnxn target="tab1"/>).

	    <table frame="all" id="tab1">
	      <name>Temperatures in 5 cities on 11/16/2002 </name>
	      <tgroup cols="3" align="left" colsep="1" rowsep="1">
		<thead>
		  <row>
		    <entry>City</entry>
		    <entry>Degrees Fahrenheit</entry>
		    <entry>Degrees Centigrade </entry>
		  </row>
		</thead>
		<tfoot>
		  <row>
		    <entry>Mean</entry>
		    <entry>54.000</entry>
		    <entry>12.22</entry>
		  </row>
		  <row>
		    <entry>Median </entry>
		    <entry>54.000</entry>
		    <entry>12.22</entry>
		  </row>
		  <row>
		    <entry>Variance</entry>
		    <entry>330.00 </entry>
		    <entry>18.166 </entry>
		  </row>
		  <row>
		    <entry>SD</entry>
		    <entry>101.852 </entry>
		    <entry>10.092 </entry>
		  </row>
		</tfoot>
		<tbody>
		  <row>
		    <entry>Houston</entry>
		    <entry>54</entry>
		    <entry>12.22</entry>
		  </row>
		  <row>
		    <entry>Chicago</entry>
		    <entry>37</entry>
		    <entry>2.78</entry>
		  </row>
		  <row>
		    <entry>Minneapolis</entry>
		    <entry>31</entry>
		    <entry>-0.56</entry>
		  </row>
		  <row>
		    <entry>Miami</entry>
		    <entry>78</entry>
		    <entry>25.56</entry>
		  </row>
		  <row>
		    <entry>Phoenix </entry>
		    <entry>70</entry>
		    <entry>21.11</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </table>
	    In the connexions system, it is important to use
	    <code>frame="all"</code> with the <code>table</code> tag
	    and <code>colsep="1" rowsep="1"</code> with the
	    <code>tbody</code> tag to properly display the table in
	    the print system.
	  </para>
	</example>
      </section>
    </section>

    <para id="para4">
      If you would like a block of material to display exactly as you
      type it, you can use <code>&lt;code type='block'&gt;</code>; as
      you would when discussing computer programming.
      <code type="block"><![CDATA[
         >> syms t
         >> laplace(exp(t))
         ans = 1/(s-1)
         >> laplace(t*exp(-t))
         ans = 1/(s+1>^2
        ]]></code>
    </para>

    <para id="para3">
      You can also include math in your document.  Math can be
      displayed in three ways in our system: inline, block, or
      numbered equations.  Here are examples of an inline variable,
      <m:math><m:ci>x</m:ci></m:math>, and an inline equation,
      <m:math>
	<m:apply>
	  <m:lt/>
	  <m:cn>0</m:cn>
	  <m:ci>x</m:ci>
	  <m:pi/>
	</m:apply>
      </m:math>.  Math that you want set apart from the text can be
      numbered when in an equation tag or simply set apart.

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:limit/>
	    <m:bvar><m:ci>n</m:ci></m:bvar>
	    <m:lowlimit>
	      <m:infinity/>
	    </m:lowlimit>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#norm"/>
	      <m:apply>
		<m:minus/>
		<m:ci><m:msub>
		    <m:mi>x</m:mi>
		    <m:mi>n</m:mi>
		  </m:msub></m:ci>
		<m:ci>x</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:cn>0</m:cn>
	</m:apply>
      </m:math>

      <equation id="eqn1">
	<name>optional equation name</name>
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">P</m:ci>
	      <m:ci>f</m:ci>
	    </m:apply>

	    <m:apply>
	      <m:int/>
	      <m:bvar>
		<m:ci>t</m:ci>
	      </m:bvar>
	      <m:lowlimit>
		<m:apply>
		  <m:minus/>
		  <m:infinity/>
		</m:apply>
	      </m:lowlimit>
	      <m:uplimit>
		<m:infinity/>
	      </m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn">p</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>f</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>

	    <m:apply>
	      <m:int/>
	      <m:bvar>
		<m:ci>t</m:ci>
	      </m:bvar>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:uplimit>
		<m:ci>Δ</m:ci>
	      </m:uplimit>
	      <m:apply>
		<m:exp/>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>

	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/> 
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>f</m:ci>
		      <m:ci>Δ</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:cn>1</m:cn>
	      </m:apply>
	    </m:apply>

	  </m:apply>
	</m:math>
      </equation>
      See our discussion of <cnxn document="m9008">Content
      MathML</cnxn> for a more basic discussion of math.  See also our
      <link src="http://bunker.ece.rice.edu:8080/mntb/wikis/mathml/CSymbol">MathML
      Extensions page</link> for more <code>csymbol</code> options.
    </para>

    <rule id="t1" type="theorem">
      <name>Pythagorean Theorem</name>
      <statement>
	<para id="pt1">
	  For a right triangle with legs
	  <m:math><m:ci>a</m:ci></m:math> and
	  <m:math><m:ci>b</m:ci></m:math> and hypotenuse
	  <m:math><m:ci>c</m:ci></m:math>,
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:power/>
		  <m:ci>a</m:ci>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:power/>
		  <m:ci>b</m:ci>
		  <m:cn>2</m:cn>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:power/>
		<m:ci>c</m:ci>
		<m:cn>2</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</para>
      </statement>
      <proof>
	<para id="pt2">
	  The proof would go here.
	</para>
      </proof>
    </rule>

    <exercise id="exercise1">
      <problem>
	<para id="exercise1p">
	  What is a composite number?
	</para>
      </problem>
      <solution>
	<para id="exercise1s">
	  A composite number <m:math><m:ci>n</m:ci></m:math> is a
	  positive integer,
	  <m:math>
	    <m:apply>
	      <m:gt/>
	      <m:ci>n</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>, which is not prime.
	</para>
      </solution>
    </exercise>
  </content>

  <glossary>
    <definition id="vocterm">
      <term>vocabulary term</term>
      <meaning>
	A word or phrase being defined in the text.  A more complete
	definition with an example could be placed here in the
	glossary.
      </meaning>
    </definition>
  </glossary>

  <bib:file>
    <bib:entry id="shakespeare">
      <bib:incollection>
	<bib:author>William Shakespeare</bib:author>
	<bib:title>A Midsummer Night's Dream</bib:title>
	<bib:booktitle>William Shakespeare: The Complete Works</bib:booktitle>
	<bib:publisher>The Viking Press</bib:publisher>
	<bib:year>1969</bib:year>
	<bib:editor>Alfred Harbage</bib:editor>
	<bib:chapter>2.1</bib:chapter>
	<bib:pages>lines 107-114</bib:pages>
      </bib:incollection>
    </bib:entry>
  </bib:file>
  
</document>
