<?xml version="1.0" encoding="iso-8859-1"?>
<!--
<!DOCTYPE html PUBLIC "W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" [
<!ENTITY % MATHML.prefixed "IGNORE" >
]> 
-->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/><title>Guidelines for Graphics in MathML 2</title><style type="text/css">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

li p           { margin-top: 0.3em;
                 margin-bottom: 0.3em; }

div.exampleInner pre { margin-left: 1em;
                       margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}
</style><link type="text/css" rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/base.css"/></head><body><div class="head">
<h1><a id="title"/>Guidelines for Graphics in MathML 2</h1>
<h2><a id="w3c-doctype"/>W3C Note 01 July 2003</h2><dl><dt>This version:</dt><dd><a href="types.xml">http://www.w3.org/Math/Documents/Notes/aphics/graphics.xml</a></dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/Math/Documents/Notes/graphics.xml">http://www.w3.org/Math/Documents/Notes/graphics.xml</a></dd><dt>Previous version:</dt><dd><a href="unknown">none</a></dd><dt>Editors:</dt><dd>Michael Kohlhase, Carnegie Mellon University <a href="mailto:kohlhase+@cs.cmu.edu">&lt;kohlhase+@cs.cmu.edu&gt;</a></dd><dd>David Carlisle, NAG <a href="mailto:davidc@nag.co.uk">&lt;davidc@nag.co.uk&gt;</a></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2003 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a> rules apply.</p></div><hr/><div>
<h2><a id="abstract"/>Abstract</h2><p>In this note, we will develop guidelines for the integration of graphics
	in MathML2 <a href="#MathML2">[MathML2]</a>. We will frame much of the discussion
	of the extended use of
	MathML in SVG and SVG in MathML, and discuss current tool support. We will
	discuss some use cases for mathematics with diagrams. We will close with
	some general remarks about mixing namespaces in XML.</p></div><div>
<h2><a id="status"/>Status of this Document</h2><p><strong>This document is an editors' copy that has
        no official standing.</strong></p><p>
	<em> This section describes the status of this document at the
	  time of its publication.  Other documents may supersede this document.
	  The latest status of this document series 
	  is maintained at the W3C.
	</em>
      </p><p>This an early draft for the MathML Working Group. Please report errors in
      this document to <a href="mailto:www-math@w3.org">www-math@w3.org</a>.</p></div><div class="toc">
<h2><a id="contents"/>Table of Contents</h2><p class="toc">1 <a href="#intro">Introduction</a><br/>
2 <a href="#math-in-svg">Mathematical Formulae in Diagrams</a><br/>
    2.1 <a href="#math-in-svg-cases">Use Cases</a><br/>
    2.2 <a href="#mathml-in-svg-guidelines">Guidelines</a><br/>
    2.3 <a href="#mathml-in-svg-implementation">Implementation Issues</a><br/>
3 <a href="#svg-in-math">Diagrams as Sub-Formulae</a><br/>
    3.1 <a href="#svg-in-math-cases">Use Cases</a><br/>
    3.2 <a href="#svg-in-mathml-guidelines">Guidelines</a><br/>
    3.3 <a href="#svg-in-mathml-implementation">Implementation Issues</a><br/>
4 <a href="#embellishments">Non-Hierarchical Mixing of Formulae and Graphics</a><br/>
    4.1 <a href="#embellishments-cases">Use Cases</a><br/>
    4.2 <a href="#mixed-implementation">(Lack of) Guidelines and
	  Implementations</a><br/>
5 <a href="#concl">Conclusions</a><br/>
</p>
<h3><a id="appendices"/>Appendices</h3><p class="toc">A <a href="#examples">Listings for the Examples</a><br/>
    A.1 <a href="#comm-ex">The commutative diagram</a><br/>
    A.2 <a href="#N4001DD">Ebellished Formulae</a><br/>
