OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Action: Define markup for equations, add mathmlref to mathml


I have worked up a markup design for equations and have added <mathmlref> to
the <mathml> element. I've implemented the DTD and RNG declarations.

For <mathmlref> I've defined a specialization of <xref>. I've defined it as
being a reference to a <m:math> element, either implicitly as the root of
the referenced XML document or by ID within a larger non-DITA XML document
(note that you can use normal conref with <mathml> so only non-DITA XML case
is useful for <mathmlref>).

For equation markup, I've defined a new domain, equationDomain, that defines
three element types:

<equation-inline> : Specializes from <ph> and allows all <ph> content
(because the equation content can take any form).

<equation-block> : Specializes from <p> and likewise allows all <p> content.

<equation-display> : Specializes from <fig> and allows all <fig> content.
The documentation for this element says that it can use <mathml> directly if
the only content other than the title or description is the <mathml>
element.

One question: should I prepare a separate proposal for the equation domain
or add it to the existing MathML proposal (13111)?

Cheers,

E.

Here is a sample document:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic SYSTEM "topic-with-mathml.dtd">
<topic
  id="dtd-math-topic">
  <title>Topic with DTD-Based MathML Domain</title>
  <body>
    <fig>
      <title>Inline Equation markup</title>
      <p>Text before the equation <equation-inline> <mathml>
        <m:math>
          <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> text after the equation.</p>
    </fig>
    <fig>
      <title>Block Equation markup</title>
      <p>Para before the equation</p>
      <equation-block> <mathml>
        <m:math>
          <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-block>
      <p>Para after the equation.</p>
    </fig>
    <p>Display equation with directly-referenced &lt;mathml&gt; element:</p>
    <equation-display>
      <title>Equation Title</title>
      <desc>Equation description</desc>
      <mathml>
        <m:math
          display="block">
          <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-display>
    <p>Display equation with nested equation elements:</p>
    <equation-display>
      <title>Equation Title</title>
      <desc>Equation description</desc>
      <equation-block>
        <mathml>
        <m:math>
          <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-block>
      <p>And here is that equation again:</p>
      <equation-block>
        <mathml>
          <m:math>
            <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-block>
    </equation-display>
    <fig>
      <title>Equation with non-MathML Content</title>
      <p>Suppose a x^2+b x+c=0 and a!=0. We first divide by \a to get
x^2+b/a
        x+c/a=0.</p>
      <p>See <xref
        href="http://www.wjagray.co.uk/maths/ASCIIMathMLinfo.html";
        format="html"
        
scope="external">http://www.wjagray.co.uk/maths/ASCIIMathMLinfo.html</xref>.
</p>
    </fig>
  </body>
</topic>


-- 
Eliot Kimber
Senior Solutions Architect, RSI Content Solutions
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
www.rsicms.com
www.rsuitecms.com
Book: DITA For Practitioners, from XML Press,
http://xmlpress.net/publications/dita/practitioners-1/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]