Close this window

Using the <rule> tag

Description The rule tag defines any type of "rule," such as a theorem, axiom, lemma, rule of thumb, and so on that is presented as a statement optionally accompanied by a proof or examples. This tag is especially useful for mathematical texts.
Example
This CNXML:
<rule type='theorem' id='ruleexcode'>
  <name>Pythagorean Theorem</name>
  <statement>
    <para id='ruleexp1'>
      On a right triangle, the sum of the 
      squares of the sides equals the square 
      of the hypotenuse.
    </para>
  </statement>
  <proof>
    <para id='ruleexp2'>
      Your favorite proof goes here.
    </para>
  </proof>
  <example>
    <para id='ruleexp3'>
      Take a right triangle whose sides are 
      of length 3, 4, and 5.  In this case 
      the sum of the square of the two 
      shorter sides is 9+16=25.  The square 
      of the hypotenuse is 25.  So the 
      theorem holds.
    </para>
  </example>
</rule> 
	
Results in this display:
theorem 1: Pythagorean Theorem
On a right triangle, the sum of the squares of the sides equals the square of the hypotenuse.
Proof
Your favorite proof goes here.
Example
Take a right triangle whose sides are of length 3, 4, and 5. In this case the sum of the square of the two shorter sides is 9+16=25. The square of the hypotenuse is 25. So the theorem holds.
Attributes (what's this?)
Children (what's this?)First, rule may contain an optional name tag. Next, it must contain one or more statement tags. Finally, rule may contain zero or more proof tags and zero or more example tags in any order.
Parents (what's this?)para, content, section, example, meaning, proof, statement, problem, solution
Close this window