B <a href="#N400222">Bibliography</a><br/>
</p></div><hr/><div class="body"><div class="div1">
<h2><a id="intro"/>1 Introduction</h2><p>A distinguishing feature of mathematics is the use of a complex and
	highly evolved system of two-dimensional symbolic notations. The MathML
	<a href="#MathML2">[MathML2]</a>	format is the World Wide Web Consortitum's (W3C) answer to the problem of
	the problem of communicating these notations on the web.</p><p>However, MathML does not cover all mathematical practice; due to the
	inherent complexity of the material, mathematicicans
	also make use of various forms of diagrams to visualize their ideas and
	the objects in question. For diagrams, the W3C provides the Scalable
	Vector Graphics (SVG) format <a href="#SVG1.1">[SVG1.1]</a>.</p><p>In isolation, both MathML and SVG are very successful, they cover the
	respective practice, and are supported in numerous browsers, printer
	drivers, and authoring tools. The W3C has put out a joint DTD and
	Schema <a href="#XHTML-MathML-SVG">[XHTML-MathML-SVG]</a> for a modular integration of MathML 
	and SVG into XHTML.</p><p>Unfortuntaely, this is not enough to cover mathematical practice. Since
	the diagrams are about mathematical objects, they can contain mathematical
	formulae, and since diagrams are sometimes used to communicate
	mathemtatical objects they can occur inside mathematical formulae. This
	practice, requires a mixing of MathML and SVG, which is not explicitly
	supported by the existing recommendations. Moreover, this extended use of
	MathML and SVG is only marginally covered by existing
	implementations. </p><p>Currently, the only document markup system that can combine mathematics
	with diagrams is the TeX/LaTeX suite of programs. In this note we will
	develop guidelines for the extended use of mixing
	MathML and SVG, and discuss current tool support based practical cases
	where graphics and mathematical notation
	are mixed. These will serve as the basis for the discussion in the next
	section. We can distinguish three cases:
	</p><ul><li><p> mathematical formulae integrated into some sort of
	      diagram or drawing (section <a href="#math-in-svg"><b>2 Mathematical Formulae in Diagrams</b></a>),</p></li><li><p> some kind of  drawing or diagram inside mathematical formulae, e.g. instead
	      of a sub-formula, or as a presentational device (see section
	      <a href="#svg-in-math"><b>3 Diagrams as Sub-Formulae</b></a>).
	    </p></li><li><p>non-hierarchic mixing of formulae and graphics (see
	      section <a href="#embellishments"><b>4 Non-Hierarchical Mixing of Formulae and Graphics</b></a>).</p></li></ul><p>
	As we will see, the first two can be solved by interpretations of the
	current recommentations, while the third one is problematic. We will close
	with some general remarks about mixing namespaces in XML.</p></div><div class="div1">
