Ignore:
Timestamp:
05/10/10 09:03:16 (10 years ago)
Author:
gogo
Message:

Tickets #1209 and #1182
Upgrade Equation to use new AsciiMath?, fix multiple equation editing.
Thanks to Niraj Bhawnani of University of New South Wales.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/Equation/popups/dialog.html

    r987 r1254  
    4040  <script type="text/javascript"> 
    4141 // <![CDATA[ 
     42// START - Added for compatibility with ASCIIMathML 2.0 
     43var AMtranslated = false; 
     44// Next 2 functions copied from ASCIIMathML 1.4.7 
     45function AMcreateElementXHTML(t) { 
     46  if (isIE) return document.createElement(t); 
     47  else return document.createElementNS("http://www.w3.org/1999/xhtml", t); 
     48} 
     49function AMinitSymbols() { 
     50  var texsymbols = [], i; 
     51  for (i=0; i<AMsymbols.length; i++) 
     52    if (AMsymbols[i].tex)  
     53      texsymbols[texsymbols.length] = {input:AMsymbols[i].tex,  
     54        tag:AMsymbols[i].tag, output:AMsymbols[i].output, ttype:AMsymbols[i].ttype}; 
     55  AMsymbols = AMsymbols.concat(texsymbols); 
     56  AMsymbols.sort(compareNames); 
     57  for (i=0; i<AMsymbols.length; i++) AMnames[i] = AMsymbols[i].input; 
     58} 
     59// END - Added for compatibility with ASCIIMathML 2.0 
     60 
    4261   window.resizeTo(500, 300); 
    4362var showasciiformulaonhover = false; 
     
    6786      for (var i = 0; i < n; i++) 
    6887        outnode.removeChild(outnode.firstChild); 
    69       outnode.appendChild(document.createComment("`"+str+"`")); 
     88      outnode.appendChild(document.createTextNode("`"+str+"`")); 
    7089      AMprocessNode(outnode,true); 
    7190  } 
Note: See TracChangeset for help on using the changeset viewer.