Difference between revisions of "Math rendering"
From Organic Design wiki
m |
m |
||
Line 3: | Line 3: | ||
The following maths code | The following maths code | ||
<table class=document-code><tr><td> | <table class=document-code><tr><td> | ||
− | <tt><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></tt> | + | <tt><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></tt> | ||
</table> | </table> | ||
Gives the following output | Gives the following output | ||
Line 15: | Line 17: | ||
<table class=document-code><tr><td> | <table class=document-code><tr><td> | ||
<pre> | <pre> | ||
− | let cmd_convert tmpprefix finalpath = "convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps -negate " ^ finalpath ^ " >/dev/null 2>/dev/null \ | + | 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 \ | && convert " ^ finalpath ^ " -fill black -colorize 100% " ^ finalpath ^ ".png \ | ||
&& composite -compose CopyOpacity " ^ finalpath ^ " " ^ finalpath ^ ".png " ^ finalpath | && composite -compose CopyOpacity " ^ finalpath ^ " " ^ finalpath ^ ".png " ^ finalpath |
Revision as of 09:14, 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