Ticket #61 (closed enhancement: fixed)

Opened 2 years ago

Last modified 5 months ago

Equation Formatting in IDLDoc output

Reported by: jhood Owned by: mgalloy
Priority: minor Milestone: IDLdoc 3.4
Component: output Version: 3.3
Keywords: Cc:

Description

It would be quite useful to be able to put rendered equations into the IDLDoc output. Possibly Latex could be used to do the work? Right now we can insert images into the output, which is fantastic and allows anything - including equations - to be inserted. If its not too much effort, it would be nice to be able to insert a Latex (or similar) style equation and have it render in the output.

Change History

Changed 18 months ago by mgalloy

  • status changed from new to assigned

It looks like jsMath would be a good solution for this.

Changed 18 months ago by mgalloy

This is how the HTML output would look:

<html>
  <head>
  </head>
  
  <body>
<SCRIPT>
  jsMath = {
    Controls: {
      cookie: {scale: 133},
      CheckVersion: function () {
        jsMath.Script.delayedLoad('http://www.math.union.edu/locate/jsMath/jsMath/jsMath-version-check.js');
      }
    },
    Parser: {prototype: {
      macros: {warning: ["Macro","\\color{##00CC00}{\\rm jsMath\\ appears\\ to\\ be\\  working!}",1]}
    }}
  }
</SCRIPT>
<SCRIPT SRC="jsMath-3.6e/plugins/noImageFonts.js"></SCRIPT>
<SCRIPT SRC="jsMath-3.6e/jsMath.js"></SCRIPT>
    
    <p>This is some inline math: <span class="math">\sqrt{1-x^2}</span></p>
    
    <div class="math">
      \left(\, \sum_{k=1}^n a_k b_k \right)^2 \le
      \left(\, \sum_{k=1}^n a_k^2 \right) \left(\, \sum_{k=1}^n b_k^2 \right)
    </div>
    
<SCRIPT>
jsMath.Process(document);
</SCRIPT>    
  </body>
</html>

Changed 16 months ago by mgalloy

  • milestone changed from Future to IDLdoc 3.4

Changed 7 months ago by mgalloy

MathJax is another option.

Changed 5 months ago by mgalloy

  • status changed from assigned to closed
  • resolution set to fixed

Added in r758.

Note: See TracTickets for help on using tickets.