Close this window

# Using the <equation> tag

## Description

The `equation` tag is used to set off equations in CNXML documents by using the Math Mark-up Language (MathML) or embedded media to display math.

## Note:

You are strongly encouraged to use `equation` with Content MathML tags when you want to display mathematical formulas or equations in your CNXML document.

## Example

This CNXML:

``````
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:plus/>
<m:cn>1</m:cn>
<m:cn>2</m:cn>
</m:apply>
<m:cn>3</m:cn>
</m:apply>
</m:math>
</equation>
``````

Results in this display:

$1+2=3$ (1)

## Example

This CNXML:

``````
1 + 2 = 3
</equation>
``````

Results in this display:

1 + 2 = 3 (2)

## Attributes(what's this?)

• type (optional): Defines the type of equation in order to give specialized control over numbering. Equations of the same type are numbered in series (i.e., Equation (1), Equation (2)...). Type can be used in conjunction with label so that equations of each user-defined type appear with their own label. Type can be any user-defined value that reflects the purpose of the equation.
• id (required): A unique identifier, whose value must begin with a letter and contain only letters, numbers, hyphens, underscores, colons, and/or periods (no spaces).

## Children(what's this?)

First, `equation` may contain an optional label tag. Next, it may contain an optional title tag. Finally, `equation` must contain either media, MathML, or Unicode Text.

## Parents(what's this?)

Close this window