Difference between revisions of "Math rendering"

From Organic Design wiki
m
m
Line 4: Line 4:
 
<table class=document-code><tr><td>
 
<table class=document-code><tr><td>
 
<tt>&lt;math>
 
<tt>&lt;math>
e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots
+
:e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots
 
&lt;/math></tt>
 
&lt;/math></tt>
 
</table>
 
</table>

Revision as of 09:15, 18 October 2006

Example

The following maths code

<math>

e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots

</math>

Gives the following output

[math]e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots[/math]


Transparency

I added the following ugly hack to the /wiki/math/render.ml file and then issued a make clean and make,

let cmd_convert tmpprefix finalpath = "convert -quality 100 -density 120 " \
    ^ tmpprefix ^ ".ps -negate " ^ finalpath ^ " >/dev/null 2>/dev/null \
    && convert " ^ finalpath ^ " -fill black -colorize 100% " ^ finalpath ^ ".png \
    && composite -compose CopyOpacity " ^ finalpath ^ " " ^ finalpath ^ ".png " ^ finalpath



See also