[LON-CAPA-cvs] cvs: loncom /html/adm/dragmath/applet EditMathPopup.html

foxr lon-capa-cvs-allow@mail.lon-capa.org
Tue, 01 Jul 2008 09:12:35 -0000


foxr		Tue Jul  1 05:12:35 2008 EDT

  Added files:                 
    /loncom/html/adm/dragmath/applet	EditMathPopup.html 
  Log:
  Starting point for dragmath popup for XML editor.
  
  

Index: loncom/html/adm/dragmath/applet/EditMathPopup.html
+++ loncom/html/adm/dragmath/applet/EditMathPopup.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>DragMath Latex Example</title>

<script>
function renderLatex() {
  var ans = document.DragMath.getMathExpression();  
  var source = '<html>'
         + '<body>'
         + '<h4>Latex Syntax: '
         + ans
         + '</h4>'
         + '<applet code="HotEqn.class" codebase="HotEqn" archive="HotEqn.jar" height="300" width="600" name="my equation">'
         + '<param name="equation" value="'	
         + ans
         + '"/>'
         + '</applet>'
         + '</body>'
         + '</html>'
         + '';

  var target = document.getElementById('outputID');
    var doc = target.contentDocument;
        if (doc == undefined || doc == null)
            doc = target.contentWindow.document;
  doc.open();
  doc.write(source);
  doc.close();

 
}
</script>

</head>
<body>

<div id="mainContent">


<DIV align=left><FONT face=Arial color=#000080 
size=6><STRONG>DragMath Latex Example</STRONG></FONT></DIV>
<br><br>

<applet name="DragMath" codebase="classes" code="Display.MainApplet.class" archive="Project.jar,AbsoluteLayout.jar,swing-layout-1.0.jar,jdom.jar,jep.jar" width=540 height=333>
<param name=language value="en">
<param name=showOutputToolBar value="false">
<param name=outputFormat value="Latex">
To use this page you need a Java-enabled browser. Download the latest Java plug-in from <a href="http://www.java.com">Java.com</a>
</applet >
<br>

<form>
<input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
</form>

<H2>Latex Rendering:</H2>

<iframe id='outputID' src='' width='98%' height='150'>
</iframe>

</div>
<br>
Latex rendering performed by freeware Java applet <a href="http://www.atp.ruhr-uni-bochum.de/VCLab/software/HotEqn/HotEqn.html">HotEqn </a>
</body>
</html>