<equation-inline>

The <equation-inline> element represents an equation that is presented inline within a paragraph or similar context.

Usage information

Inline equations are not intended to be numbered.

When an <equation-inline> element has multiple direct child elements, each child represents an alternative form of the equation.

Processing expectations

When there are multiple forms of an equation, processors can choose the form or forms that they render. For example, if there is both an image and MathML markup, an HTML-generating processor could generate both the image reference and the MathML with appropriate HTML @class or @id values to enable dynamic rendering that is based on browser capability.

Specialization hierarchy

The <equation-inline> element is specialized from <ph>. It is defined in the equation domain module.

Attributes

The following attributes are available on this element: universal attributes and @keyref.

The following attributes are available on this element: universal attributes and the attributes defined below.

@keyref
Specifies a key name that acts as a redirectable reference based on a key definition within a map. See STUB CONTENT for information on using this attribute.

For HDITA, the equivalent of @keyref is @data-keyref

Examples

This section is non-normative.

This section contains examples of how the <equation-inline> element can be used.

Example 1. An inline equation

The following code sample shows how a paragraph can contain an <equation-inline> element that holds MathML markup:

<p>Consider the following equation:
  <equation-inline>
    <mathml>
      <m:math display='inline'>
        <m:semantics>
          <m:mrow>
            <m:msqrt>
              <m:mrow>
                <m:msup><m:mi>a</m:mi><m:mn>2</m:mn></m:msup>
                <m:mo>+</m:mo>
                <m:msup><m:mi>b</m:mi><m:mn>2</m:mn></m:msup>
              </m:mrow>
            </m:msqrt>        
          </m:mrow>
        </m:semantics>
      </m:math>
    </mathml>
  </equation-inline>
It is simple arithmetic that school children understand.</p>
Example 2. An inline equation that is image-based

The following code sample shows how the <equation-inline> element can contain an image:

<p>The Pythagorean Theorem describes the relationship among the three sides of a 
   right triangle. In any right triangle, the sum of the areas of the squares formed on the 
   legs of the triangle equals the area of the square formed on the hypotenuse:
  <equation-inline>
    <image keyref="equation-image-01">
      <alt>a squared plus b squared.</alt>
    </image>
  </equation-inline>
</p>