IllustRender [25Kb] is a plugin for WordPress, heavily based on LatexRender, which replaces illustration code in your posts with the actual illustration. Currently, it handles metapost code and postscript code. To use it, you need ghostscript and imagemagick (for convert & identify), mpost, and latex. Of course, if you’re not going to use MetaPost, you don’t need mpost or latex. IllustRender comes bundled with PSMath, a very nice library for making mathematical illustrations in PostScript.
IllustRender is provided without any guarantees. There might still be some bugs; if you see any, let me know.
Here are some examples:
pickup pencircle scaled 4pt yscaled .2pt rotated 60;
n := 5;
for i:= (n*20) step -(n) until (n):
draw (i,0)..(0,i)..(-i,0)..(0,-(i-n))..(i-n,0);
endfor
|
 |
picture p; path q;
p := thelabel(btex \Large
\begin{minipage}{4in}
\begin{gather}
\iint\limits_A f(x,y)\,dx\,dy\qquad
\iiint\limits_A f(x,y,z)\,dx\,dy\,dz\
\iiiint\limits_A f(w,x,y,z)\,dw\,dx\,dy\,dz
\qquad\idotsint\limits_A f(x_1,\dots,x_k)
\end{gather}
\end{minipage}
etex,(0,0));
q := fullcircle scaled 2.5in;
fill q withcolor black;
clip p to q;
draw p rotated (90) withcolor white;
|
|
%PS
% Set 3D perspective
100 0 translate
[0 0 0] [[20 -5] p2r aload pop 5] 600 3Dinit
% Define 3D points, circles, and planes
/circ* {/p xdef /s xdef s cos s sin 1 p astore} 2 ldef
/circ {3 array circ*} def
/P [0 0 0] def /R 1.75 def /r -0.5 def
% Find the tangent angles of the cone seen from the observer
/X 3 array def /X' 2 array def /P' P 3D def
0 360 {X circ* X' 3D* P' vsub r2p 1 get} extrema
/u2 xdef /u1 xdef
% Draw section plane
[R 0 R] [R neg 0 R] line
[0 R R] [0 R neg R] line
[r 0 r] [r neg 0 r] line
[0 r r] [0 r neg r] line
[1 0 1] [-1 0 1] line
[0 1 1] [0 -1 1] line
[0 0 r] [0 0 R] line dash stroke nodash
/p 3 array def /p' 2 array def
0 360 {p circ* R p smul*} plot closepath stroke
u1 u2 {p circ* r p smul*} plot stroke
u2 u1 360 add {p circ* r p smul*} plot dash stroke nodash
u1 circ r smul 3D u1 circ R smul line stroke
u2 circ r smul 3D u2 circ R smul line stroke
% Draw conic section
u1 u2 {p circ*} plot dash stroke nodash
u2 u1 360 add {p circ*} plot stroke
/d 1.5 def /-d d neg def
[[d d 1] [d -d 1] [-d -d 1] [-d d 1]] lines closepath stroke
% Label points
($z=1$) [1.5 1.5 1] 3D 1 1 label
|
|
Possibly relevant posts:
[…] ed on LatexRender, which replaces illustration code in your posts with the actual illustration. See http://www.tangentspace.net/cz/archives/2005/01/illustrender I can’t see how to download IllustRender and comments aren’t working there, […]
Pingback by Using LaTeX in WordPress » IllusRender — 1/2/2005 @ 3:06 pm
[…] of the page about making sure you have the proper fonts. Originally, I had wanted to use Illustrender on this site, but I’ve been unable to get tetex (a version of te […]
Pingback by Multiresolution Control»Blog Archive » Alternate Method to render LaTeX? — 4/20/2005 @ 3:00 pm
Hi, This sounds to be a great plugin. I have a bit of trouble installing it though.
Am I supposed to fill in the following paths in class.illustrender.php too?
var $_picture_path = “”;
var $_picture_path_httpd = “”;
var $_tmp_dir = “”;
I am getting the following error:
[Unparseable, unsupported, or potentially dangerous illustration code. Error 5 : 1015×9]
Comment by mehdi — 5/30/2005 @ 11:51 pm
Yep— create directories then fill those blanks in. (I would reply by email, but that email seems invalid). The first is a path to a storage dir for the pics that it generates, so must be writable by the server process; the second is what the http address for that path looks like, used to make the html code for the images. The last is a temp dir for writing the intermediate stuff, also has to be writable by the server process.
Comment by Alex — 5/31/2005 @ 9:17 am
[…]
ChapterZero » IllustRender
December 13th, 2005
ChapterZero » IllustRender
This entry was posted
[…]
Pingback by Arbeitsjournal » Blog Archive » ChapterZero » IllustRender — 12/13/2005 @ 2:38 pm
[…] ä¸‹ä¸€æ¥æ˜¯è®©illusrender(http://www.tangentspace.net/cz/archives/2005/01/illustrender)è·‘èµ·æ¥ï¼Œè¿™æ ·å°±å…¨äº†:-) […]
Pingback by 金èžå·¥ç¨‹å°çª » LATEX å¯ä»¥å·¥ä½œäº†ï¼ — 7/30/2006 @ 11:24 am
\displaystyle \sum_{i=k}^{n}\frac{1-q^{k+1}}{1-k}
Comment by Anonymous — 10/14/2006 @ 11:54 am
thanks a lot! it’s usefull~
‘convert’ (a tool of imagemagick) could convert eps to gif, so we need not to go from eps to tex , then to gif,
just convert $tmp_filename.1 $tmp_filename.gif
Comment by oni — 1/21/2007 @ 4:57 am