<h2><a id="math-in-svg"/>2 Mathematical Formulae in Diagrams</h2><div class="div2">
<h3><a id="math-in-svg-cases"/>2.1 Use Cases</h3><p>We start out with the case, where Mathematical formulae are integrated
	into some kind of drawing or diagram. This is a very common case in the STEM
	(Science, Technology, Engineering, and Mathematics Literature.</p><p>Let us consider the two examples below. The left diagram is a
	  commutative diagrams, such
	  diagrams are used in mathematics to visualize and argue about
	  complex configurations of sets and mappings. The right diagram is a
	  tree-representation of an analytical tableau.</p><p><img src="comm3.jpg" alt=""/><img src="tree.jpg" alt=""/></p><p>In both cases, mathematical formalae are confined to boxes, without
	  overlap to the graphical structures in the diagram.</p></div><div class="div2">
<h3><a id="mathml-in-svg-guidelines"/>2.2 Guidelines</h3><p> The XHTML + MathML + SVG Profile  <a href="#XHTML-MathML-SVG">[XHTML-MathML-SVG]</a> allows to
	  embed MathML into SVG inside the <code>foreignobject</code>
	  element. Consider the following example (adapted for MathML content from the SVG 1.1
	  recommendation <a href="#SVG1.1">[SVG1.1]</a>).</p><div class="exampleInner"><pre>&lt;?xml version="1.0" standalone="yes"?&gt;
&lt;svg width="4in" height="3in" version="1.1" xmlns = 'http://www.w3.org/2000/svg'&gt;
  &lt;desc&gt;This example uses the 'switch' element to provide a 
        fallback graphical representation of an paragraph, if 
        MathML is not supported.&lt;/desc&gt;
  &lt;!-- The 'switch' element will process the first child element
       whose testing attributes evaluate to true.--&gt;
  &lt;switch&gt;

    &lt;!-- Process the embedded MathML if the requiredExtensions attribute
         evaluates to true (i.e., the user agent supports MathML embedded within SVG). --&gt;
    &lt;foreignObject width="100" height="50"
                   requiredExtensions="xmlns="http://www.w3.org/1998/Math/MathML"&gt;
      &lt;!-- MathML content goes here --&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML&gt;
	&lt;mfrac&gt;
	  &lt;mn&gt; 1 &lt;/mn&gt;
	  &lt;mrow&gt;
	    &lt;msup&gt;&lt;mi&gt; x &lt;/mi&gt;&lt;mn&gt; 3 &lt;/mn&gt;&lt;/msup&gt;
	    &lt;mo&gt; + &lt;/mo&gt;
	    &lt;mfrac&gt;&lt;mi&gt; x &lt;/mi&gt;&lt;mn&gt; 3 &lt;/mn&gt;&lt;/mfrac&gt;
	  &lt;/mrow&gt;
	&lt;/mfrac&gt;
      &lt;/math&gt;
    &lt;/foreignObject&gt;

    &lt;!-- Else, process the following alternate SVG. --&gt;
    &lt;text font-size="10" font-family="italic"&gt;
      &lt;tspan x="10" y="10"&gt;1/(x^3+(x/3))&lt;/tspan&gt;
    &lt;/text&gt;
  &lt;/switch&gt;
&lt;/svg&gt;</pre></div><p>Note that the <code>width</code> and <code>height</code> attributes on the
  <code>foreignObject</code> are required, which may pose a problem for embedded
  MathML objects, which scale by different mechanisms than diagrams (glyphs
  re-sizing does not always conserve aspect ratio),</p></div><div class="div2">
<h3><a id="mathml-in-svg-implementation"/>2.3 Implementation Issues</h3><table border="1" summary="Editorial note: MiKo"><tr><td style="width: 50%" valign="top" align="left"><b>Editorial note: MiKo</b></td><td style="width: 50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">Need to talk about implementations should mention
	    Lavirotte's MathML to SVG  converter, David's stylesheet approach, 	    etc. 
	    AMAYA can already do it, maybe a MathML+SVG-enabled Mozilla as well (I
	    have not found one).
	</td></tr></table></div></div><div class="div1">
<h2><a id="svg-in-math"/>3 Diagrams as Sub-Formulae</h2><p>In this section discuss the case of diagrams or images inside of
	  mathematical formulae. We will looke at some use cases and the give
	  guidelines to accomodate diagrams and images in MathML
	  representations.</p><div class="div2">
<h3><a id="svg-in-math-cases"/>3.1 Use Cases</h3><p>Let us look at some example of images or diagrams inside mathematical
	    formulae.  Since MathML supplies the <code>mglyph</code> element, the
	  question we have to ask ourselves in all of these cases, whether the
	  diagram is not really a specialized glyph</p><p>Even though the use of diagrams or images inside of mathematical formulae is
	    relatively rare in published mathematics (an exception seems to be slide
	    presentations or other educational material), such cases do exist, e.g. in
	    <a href="http://www-cs-faculty.stanford.edu/~knuth/gkp.html">Graham, Knuth,
	      Patashnik: Concrete Mathematics</a>, where the authors use the first
	    formula below  to talk about the probabilities of
	    certain events involing dice and the second one for theories about the
	    number of ways to pay a certain amount using a variety of coins.</p><p><img src="dice.jpg" alt=""/><img src="dimes.jpg" alt=""/></p><p>In these example, it is somewhat plausible to think that the dice (after all
	    the dice are present Unicode as characters 2680 (1) to 2685 (6). But the coins are
	    not, they could however be integrated into MathML using the <code>mglyph</code>
	    element; The MathML specification has
	    <a href="http://www.w3.org/TR/MathML2/chapter3.html#N9963">this
	      example</a> about braid group notation.</p><p>Later in the book Graham, Knuth, Patashnik talk about tiling rectangles with
	    dominoes, and use the following formulae </p><p><img src="dominos.jpg" alt=""/></p><p>Here the assumption that the complex configurations of dominos are glyphs
	    becomes more implausible, after all, there are infinitely many of the. Consider
	    this formula, to see that the math done with these kinds of diagrams is not
	    restricted to trivial formulae</p><p><img src="dominos2.jpg" alt=""/></p><p>Finally, they use the following formula to reason about graphs.</p><p><img src="graphs.jpg" alt=""/></p></div><div class="div2">
<h3><a id="svg-in-mathml-guidelines"/>3.2 Guidelines</h3><p>The MathML2 specification provides the <code>semantics</code> element for</p><p>"<em>The <code>semantics</code> element is designed to group
		together various sources of information related to a particular
		mathematical object. For example, it is often used to provide both
		a content representation of the object and a 
		presentation.</em>"</p><p>Clearly, the graphical representation of a mathematical object is a
	    "presentation" of the element, so we can use the
	    <code>semantics</code> element as in the following example:
	   </p><div class="exampleInner"><pre>&lt;semantics&gt;
  &lt;csymbol definitionURL="elementary-stats.html#dice-4up"/&gt;
  &lt;annotation-xml encoding="SVG1.1"&gt;
    &lt;svg xmlns="http://www.w3.org/2000/svg" height="137px"&gt;
      &lt;rect stroke="black" fill="none" rx="5px" width="40px" height="40px"/&gt;
      &lt;circle stroke="black" fill="black" cy="30px" cx="30px" r="5px"/&gt;
      &lt;circle stroke="black" fill="black" cy="30px" cx="10px" r="5px"/&gt;
      &lt;circle stroke="black" fill="black" cy="20px" cx="20px" r="5px"/&gt;
      &lt;circle stroke="black" fill="black" cy="10px" cx="30px" r="5px"/&gt;
      &lt;circle stroke="black" fill="black" cy="10px" cx="10px" r="5px"/&gt;
    &lt;/svg&gt;
  &lt;/annotation-xml&gt;
  &lt;annotation encoding="image/jpeg"&gt; copy dice4.jpg here &lt;/annotation&gt;
  &lt;annotation encoding="image/gif" other="dice.gif"/&gt;
&lt;/semantics&gt;</pre></div><div class="issue"><p class="prefix"><a id="linking-external-content"/><b>Issue (linking-external-content):</b></p><p>Do we want to use syntax like this for
    external links? We cannot use <code>definitionURL</code> since it  would
    conflict with the use in the types case. Somewhere in the spec we say that
    semantics is for associating "inline" information, so the use
    here could be inappropriate. But it would sure the convenient, since we
    otherwise have to invent a way to do references here. One way would be to use
    something like 
    </p><div class="exampleInner"><pre>&lt;semantics&gt;
  &lt;csymbol definitionURL="elementary-stats.html#dice-4up"/&gt;
  &lt;annotation-xml encoding="application/xhtml+xml"&gt;&lt;img src="dice.gif"/&gt;&lt;/annotation-xml&gt;
&lt;/semantics&gt;</pre></div><p>but that would be a relatively roundabout way.</p><p class="prefix"><b>Resolution:</b></p><p>None recorded.</p></div><p>The first child of the <code>semantics</code> element is the MathML
    object whith which the additional information is associated, it can be
    a presentation- or content MathML representation. This child is
    mandatory in a <code>semantics</code> element, it can be seen as a fallback
    representation in MathML, if the MathML application processing the
    <code>semantics</code> element cannot process any of the <code>annotation</code> and
    <code>annotation-xml</code> children. In our case, we have chosen to represent the
    dice as a <code>csymbol</code> element, another choice would have been to give
    an alternate text represented in a <code>mtext</code> element.</p></div><div class="div2">
<h3><a id="svg-in-mathml-implementation"/>3.3 Implementation Issues</h3><table border="1" summary="Editorial note: MiKo"><tr><td style="width: 50%" valign="top" align="left"><b>Editorial note: MiKo</b></td><td style="width: 50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">Need to talk about implementations. Again, a MathML to SVG converter
      can handle this (potentially). What about AMAYA, Mozilla? We need a
      worked-out example for this. </td></tr></table></div></div><div class="div1">
<h2><a id="embellishments"/>4 Non-Hierarchical Mixing of Formulae and Graphics</h2><div class="div2">
<h3><a id="embellishments-cases"/>4.1 Use Cases</h3><p>Sometimes Mathematicians want to highlight some properties of formulae by
	  graphical means. Let us look at two examples of diagrammatic
	  embellishments mathematical formulae</p><p><img src="link.jpg" alt=""/><img src="peter.jpg" alt=""/></p><p> In the first diagram, a
	  <math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi>&#955;</mi></math>-term has been been graphically
	  enhanced to make highlight the dependencies of bound variables (by dotted
	  arcs) and the substitution of actual parameters for formal ones (by the
	  solid arcs). In the second example, a formula in Discourse Representation
	  Theory (DRT; the boxes are actually complex formulae here) is internally
	  annotated by an arrow to show a dependency. </p></div><div class="div2">
<h3><a id="mixed-implementation"/>4.2 (Lack of) Guidelines and
	  Implementations</h3><p>In both cases (though more pronounced in the second one), the compound
	  graphics cannot be separated into parts that are "only math"
	  or "only diagram", with disjoint bounding boxes. In fact,
	  document formatting engines like the <code>pstricks</code> package that
	  was used to produce these images make use of the fact that both the math,
	  as well as the diagram parts get converted into the same target format
	  (PostScript in this case) and can be overlayed.</p><table border="1" summary="Editorial note: MiKo"><tr><td style="width: 50%" valign="top" align="left"><b>Editorial note: MiKo</b></td><td style="width: 50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">Again, a MathML to SVG converter
      can handle this (potentially). Need to talk somewhere about why this is not
      desirable. What about AMAYA, Mozilla? We need a  worked-out example for this. </td></tr></table></div></div><div class="div1">
<h2><a id="concl"/>5 Conclusions</h2><p>We have discussed some use-cases for an integration of the images and and MathML
      specifications. Simple mathematical diagrams can already be represented in current
      SVG+MathML applications, but for many relevant classes of mathematical
      diagrams, the state of the art is not sufficient for mathematical
      practice. Currently, the only document markup system that can combine
      mathematics with diagrams is the TeX/LaTeX suite of programs. To make MathML
      (and the W3C languages) a viable alternative for main-stream technical
      publications, we need to develop the mixture of MathML and SVG further,
      alleviating the problems discussed in this note.</p><p>Note that these are only an instance of the more general problem of mixing
      namespaces in general. The hierarchical mixing cases discussed in sections
      <a href="#math-in-svg"><b>2 Mathematical Formulae in Diagrams</b></a> and <a href="#svg-in-math"><b>3 Diagrams as Sub-Formulae</b></a> are relatively
      simple, since the embeddings respect bounding boxes. Presentation agents
      only need to negotiate box sizes, alignment, and flow of control. Moreover,
      nesting depths for namespaces with depth greater than one (e.g. SVG in
      MathML in SVG) seem very rare. But already the very natural mixed 
      case discussed in <a href="#embellishments"><b>4 Non-Hierarchical Mixing of Formulae and Graphics</b></a>, break this hierarchical
      black-box model. In particular, prsentation agents would have to negotiate
      inner coordinates, etc.</p><table border="1" summary="Editorial note: MiKo"><tr><td style="width: 50%" valign="top" align="left"><b>Editorial note: MiKo</b></td><td style="width: 50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">Talk about general Problems of mixing Namespaces in XML</td></tr></table></div></div><div class="back"><div class="div1">
<h2><a id="examples"/>A Listings for the Examples</h2><p>In this appendix we give mixed SVG+MathML listings for the examples. They
      have mostly been adapted from the
      <a href="http://www.w3.org/Amaya/MathMLplusSVG.xml"><cite>ones supplied by
	Vincent Quint</cite></a> for
      <a href="http://www.w3.org/Amaya/"><cite>Amaya</cite></a>.
    </p><div class="div2">
<h3><a id="comm-ex"/>A.1 The commutative diagram</h3><table border="1" summary="Editorial note: MiKo"><tr><td style="width: 50%" valign="top" align="left"><b>Editorial note: MiKo</b></td><td style="width: 50%" valign="top" align="right"> </td></tr><tr><td valign="top" align="left" colspan="2">adapt to the SVG guidelines</td></tr></table><div class="exampleInner"><pre>&lt;svg xmlns="http://www.w3.org/2000/svg" width="10em" height="5.6em"
     style="stroke:black font-family:serif"&gt;
  &lt;defs&gt;&lt;polygon id="ArrowHead" points="0,0 4,0 2,6" transform="translate(-2,-6)"/&gt;&lt;/defs&gt;
  &lt;text x="0" y="1em"&gt;
    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;msub&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;/msub&gt;&lt;/math&gt;
  &lt;/text&gt;
  &lt;text x="2em" y="1em"&gt;
    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
      &lt;msub&gt;&lt;mo&gt;&amp;vdash;&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;R&lt;/mi&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;
    &lt;/math&gt;
  &lt;/text&gt;
  &lt;text x="4em" y="1em"&gt;
    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
      &lt;msubsup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;mo&gt;&amp;prime;&amp;prime;&lt;/mo&gt;&lt;/msubsup&gt;
    &lt;/math&gt;&lt;
    /text&gt;
    &lt;text x="6em" y="1em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msub&gt;&lt;mo&gt;&amp;vdash;&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;R&lt;/mi&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="8em" y="1em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msubsup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;mo&gt;&amp;prime;&lt;/mo&gt;&lt;/msubsup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x=".3em" y="3em" text-anchor="end"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;&amp;omega;&lt;/mi&gt;&lt;/math&gt;
    &lt;/text&gt;
    &lt;text x=".7em" y="3em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="4.3em" y="3em" text-anchor="end"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;&amp;omega;&lt;/mi&gt;&lt;mo&gt;&amp;prime;&amp;prime;&lt;/mo&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="4.7em" y="3em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;mo&gt;&amp;prime;&amp;prime;&lt;/mo&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="8.3em" y="3em" text-anchor="end"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;&amp;omega;&lt;/mi&gt;&lt;mi&gt;&amp;prime;&lt;/mi&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="8.7em" y="3em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;&amp;theta;&lt;/mi&gt;&lt;mi&gt;&amp;prime;&lt;/mi&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="0" y="5em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="2em" y="5em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msub&gt;&lt;mo&gt;&amp;vdash;&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msub&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="4em" y="5em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mo&gt;&amp;prime;&amp;prime;&lt;/mo&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="6em" y="5em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msub&gt;&lt;mo&gt;&amp;vdash;&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;I&lt;/mi&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;text x="8em" y="5em"&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
	&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mi&gt;&amp;prime;&lt;/mi&gt;&lt;/msup&gt;
      &lt;/math&gt;
    &lt;/text&gt;
    &lt;line x1=".5em" y1="1.4em" x2=".5em" y2="4.1em"/&gt;
    &lt;use x=".5em" y="4.1em" xlink:href="#ArrowHead"/&gt;
    &lt;line x1="4.5em" y1="1.4em" x2="4.5em" y2="4.1em"/&gt;
    &lt;use x="4.5em" y="4.1em" xlink:href="#ArrowHead"/&gt;
    &lt;line x1="8.5em" y1="1.4em" x2="8.5em" y2="4.1em"/&gt;
    &lt;use x="8.5em" y="4.1em" xlink:href="#ArrowHead"/&gt;
  &lt;/svg&gt;
   </pre></div></div><div class="div2">
<h3><a id="N4001DD"/>A.2 Ebellished Formulae</h3><p>Let us now consider markup for the
     <math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi>&#955;</mi></math> example in
     <a href="#embellishments-cases"><b>4.1 Use Cases</b></a> here. Vincent Quint has proposed the
     following mixed SVG/MathML markup:</p><div class="exampleInner"><pre>&lt;svg xmlns="http://www.w3.org/2000/svg" width="15.2em"
		     height="45px" style="stroke:black font-family:serif"&gt;
  &lt;text y="22px" x="0"&gt;
    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
      &lt;mrow&gt;
        &lt;mo fence="true"&gt;(&lt;/mo&gt;
        &lt;mi&gt;&amp;lambda;&lt;/mi&gt;
        &lt;mi&gt;x&lt;/mi&gt;
        &lt;mo&gt;.&lt;/mo&gt;
        &lt;mi&gt;f&lt;/mi&gt;
        &lt;mrow&gt;
          &lt;mo fence="true"&gt;(&lt;/mo&gt;
          &lt;mi&gt;x&lt;/mi&gt;
          &lt;mo&gt;,&lt;/mo&gt;
          &lt;mi&gt;f&lt;/mi&gt;
          &lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;
          &lt;mo fence="true"&gt;)&lt;/mo&gt;
        &lt;/mrow&gt;
        &lt;mo fence="true"&gt;)&lt;/mo&gt;
      &lt;/mrow&gt;
      &lt;munder&gt;
        &lt;mrow&gt;
          &lt;mi&gt;g&lt;/mi&gt;
          &lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;
        &lt;/mrow&gt;
        &lt;mo&gt;&amp;UnderBrace;&lt;/mo&gt;
      &lt;/munder&gt;
      &lt;mo&gt;&amp;RightArrow;&lt;/mo&gt;
      &lt;mi&gt;&amp;beta;&lt;/mi&gt;
      &lt;mspace width="0.3em"/&gt;
      &lt;mi&gt;f&lt;/mi&gt;
      &lt;mrow&gt;
        &lt;mo fence="true"&gt;(&lt;/mo&gt;
        &lt;mi&gt;g&lt;/mi&gt;
        &lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;
        &lt;mo&gt;,&lt;/mo&gt;
        &lt;mi&gt;f&lt;/mi&gt;
        &lt;mrow&gt;
          &lt;mo fence="true"&gt;(&lt;/mo&gt;
          &lt;mi&gt;g&lt;/mi&gt;
          &lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;
	  &lt;mo fence="true"&gt;)&lt;/mo&gt;
        &lt;/mrow&gt;
        &lt;mo fence="true"&gt;)&lt;/mo&gt;
      &lt;/mrow&gt;
    &lt;/math&gt;
  &lt;/text&gt;
  &lt;path fill="none" d="M 15,13 C 14,11 20,6 24,7 C 27,7 34,12 34,14"
        style="stroke: #BEBEBE"/&gt;
  &lt;path fill="none"
        d="M 15,13 C 12,9 20,3 24,2 C 29,0 39,2 44,4 C 46,5 54,9 54,12"
        style="stroke: #BEBEBE"/&gt;
  &lt;path fill="none"
        d="M 53,23 C 51,25 54,31 57,33 C 63,37 75,37 82,36 C 84,35 89,32 89,31"/&gt;
  &lt;path fill="none"
        d="M 32,23 C 29,26 36,35 41,38 C 49,43 67,44 77,42 C 81,40 89,35 89,31"/&gt;
&lt;/svg&gt;</pre></div><p> which gives the correct presentation. Note that since this is modeled as
"MathML in SVG", the SVG application can plot the arcs represented in
the <code>path</code> elements over the formula. Note that the <code>path</code> elements
are given in absolute coordinates; since mathematical formulae scale by different
mechanisms than diagrams (glyphs re-sizing does not always conserve aspect ratio),
the visual connection need not be invariant under resizing. </p><p>However, given that the example is really a mathematical formula with
  embellishments, a "SVG in MathML" representation would have been
  more appropriate semantically. We have speculated about a possible
  representation with a view towards TeX/LaTeX (and in particular the
  <code>pstricks</code> package. This representation annotates a MathML formula
  (we have only represented the left hand side for brevity) with the arcs in a
  <code>semantics</code> element. In contrast to the representation above, we have not
  used current SVG <code>path</code> elements with absolute coordinates, but we have
  postulated a <code>svg:connection</code> (such functionality does not exist in
  SVG 1.1) with a suitable <code>shape</code> attribute to obtain the effect. In
  contrast to the example in section <a href="#comm-ex"><b>A.1 The commutative diagram</b></a>, where we referenced
  to <code>ID</code>-type attributes on SVG attributes, we rely on <code>ID</code>
  attributes of MathML elements. This has the effect for an SVG+MathML application
  that the MathML rendering cannot be included as a black box any more, but must
  advertise the bounding boxes of labeled sub-expressions to the calling SVG
  application.</p><div class="exampleInner"><pre>&lt;math style="display"&gt;
  &lt;semantics&gt;
    &lt;mrow&gt;
      &lt;mo fence="true"&gt;(&lt;/mo&gt;
      &lt;mo&gt;&amp;lambda;&lt;/mo&gt;
      &lt;mi id="s1"&gt;x&lt;/mi&gt;
      &lt;mo&gt;.&lt;/mo&gt;
      &lt;mrow&gt;
	&lt;mo&gt;f&lt;/mo&gt;
	&lt;mrow&gt;
	  &lt;mo fence="true"&gt;(&lt;/mo&gt;
	  &lt;mi id="t1"&gt;x&lt;/mi&gt;
	  &lt;mo separator="true"&gt;,&lt;/mo&gt;
	  &lt;mi id="t2"&gt;x&lt;/mi&gt;
	  &lt;mo fence="true"&gt;)&lt;/mo&gt;
	&lt;/mrow&gt;
      &lt;/mrow&gt;
      &lt;mo fence="true"&gt;)&lt;/mo&gt;
      &lt;mrow id="s2"&gt;
	&lt;mo&gt;g&lt;/mo&gt;
	&lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;
      &lt;/mrow&gt;
    &lt;/mrow&gt;
    &lt;annotation-xml encoding="image/svg" definitionURL="embellishments"&gt;
      &lt;svg:connection from="s1" to="t1" style="dotted" shape="arc"/&gt;
      &lt;svg:connection from="s1" to="t2" style="dotted" shape="arc"/&gt;
      &lt;svg:connection from="s2" to="t1" shape="arc"/&gt;
      &lt;svg:connection from="s2" to="t2" shape="arc"/&gt;
    &lt;/annotation-xml&gt;
  &lt;/semantics&gt;
&lt;/math&gt;</pre></div><p>Note that a presentation agent would have to report the locations of the MathML
  elements with the <code>id</code> attributes referred to by the
  <code>svg:connection</code> elements.</p></div></div><div class="div1">
<h2><a id="N400222"/>B Bibliography</h2><dl><dt class="label"><a id="XHTML-MathML-SVG"/>XHTML-MathML-SVG</dt><dd> Masayasu Ishikawa,  ed.,
      <a href="http://www.w3.org/TR/XHTMLplusMathMLplusSVG">An
	XHTML + MathML + SVG Profile</a>, W3C Working Draft
    </dd><dt class="label"><a id="SVG1.1"/>SVG1.1</dt><dd>
      Dean Jackson, Jon Ferraiolo, Jun Fujisawa, eds.
      <a href="http://www.w3.org/TR/2002/CR-SVG11-20020430">Scalable Vector Graphics
      (SVG) 1.1 Specification</a>, W3C Candidate Recommendation 30 April 2002</dd><dt class="label"><a id="MathML2"/>MathML2</dt><dd>
      David Carlisle,  Patrick Ion, Robert Miner,  Nico Poppelier, 
      <a href="http://www.w3.org/TR/MathML2">Mathematical Markup Language (MathML) Version 2.0</a>
      W3C Recommendation 21 February 2001</dd></dl></div></div></body></html>