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, etc., 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='pythag-rule'>
  <title>Pythagorean Theorem</title>
  <statement id='pythag-statement'>
    <para id='pythag-para1'>
      On a right triangle, the sum of the squares of 
      the sides equals the square of the hypotenuse.
    </para>
  </statement>
  <proof id='pythag-proof'>
    <para id='pythag-para2'>
      Your favorite proof goes here.
    </para>
  </proof>
  <example id="pythag-example">
    <para id='pythag-para3'>
      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 label tag. Next, it may contain an optional title 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?)

content, section, preformat, para, quote, footnote, note, item, example, problem, solution, commentary, meaning, statement, proof, entry
Close this window