1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
input mp-tool ; % some initializations and auxiliary macros
input mp-spec ; % macros that support special features
%redefinition
def doexternalfigure (expr filename) text transformation =
begingroup ; save p, t ; picture p ; transform t ;
p := nullpicture ; t := identity transformation ;
flush_special(10, 9,
dddecimal (xxpart t, yxpart t, xypart t) & " " &
dddecimal (yypart t, xpart t, ypart t) & " " & filename) ;
addto p contour unitsquare transformed t ;
setbounds p to unitsquare transformed t ;
_color_counter_ := _color_counter_ + 1 ;
draw p withcolor (_special_signal_/_special_div_,_color_counter_/_special_div_,_special_counter_/_special_div_) ;
endgroup ;
enddef ;
vardef reset_extra_specials =
enddef ;
prologues := 0;
mpprocset := 0;
verbatimtex
%&latex
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
etex
beginfig(1)
draw btex hello etex;
endfig;
end
|