<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7167</bug_id>
          
          <creation_ts>2009-07-29 16:43:21 +0000</creation_ts>
          <short_desc>Improving the rendering of menclose</short_desc>
          <delta_ts>2010-08-04 23:23:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Amaya</product>
          <component>MathML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://www.maths-informatique-jeux.com/international/mathml_test/menclose.xml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>7166</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter>fred.wang</reporter>
          <assigned_to name="Vincent Quint">vincent.quint</assigned_to>
          <cc>carcone</cc>
    
    <cc>emilien.kia</cc>
    
    <cc>fred.wang</cc>
    
    <cc>Irene.Vatton</cc>
    
    <cc>vincent.quint</cc>
          
          <qa_contact name="Vincent Quint">vincent.quint</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26121</commentid>
    <comment_count>0</comment_count>
    <who name="">fred.wang</who>
    <bug_when>2009-07-29 16:43:21 +0000</bug_when>
    <thetext>Currently Amaya can only display one kind of notation in a menclose element. Moreover some notations have an approximative rendering.

http://www.w3.org/TR/MathML2/chapter3.html#presm.menclose</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26163</commentid>
    <comment_count>1</comment_count>
    <who name="">fred.wang</who>
    <bug_when>2009-08-01 09:21:39 +0000</bug_when>
    <thetext>	Below is approximately the algorithm that will be used in Firefox. Do you think it can be expressed using the P language?
	
1) Parsing of &quot;notation&quot; attribute. See bug 7166. box is the same as top + left + bottom + right

2) Computation of the bounding box

	We want to enclose a content of bounding box of size w x h. To do this, we need to determine the paddings t, l, r and b
 such that all notations can be drawn inside the menclose bounding box of size (l + w + r) x (t + h + b). Hence we analyse the padding needed for each notation and take the maximum.
 
 	2.1) set t, l, r, b to zero
 	2.2) roundedbox, top, left, bottom: l is at least v0
 	2.3) roundedbox, top, right, bottom: r is at least v0
	2.4) roundedbox, top, left, right: t is at least v0
	2.5) roundedbox, bottom, left, right: b is at least v0
	2.6) circle: l &amp; r is at least w * v1 ; t &amp; b is at least h * v1
	2.7) longdiv: t is a least v2 and l is a least v3
	2.8) radical: t is a least v2 and l is a least v4
	
	v0 = an arbitrary padding, for instance 3 * thickness of drawing
	v1 = (sqrt(2) - 1)/2
	v2 = the thickness of the top bar + an arbitrary space
	v3 = width of the right parenthesis character
	v4 = width of the radical character

	2.9) circle: center the ellipse: l = r = max(l, r) and t = b = max(t, b)

3) Drawing the notation

	3.1) longdiv and radical: draw the characters (parenthesis &amp; radical) on the left of the content and a top bar above the content.
	3.2) other notations: draw them using the bounding box of menclose. &quot;circle&quot; is actually an ellipse.
	
	For 3.1) Amaya does not use characters but graphics.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26164</commentid>
    <comment_count>2</comment_count>
    <who name="">fred.wang</who>
    <bug_when>2009-08-01 09:30:24 +0000</bug_when>
    <thetext>Actually 2.2, 2.3, 2.4, 2.5 also apply to circle</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>