Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on MetaPost.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/metapost.e>
#           or at <http://angg.twu.net/e/metapost.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.debian»		(to "debian")
# «.drawdot»		(to "drawdot")
# «.scrollmode»		(to "scrollmode")
# «.emp»		(to "emp")
# «.asymptote»		(to "asymptote")




# (find-angg ".emacs.papers" "metapost")
# (find-angg ".emacs" "metapost")
# (find-es "tex" "metapost")
# (find-zsh "availabledebs | sort | grep texlive-metapost")




#####
#
# Debian packages
# 2011apr14
#
#####

# «debian»  (to ".debian")
# (find-status   "texlive-metapost")
# (find-vldifile "texlive-metapost.list")
# (find-udfile   "texlive-metapost/")
# (find-status   "texlive-metapost-doc")
# (find-vldifile "texlive-metapost-doc.list")
# (find-udfile   "texlive-metapost-doc/")

/usr/share/texmf-texlive/metapost/base

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cat /var/lib/dpkg/info/texlive-metapost-doc.list \
  | grep 'pdf$' \
  | sort \
  | tee /tmp/o \
  | awk '{ print "(find-xpdfpage \"" $1 "\")"}' \
  | tee /tmp/o2

# (find-fline "/tmp/o2")

# (find-mpintropage 1  "Contents")
# (find-mpintrotext "")
# (find-mpintropage 10 "btex $f(x)=x^2$ etex")
# (find-mpintrotext    "btex $f(x)=x^2$ etex")
# (find-mpmanpage  1 "Contents")
# (find-mpmantext "")
# (find-mpmanpage (+ 1  5) "outputtemplate :=")
# (find-mpmantext          "outputtemplate :=")
# (find-mpmanpage (+ 1 27) "when prologues is 3")
# (find-mpmantext          "when prologues is 3")

# (find-mpmanpage (+ 1  8) "4     Curves")
# (find-mpmantext          "4     Curves")

# (find-mpmanfile "examples.mp.gz" "beginfig(5)")
# (find-mpmanpage (+ 1 42) "beginfig(34)")
# (find-mpmantext          "4     Curves")


# (find-mpmanpage (+ 1 42) "beginfig(34)")
# (find-mpmantext          "4     Curves")
# (find-mpmanfile "examples.mp.gz" "beginfig(1)")
# (find-mpmanfile "examples.mp.gz" "% Keep the function single-valued")
# (find-mpmanfile "mpman.tex.gz" "z1 = (60,40)")
# (find-mpmangrep "zgrep -nH -e 60,40 *")
# (find-mpmangrep "zgrep -nH -e beginfig.26. *")






* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
outputtemplate:="/tmp/mp-%3c.mps"; prologues:=3;
beginfig(26);
numeric scf, #, t[]; 
3.2scf = 2.4in;
path fun;
# = .1;  % Keep the function single-valued
fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#))
  yscaled(1/#) scaled scf;
x1 = 2.5scf;
for i=1 upto 2:
  (t[i],whatever) =
    fun intersectiontimes ((x[i],-infinity)--(x[i],infinity));
  z[i] = point t[i] of fun;
  z[i]-(x[i+1],0) = whatever*direction t[i] of fun;
  draw (x[i],0)--z[i]--(x[i+1],0);
  fill fullcircle scaled 3bp shifted z[i];
endfor
label.bot("x1", (x1,0));
label.bot("x2", (x2,0));
label.bot("x3", (x3,0));
draw (0,0)--(3.2scf,0);
pickup pencircle scaled 1pt;
draw fun;
endfig;
% (find-pspage "/tmp/mp-026.mps")


beginfig(26);
endfig;




% (find-mpmanpage (+ 1 36) "beginfig(26)")
% (find-mpmantext          "4     Curves")





beginfig(1);
a=.7in; b=0.5in;
z0=(0,0); z1=(a,0); z2=(0,b);
z0=.5[z1,z3]=.5[z2,z4];
draw z1..z2..z3..z4..cycle;
drawarrow z0..z1;
drawarrow z0..z2;
label.top(btex $a$ etex, .5[z0,z1]);
label.lft(btex $b$ etex, .5[z0,z2]);
endfig;


* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
outputtemplate:="/tmp/mp-%3c.mps"; prologues:=3;
beginfig(1);
endfig;
% (find-pspage "/tmp/mp-001.mps")




* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
outputtemplate:="/tmp/mp-%3c.mps"; prologues:=3;
beginfig(1);
endfig;
% (find-pspage "/tmp/mp-001.mps")


beginfig(1);
  draw origin--(100,100);
endfig;

beginfig(5);
for i=0 upto 2:
  z[i]=(0,50i); z[i+3]-z[i]=(60,40);
  z[i+6]-z[i]=(120,0);
endfor
pickup pencircle scaled 24;
def gray = withcolor .8white enddef;
draw z0--z3--z6 gray;
linejoin:=mitered; draw z1..z4--z7 gray;
linejoin:=beveled; draw z2..z5--z8 gray;
dotlabels.bot(0,1,2,3,4,5,6,7,8);
endfig; linejoin:=rounded;

% (find-pspage "/tmp/mp-005.mps")


* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
beginfig(1);


;; (find-zsh "dmissing microtype")


http://www.gnu.org/software/3dldf/



#####
#
# scrollmode
# 2011apr14
#
#####

# «scrollmode»  (to ".scrollmode")

* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
tracingonline:=1; scrollmode;
show drawdot;
show drawdot(1);

# (find-mfbookpage (+ 13  61)   "tracingonline:=1; scrollmode;")
# (find-mfbooktext              "tracingonline:=1; scrollmode;")



#####
#
# drawdot
# 2011apr14
#
#####

# «drawdot»  (to ".drawdot")
# (find-metapostgrep "grep -nH -e drawdot base/*")
# (find-metapostfile "base/mfplain.mp" "def drawdot")
# (find-metapostfile "base/mfplain.mp" "def t_ =")
# (find-metapostfile "base/mfplain.mp" "def pc_ =")
# (find-metapostfile "base/plain.mp"   "def drawdot")
# (find-metapostfile "base/plain.mp"   "def _op_ =")
(find-3
 '(find-metapostfile "base/mfplain.mp" "def drawdot")
 '(find-metapostfile "base/plain.mp"   "def drawdot")
 )



#####
#
# Embedded MetaPost
# 2011apr25
#
#####

# «emp»  (to ".emp")
# http://www.ntg.nl/maps/28/16.pdf
# (find-xpdfpage "/usr/share/doc/texlive-metapost-doc/latex/emp/emp.pdf")



# (find-sh "locate luamplib")

# (find-fline "/usr/share/texmf-texlive/tex/luatex/luamplib/")
# (find-fline "/usr/share/texmf-texlive/tex/luatex/luamplib/luamplib-createmem.lua")
# (find-fline "/usr/share/texmf-texlive/tex/luatex/luamplib/luamplib.lua")
# (find-fline "/usr/share/texmf-texlive/tex/luatex/luamplib/luamplib.sty")

;; (find-udfile "texlive-luatex/luatex/luamplib/")
;; (find-udfile "texlive-luatex/luatex/luamplib/README")
(code-xpdf     "luamplib" "/usr/share/doc/texlive-luatex/luatex/luamplib/luamplib.pdf")
(code-pdf-text "luamplib" "/usr/share/doc/texlive-luatex/luatex/luamplib/luamplib.pdf")
;; (find-luamplibpage)
;; (find-luamplibtext)






#####
#
# Asymptote
# 2013may04
#
#####

# «asymptote» (to ".asymptote")
http://www.artofproblemsolving.com/Wiki/index.php/Asymptote_%28Vector_Graphics_Language%29










# http://tug.org/mailman/listinfo/metapost
# http://tug.org/pipermail/metapost/
# http://www.tug.org/metapost.html
# http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html
# http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.305.gif

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
for i in $(seq 1 305); do
  psnec http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.$i.gif
done

http://www.tug.org/TUGboat/Articles/tb28-3/tb90hoekwater-mplib.pdf
http://www.tug.org/TUGboat/Articles/tb29-3/tb93hoekwater.pdf
http://www.tug.org/TUGboat/Articles/tb28-3/tb90hoekwater-mplib.pdf
http://www.tug.org/TUGboat/Articles/tb30-1/tb94zheng.pdf




tracingall;






#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: