From 4631b9a200935cb69b604b1d7995fb0d85b229f2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 6 Jul 2010 00:30:47 +0000 Subject: asymptote 2.01 git-svn-id: svn://tug.org/texlive/trunk@19252 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/i386-cygwin/asy.exe | Bin 6469646 -> 6474254 bytes Master/texmf/asymptote/GUI/xasyVersion.py | 2 +- Master/texmf/asymptote/asy-keywords.el | 2 +- Master/texmf/asymptote/binarytree.asy | 2 +- Master/texmf/asymptote/fontsize.asy | 2 +- Master/texmf/asymptote/plain.asy | 4 +- Master/texmf/asymptote/three.asy | 7 +- Master/texmf/asymptote/version.asy | 2 +- Master/texmf/doc/asymptote/CAD.pdf | Bin 67565 -> 67395 bytes Master/texmf/doc/asymptote/asymptote.pdf | Bin 1692650 -> 1553892 bytes Master/texmf/doc/asymptote/examples/arrows3.asy | 2 + Master/texmf/doc/asymptote/examples/basealign.asy | 1 + Master/texmf/doc/asymptote/examples/billboard.asy | 2 + Master/texmf/doc/asymptote/examples/intro.asy | 933 +++++++++++---------- .../texmf/doc/asymptote/examples/latexusage-1.asy | 55 ++ .../texmf/doc/asymptote/examples/latexusage-2.asy | 23 + .../texmf/doc/asymptote/examples/latexusage-3.asy | 38 + Master/texmf/doc/asymptote/examples/latexusage.tex | 3 +- .../texmf/doc/asymptote/examples/mergeExample.asy | 77 ++ .../doc/asymptote/examples/partitionExample.asy | 27 + Master/texmf/doc/asymptote/examples/quilt.asy | 44 + Master/texmf/doc/asymptote/examples/workcone.asy | 8 +- Master/texmf/doc/asymptote/examples/xstitch.asy | 5 +- Master/texmf/doc/info/asy-faq.info | 2 +- Master/texmf/doc/info/asymptote.info | 285 ++++--- Master/texmf/doc/man/man1/asy.man1.pdf | Bin 11385 -> 11385 bytes Master/texmf/tex/latex/asymptote/asymptote.sty | 108 +-- Master/tlpkg/asymptote/asy.exe | Bin 6469646 -> 6474254 bytes Master/tlpkg/bin/tl-update-asy | 6 +- 29 files changed, 985 insertions(+), 655 deletions(-) create mode 100644 Master/texmf/doc/asymptote/examples/latexusage-1.asy create mode 100644 Master/texmf/doc/asymptote/examples/latexusage-2.asy create mode 100644 Master/texmf/doc/asymptote/examples/latexusage-3.asy create mode 100644 Master/texmf/doc/asymptote/examples/mergeExample.asy create mode 100644 Master/texmf/doc/asymptote/examples/partitionExample.asy create mode 100644 Master/texmf/doc/asymptote/examples/quilt.asy (limited to 'Master') diff --git a/Master/bin/i386-cygwin/asy.exe b/Master/bin/i386-cygwin/asy.exe index a068d7cfe3b..3daf4a36e76 100755 Binary files a/Master/bin/i386-cygwin/asy.exe and b/Master/bin/i386-cygwin/asy.exe differ diff --git a/Master/texmf/asymptote/GUI/xasyVersion.py b/Master/texmf/asymptote/GUI/xasyVersion.py index 01d9ae47f55..8183dae8688 100755 --- a/Master/texmf/asymptote/GUI/xasyVersion.py +++ b/Master/texmf/asymptote/GUI/xasyVersion.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -xasyVersion = "2.00" +xasyVersion = "2.01" diff --git a/Master/texmf/asymptote/asy-keywords.el b/Master/texmf/asymptote/asy-keywords.el index d49d2af2bfe..1b4365b88f5 100644 --- a/Master/texmf/asymptote/asy-keywords.el +++ b/Master/texmf/asymptote/asy-keywords.el @@ -2,7 +2,7 @@ ;; This file is automatically generated by asy-list.pl. ;; Changes will be overwritten. ;; -(defvar asy-keywords-version "2.00") +(defvar asy-keywords-version "2.01") (defvar asy-keyword-name '( and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator )) diff --git a/Master/texmf/asymptote/binarytree.asy b/Master/texmf/asymptote/binarytree.asy index 7bbd1de2148..0a80aec4b66 100644 --- a/Master/texmf/asymptote/binarytree.asy +++ b/Master/texmf/asymptote/binarytree.asy @@ -154,7 +154,7 @@ object draw(picture pic=currentpicture, binarytreeNode node, pair pos, // calculate connection path transform T=shift(nodeDiameter/2*unit(t*childPos-t*parentPos)); path arr=(T*t*parentPos)--(inverse(T)*t*childPos); - draw(f,arr,p,Arrow(5)); + draw(f,PenMargin(arr,p).g,p,Arrow(5)); }); pic.addPoint(parentPos); pic.addPoint(childPos); diff --git a/Master/texmf/asymptote/fontsize.asy b/Master/texmf/asymptote/fontsize.asy index 4575f3480fa..54b01829550 100644 --- a/Master/texmf/asymptote/fontsize.asy +++ b/Master/texmf/asymptote/fontsize.asy @@ -1 +1 @@ -if(latex()) usepackage("fix-cm"); +if(latex()) usepackage("type1cm"); diff --git a/Master/texmf/asymptote/plain.asy b/Master/texmf/asymptote/plain.asy index 4d0b4e566fb..76f77aaf52c 100644 --- a/Master/texmf/asymptote/plain.asy +++ b/Master/texmf/asymptote/plain.asy @@ -190,8 +190,7 @@ void usersetting() // Conditionally process each file name in array s in a new environment. void asy(string format, bool overwrite=false ... string[] s) { - for(int i=0; i < s.length; ++i) { - string f=s[i]; + for(string f : s) { int n=rfind(f,".asy"); if(n != -1) f=erase(f,n,-1); if(overwrite || error(input(f+"."+format,check=false))) { @@ -201,6 +200,7 @@ void asy(string format, bool overwrite=false ... string[] s) settings.outformat=format; settings.interactiveView=false; settings.batchView=false; + delete(outname()+"_"+".aux"); eval("defaultfilename=\""+f+"\"; import \""+f+ "\" as dummy; exitfunction()"); settings.outformat=outformat; diff --git a/Master/texmf/asymptote/three.asy b/Master/texmf/asymptote/three.asy index 528a1da13c1..4221646f632 100644 --- a/Master/texmf/asymptote/three.asy +++ b/Master/texmf/asymptote/three.asy @@ -251,9 +251,12 @@ projection operator * (transform3 t, projection P) projection P=P.copy(); if(!P.absolute) { P.camera=t*P.camera; - P.normal=t*(P.target+P.normal); + triple target=P.target; P.target=t*P.target; - P.normal -= P.target; + if(P.infinity) + P.normal=t*(target+P.normal)-P.target; + else + P.normal=P.vector(); P.calculate(); } return P; diff --git a/Master/texmf/asymptote/version.asy b/Master/texmf/asymptote/version.asy index c2011eb0a90..46cd98e4887 100644 --- a/Master/texmf/asymptote/version.asy +++ b/Master/texmf/asymptote/version.asy @@ -1 +1 @@ -string VERSION="2.00"; +string VERSION="2.01"; diff --git a/Master/texmf/doc/asymptote/CAD.pdf b/Master/texmf/doc/asymptote/CAD.pdf index 7076ef94893..327f2ff3b0b 100644 Binary files a/Master/texmf/doc/asymptote/CAD.pdf and b/Master/texmf/doc/asymptote/CAD.pdf differ diff --git a/Master/texmf/doc/asymptote/asymptote.pdf b/Master/texmf/doc/asymptote/asymptote.pdf index f21cc658464..d4a834d8dde 100644 Binary files a/Master/texmf/doc/asymptote/asymptote.pdf and b/Master/texmf/doc/asymptote/asymptote.pdf differ diff --git a/Master/texmf/doc/asymptote/examples/arrows3.asy b/Master/texmf/doc/asymptote/examples/arrows3.asy index 12ad43463ee..57fc4b3d338 100644 --- a/Master/texmf/doc/asymptote/examples/arrows3.asy +++ b/Master/texmf/doc/asymptote/examples/arrows3.asy @@ -2,6 +2,8 @@ import three; size(15cm); +defaultrender.merge=true; + currentprojection=perspective(24,14,13); currentlight=light(gray(0.5),specularfactor=3,viewport=false, (0.5,-0.5,-0.25),(0.5,0.5,0.25),(0.5,0.5,1),(-0.5,-0.5,-1)); diff --git a/Master/texmf/doc/asymptote/examples/basealign.asy b/Master/texmf/doc/asymptote/examples/basealign.asy index 4bf83c94033..d653ec3c043 100644 --- a/Master/texmf/doc/asymptote/examples/basealign.asy +++ b/Master/texmf/doc/asymptote/examples/basealign.asy @@ -2,6 +2,7 @@ import fontsize; import three; settings.autobillboard=false; +settings.embed=false; currentprojection=orthographic(Z); defaultpen(fontsize(100pt)); diff --git a/Master/texmf/doc/asymptote/examples/billboard.asy b/Master/texmf/doc/asymptote/examples/billboard.asy index e126c1c5157..6e5df871007 100644 --- a/Master/texmf/doc/asymptote/examples/billboard.asy +++ b/Master/texmf/doc/asymptote/examples/billboard.asy @@ -2,6 +2,8 @@ import three; size(100); +currentprojection=perspective(1,-2,1); + draw(unitbox); label("Billboard",X,red,Billboard); diff --git a/Master/texmf/doc/asymptote/examples/intro.asy b/Master/texmf/doc/asymptote/examples/intro.asy index 4234b8cee8e..20b03c578dc 100644 --- a/Master/texmf/doc/asymptote/examples/intro.asy +++ b/Master/texmf/doc/asymptote/examples/intro.asy @@ -1,5 +1,3 @@ -// Introduction to Asymptote - orientation=Landscape; settings.tex="pdflatex"; @@ -8,6 +6,10 @@ import slide; import three; import animate; +bool long=true; + +usepackage("mflogo"); + usersetting(); viewportsize=pagewidth-2pagemargin; @@ -18,23 +20,39 @@ viewportsize=pagewidth-2pagemargin; bibliographystyle("alpha"); itempen=fontsize(22pt); - -titlepage("Asymptote: The Vector Graphics Language", - "Andy Hammerlindl and John Bowman", - "University of Toronto and University of Alberta","August 16, 2007", - "http://asymptote.sf.net"); +defaultpen(itempen); +viewportmargin=(2,2); + +titlepage(long ? "Asymptote: The Vector Graphics Language" : + "Interactive TeX-Aware 3D Vector Graphics", + "John Bowman and Andy Hammerlindl", +"Department of Mathematical and Statistical Sciences\\ + University of Alberta\\ +%and Instituto Nacional de Matem\'atica Pura e Aplicada (IMPA) +\medskip\Green{Collaborators: Orest Shardt, Michail Vidiassov}", +"June 30, 2010", +"http://asymptote.sf.net/intro.pdf"); title("History"); -item("\TeX\ and METAFONT (Knuth, 1979)"); -item("MetaPost (Hobby, 1989): 2D Bezier Control Point Selection"); -item("Asymptote (Hammerlindl, Bowman, Prince, 2004): 2D \& 3D Graphics"); - -title("Statistics (as of April, 2007)"); -item("Runs on Windows, Mac OS X, Linux, etc."); -item("1800 downloads a month from {\tt asymptote.sourceforge.net}."); -item("33\ 000 lines of C++ code."); -item("18\ 000 lines of Asymptote code."); - +item("1979: \TeX\ and \MF\ (Knuth)"); +item("1986: 2D B\'ezier control point selection (Hobby)"); +item("1989: MetaPost (Hobby)"); +item("2004: Asymptote"); +subitem("2004: initial public release (Hammerlindl, Bowman, \& Prince)"); +subitem("2005: 3D B\'ezier control point selection (Bowman)"); +subitem("2008: 3D interactive \TeX\ within PDF files (Shardt \& Bowman)"); +subitem("2009: 3D billboard labels that always face camera (Bowman)"); +subitem("2010: 3D PDF enhancements (Vidiassov \& Bowman)"); + +title("Statistics (as of June, 2010)"); +item("Runs under Linux/UNIX, Mac OS X, Microsoft Windows."); +item("4000 downloads/month from primary\hfill\\ + {\tt asymptote.sourceforge.net} site alone."); +item("80\ 000 lines of low-level C++ code."); +item("36\ 000 lines of high-level Asymptote code."); +item("Latest stable release: Version 2.00 (LGPL)."); + +if(long) { title("Vector Graphics"); item("Raster graphics assign colors to a grid of pixels."); figure("pixel.pdf"); @@ -61,17 +79,24 @@ add(zoom(100), (0,0)); add(zoom(10), (200,0)); add(zoom(1), (400,0)); ")); +} title("Cartesian Coordinates"); + +item("Asymptote's graphical capabilities are based on four primitive + commands: {\tt draw}, {\tt label}, {\tt fill}, {\tt clip} \cite{Bowman08}"); + asyfilecode("diagonal"); item("units are {\tt PostScript} {\it big points\/} (1 {\tt bp} = 1/72 {\tt inch})"); item("{\tt --} means join the points with a linear segment to create a {\it path}"); -item("cyclic path:"); +item("{\it cyclic\/} path:"); -asyfilecode("square"); +asycode(" +draw((0,0)--(100,0)--(100,100)--(0,100)--cycle); +"); title("Scaling to a Given Size"); @@ -79,11 +104,7 @@ item("{\tt PostScript} units are often inconvenient."); item("Instead, scale user coordinates to a specified final size:"); -code(" -size(101,101); -draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); -"); -asyfigure("square"); +asyfilecode("square"); item("One can also specify the size in {\tt cm}:"); @@ -96,18 +117,36 @@ title("Labels"); item("Adding and aligning \LaTeX\ labels is easy:"); -asyfilecode("labelsquare","height=6cm"); - +asycode(preamble="defaultpen(fontsize("+string(fontsize(itempen))+"));", +"size(6cm); +draw(unitsquare); +label(\"$A$\",(0,0),SW); +label(\"$B$\",(1,0),SE); +label(\"$C$\",(1,1),NE); +label(\"$D$\",(0,1),NW); +"); -title("2D Bezier Splines"); +title("2D B\'ezier Splines"); -item("Using {\tt ..} instead of {\tt --} specifies a {\it Bezier cubic +item("Using {\tt ..} instead of {\tt --} specifies a {\it B\'ezier cubic spline}:"); code(" draw(z0 .. controls c0 and c1 .. z1,blue); "); -asyfigure("beziercurve","height=7cm"); +asyfigure(asywrite("defaultpen(fontsize("+string(fontsize(itempen))+")); +size(0,7cm); +pair z0=(0,0); +pair c0=(1,1); +pair c1=(2,1); +pair z1=(3,0); +draw(z0..controls c0 and c1 .. z1,blue); +draw(z0--c0--c1--z1,dashed); +dot(\"$z_0$\",z0,W,red); +dot(\"$c_0$\",c0,NW,red); +dot(\"$c_1$\",c1,NE,red); +dot(\"$z_1$\",z1,red); +")); equation("(1-t)^3 z_0+3t(1-t)^2 c_0+3t^2(1-t) c_1+t^3 z_1, \qquad t\in [0,1]."); @@ -139,7 +178,7 @@ dot(z); picture output; save(); -for (int i=0; i0$ and a shift $b$ so that all of the - coordinates when transformed will lie in the interval $[0,S]$. That is, if - $u$ and $t$ are the user and truesize components:"); + coordinates when transformed will lie in the interval $[0,S]$."); + +item("That is, if $u$ and $t$ are the user and truesize components:"); equation("0\le au+t+b \le S."); -item("We are maximizing the variable $a$ subject to a number of inequalities. - This is a linear programming problem that can be solved by the simplex - method."); +item("Maximize the variable $a$ subject to a number of inequalities."); +item("Use the simplex method to solve the resulting linear programming problem."); + +if(long) { title("Sizing"); item("Every addition of a coordinate $(t,u)$ adds two restrictions"); equation("au+t+b\ge 0,"); @@ -829,7 +615,7 @@ asyfigure(asywrite(" import palette; size(160,0); pen[] p=Rainbow(NColors=11); -for (int i=1; i<10; ++i) { +for(int i=1; i<10; ++i) { draw(scale(i)*unitcircle, p[i]+linewidth(2)); } ")); @@ -845,6 +631,7 @@ item("This defines a partial ordering on coordinates. When sizing a picture, item("In practice, the linear programming problem will have less than a dozen restraints."); item("All picture sizing is implemented in Asymptote code."); +} title("Infinite Lines"); item("Deferred drawing allows us to draw infinite lines."); @@ -852,59 +639,321 @@ code("drawline(P, Q);"); asyfigure("elliptic","height=12cm"); -title("A Final Example: Quilting"); +title("Helpful Math Notation"); + +item("Integer division returns a {\tt real}. Use {\tt quotient} for an integer + result:"); +code("3/4 == 0.75 quotient(3,4) == 0"); + +item("Caret for real and integer exponentiation:"); +code("2^3 2.7^3 2.7^3.2"); + +item("Many expressions can be implicitly scaled by a numeric constant:"); +code("2pi 10cm 2x^2 3sin(x) 2(a+b)"); + +item("Pairs are complex numbers:"); +code("(0,1)*(0,1) == (-1,0)"); + +title("Function Calls"); + +item("Functions can take default arguments in any position. Arguments are + matched to the first possible location:"); +string unitsize="unitsize(0.65cm);"; +string preamble="void drawEllipse(real xsize=1, real ysize=xsize, pen p=blue) { + draw(xscale(xsize)*yscale(ysize)*unitcircle, p); +} +"; + +asycode(preamble=unitsize,preamble+" +drawEllipse(2); +drawEllipse(red); +"); + +item("Arguments can be given by name:"); +asycode(preamble=unitsize+preamble," +drawEllipse(xsize=2, ysize=1); +drawEllipse(ysize=2, xsize=3, green); +"); + +if(long) { +title("Rest Arguments"); +item("Rest arguments allow one to write a function that takes an arbitrary + number of arguments:"); +code(" +int sum(... int[] nums) { + int total=0; + for(int i=0; i < nums.length; ++i) + total += nums[i]; + return total; +} + +sum(1,2,3,4); // returns 10 +sum(); // returns 0 +sum(1,2,3 ... new int[] {4,5,6}); // returns 21 + +int subtract(int start ... int[] subs) { + return start - sum(... subs); +} +"); +} + +title("High-Order Functions"); + +item("Functions are first-class values. They can be passed to other + functions:"); +code("import graph; +real f(real x) { + return x*sin(10x); +} +draw(graph(f,-3,3,300),red);"); asyfigure(asywrite(" -import math; +import graph; +size(300,0); +real f(real x) { + return x*sin(10x); +} +draw(graph(f,-3,3,300),red); +")); + +if(long) { +title("Higher-Order Functions"); +item("Functions can return functions:"); +equation("f_n(x)=n\sin\left(\frac{x}{n}\right)."); +skip(); +string preamble=" +import graph; +size(300,0); +"; +string graphfunc2=" +typedef real func(real); +func f(int n) { + real fn(real x) { + return n*sin(x/n); + } + return fn; +} + +func f1=f(1); +real y=f1(pi); -int n=8, skip=3; +for(int i=1; i<=5; ++i) + draw(graph(f(i),-10,10),red); +"; +code(graphfunc2); +string name=asywrite(graphfunc2,preamble=preamble); +asy(nativeformat(),name+".asy"); +label(graphic(name+"."+nativeformat()),(0.5,0), + Fill(figureborder,figuremattpen)); -pair r(int k) { return unityroot(n,k); } +title("Anonymous Functions"); -pen col=blue, col2=purple; +item("Create new functions with {\tt new}:"); +code(" +path p=graph(new real (real x) { return x*sin(10x); },-3,3,red); -guide square=box((1,1),(-1,-1)); +func f(int n) { + return new real (real x) { return n*sin(x/n); }; +}"); -guide step(int mult) -{ - guide g; - for (int k=0; k: graph. (line 415) -* attach: LaTeX usage. (line 31) +* attach: LaTeX usage. (line 35) * autoadjust: three. (line 354) * autoimport: Options. (line 110) * automatic scaling: graph. (line 682) @@ -8867,7 +8876,6 @@ Index * firstcut: Paths and guides. (line 247) * fit: Frames and pictures. (line 103) * fit3: three. (line 269) -* fix-cm: Pens. (line 178) * fixedscaling: Frames and pictures. (line 74) * floor: Mathematical functions. (line 26) @@ -8934,7 +8942,7 @@ Index * guide: Paths and guides. (line 300) * guide3: three. (line 6) * hatch: Pens. (line 267) -* height: LaTeX usage. (line 31) +* height: LaTeX usage. (line 35) * help <1>: Debugger. (line 30) * help <2>: Help. (line 6) * help: Interactive mode. (line 44) @@ -9561,6 +9569,7 @@ Index * tube <1>: tube. (line 6) * tube: three. (line 110) * tutorial: Tutorial. (line 6) +* type1cm: Pens. (line 178) * typedef <1>: Functions. (line 36) * typedef: Data types. (line 344) * undefined: Paths and guides. (line 268) @@ -9603,10 +9612,10 @@ Index * verbatim: Frames and pictures. (line 271) * vertex-dependent colors: three. (line 81) * Vertical: flowchart. (line 81) -* viewportheight: LaTeX usage. (line 31) +* viewportheight: LaTeX usage. (line 35) * viewportmargin: three. (line 262) * viewportsize: three. (line 262) -* viewportwidth: LaTeX usage. (line 31) +* viewportwidth: LaTeX usage. (line 35) * views: three. (line 231) * vim: Editing modes. (line 33) * virtual functions: Structures. (line 181) @@ -9617,7 +9626,7 @@ Index * wheel mouse: GUI. (line 6) * while: Programming. (line 29) * white-space string delimiter mode: Arrays. (line 359) -* width: LaTeX usage. (line 31) +* width: LaTeX usage. (line 35) * windingnumber: Paths and guides. (line 268) * word: Arrays. (line 359) * write <1>: Arrays. (line 399) @@ -9688,41 +9697,41 @@ Index  Tag Table: Node: Top574 -Node: Description6833 -Node: Installation10334 -Node: UNIX binary distributions11387 -Node: MacOS X binary distributions12493 -Node: Microsoft Windows13377 -Ref: psview14087 -Node: Configuring15008 -Node: Search paths19229 -Node: Compiling from UNIX source20026 -Ref: multisampling20615 -Node: Editing modes23025 -Node: Subversion25457 -Node: Uninstall25920 -Node: Tutorial26270 -Ref: unitcircle30496 -Node: Drawing commands32432 -Node: draw34143 -Ref: arrows35291 -Node: fill40534 -Ref: gradient shading41578 -Node: clip45806 -Node: label46398 -Ref: Label47097 -Node: Bezier curves52822 -Node: Programming56399 -Ref: array iteration57213 -Node: Data types58295 -Ref: format67303 -Node: Paths and guides70906 -Ref: circle71160 -Ref: arctime76648 -Ref: extension80503 -Node: Pens87186 -Ref: fillrule94552 -Ref: basealign95449 +Node: Description6832 +Node: Installation10333 +Node: UNIX binary distributions11386 +Node: MacOS X binary distributions12492 +Node: Microsoft Windows13376 +Ref: psview14086 +Node: Configuring15007 +Node: Search paths19228 +Node: Compiling from UNIX source20025 +Ref: multisampling20614 +Node: Editing modes23024 +Node: Subversion25456 +Node: Uninstall25919 +Node: Tutorial26269 +Ref: unitcircle30495 +Node: Drawing commands32431 +Node: draw34142 +Ref: arrows35290 +Node: fill40533 +Ref: gradient shading41577 +Node: clip45805 +Node: label46397 +Ref: Label47096 +Node: Bezier curves52821 +Node: Programming56398 +Ref: array iteration57212 +Node: Data types58293 +Ref: format67301 +Node: Paths and guides70904 +Ref: circle71158 +Ref: arctime76646 +Ref: extension80501 +Node: Pens87184 +Ref: fillrule94550 +Ref: basealign95447 Ref: transparency98274 Ref: makepen101717 Ref: overwrite102555 @@ -9740,93 +9749,93 @@ Node: Files120055 Ref: cd121020 Ref: scroll125452 Node: Variable initializers128525 -Node: Structures131138 -Node: Operators138582 -Node: Arithmetic & logical138896 -Node: Self & prefix operators140870 -Node: User-defined operators141658 -Node: Implicit scaling142569 -Node: Functions143132 -Ref: stack overflow145885 -Node: Default arguments146449 -Node: Named arguments147188 -Node: Rest arguments149350 -Node: Mathematical functions152160 -Node: Arrays156767 -Ref: sort163817 -Ref: tridiagonal166221 -Ref: solve167449 -Node: Slices171642 -Node: Casts175532 -Node: Import177497 -Node: Static182724 -Node: LaTeX usage185618 -Node: Base modules191092 -Node: plain193592 -Node: simplex194244 -Node: math194517 -Node: interpolate197222 -Node: geometry197501 -Node: trembling198095 -Node: stats198446 -Node: patterns198706 -Node: markers198942 -Node: tree200725 -Node: binarytree200913 -Node: drawtree201502 -Node: syzygy201706 -Node: feynman201980 -Node: roundedpath202255 -Node: animation202538 -Ref: animate202955 -Node: embed204094 -Node: slide205883 -Node: MetaPost206223 -Node: unicode206939 -Node: latin1207827 -Node: babel208195 -Node: labelpath208424 -Node: labelpath3209244 -Node: annotate209555 -Node: CAD210026 -Node: graph210336 -Ref: ticks217465 -Ref: pathmarkers230744 -Ref: marker231209 -Ref: markuniform231560 -Ref: errorbars233351 -Ref: automatic scaling237407 -Node: palette248053 -Ref: images248171 -Ref: image252342 -Ref: logimage252820 -Ref: penimage253626 -Node: three254070 -Ref: PostScript3D278612 -Node: obj280304 -Node: graph3280556 -Ref: GaussianSurface285681 -Node: grid3286785 -Node: solids287525 -Node: tube288473 -Node: flowchart290708 -Node: contour295277 -Node: contour3300402 -Node: slopefield300709 -Node: ode302146 -Node: Options302406 -Ref: configuration file308251 -Ref: settings308251 -Ref: convert309452 -Node: Interactive mode312419 -Ref: history314572 -Node: GUI315877 -Node: GUI installation316380 -Node: GUI usage317510 -Node: PostScript to Asymptote318413 -Node: Help319169 -Node: Debugger320905 -Node: Credits322690 -Node: Index323622 +Node: Structures131250 +Node: Operators138694 +Node: Arithmetic & logical139008 +Node: Self & prefix operators140982 +Node: User-defined operators141770 +Node: Implicit scaling142681 +Node: Functions143244 +Ref: stack overflow145997 +Node: Default arguments146561 +Node: Named arguments147300 +Node: Rest arguments149462 +Node: Mathematical functions152272 +Node: Arrays156879 +Ref: sort163929 +Ref: tridiagonal166333 +Ref: solve167561 +Node: Slices171754 +Node: Casts175644 +Node: Import177609 +Node: Static182836 +Node: LaTeX usage185730 +Node: Base modules191468 +Node: plain193968 +Node: simplex194620 +Node: math194893 +Node: interpolate197598 +Node: geometry197877 +Node: trembling198471 +Node: stats198822 +Node: patterns199082 +Node: markers199318 +Node: tree201101 +Node: binarytree201289 +Node: drawtree201878 +Node: syzygy202082 +Node: feynman202356 +Node: roundedpath202631 +Node: animation202914 +Ref: animate203331 +Node: embed204470 +Node: slide206259 +Node: MetaPost206599 +Node: unicode207315 +Node: latin1208203 +Node: babel208571 +Node: labelpath208800 +Node: labelpath3209620 +Node: annotate209931 +Node: CAD210402 +Node: graph210712 +Ref: ticks217841 +Ref: pathmarkers231120 +Ref: marker231585 +Ref: markuniform231936 +Ref: errorbars233727 +Ref: automatic scaling237783 +Node: palette248429 +Ref: images248547 +Ref: image252718 +Ref: logimage253196 +Ref: penimage254002 +Node: three254446 +Ref: PostScript3D278988 +Node: obj280680 +Node: graph3280932 +Ref: GaussianSurface286057 +Node: grid3287161 +Node: solids287901 +Node: tube288849 +Node: flowchart291084 +Node: contour295653 +Node: contour3300778 +Node: slopefield301085 +Node: ode302522 +Node: Options302782 +Ref: configuration file308627 +Ref: settings308627 +Ref: convert309828 +Node: Interactive mode312795 +Ref: history314948 +Node: GUI316253 +Node: GUI installation316756 +Node: GUI usage317886 +Node: PostScript to Asymptote318789 +Node: Help319545 +Node: Debugger321281 +Node: Credits323066 +Node: Index323998  End Tag Table diff --git a/Master/texmf/doc/man/man1/asy.man1.pdf b/Master/texmf/doc/man/man1/asy.man1.pdf index 80ae55c122b..964a9724a2a 100644 Binary files a/Master/texmf/doc/man/man1/asy.man1.pdf and b/Master/texmf/doc/man/man1/asy.man1.pdf differ diff --git a/Master/texmf/tex/latex/asymptote/asymptote.sty b/Master/texmf/tex/latex/asymptote/asymptote.sty index 4dc89de1e52..4b0cda55ee1 100644 --- a/Master/texmf/tex/latex/asymptote/asymptote.sty +++ b/Master/texmf/tex/latex/asymptote/asymptote.sty @@ -3,7 +3,7 @@ %%% Modified by John Bowman %%% Adapted from comment.sty (Under GPL v2+) -\ProvidesPackage{asymptote}[2010/04/15 v1.12 Asymptote style file for LaTeX] +\ProvidesPackage{asymptote}[2010/07/05 v1.13 Asymptote style file for LaTeX] \RequirePackage{keyval} \RequirePackage{ifthen} \newif\ifASYinline @@ -24,25 +24,22 @@ \def\makeinnocent#1{\catcode`#1=12 } \def\csarg#1#2{\expandafter#1\csname#2\endcsname} \newwrite\AsyStream -\newread\AsyTestStream +\newwrite\AsyAllStream \newread\AsyTestTeXStream -\def\AsyFile{\jobname.asy} -\openin\AsyTestStream=\jobname_.pre -\ifeof\AsyTestStream +\openin\AsyStream=\jobname_.pre +\ifeof\AsyStream \else \input \jobname_.pre \fi -\closein\AsyTestStream% +\closein\AsyStream% -\immediate\openout\AsyStream=\AsyFile -\immediate\write\AsyStream{if(!settings.multipleView)}% -\immediate\write\AsyStream{ settings.batchView=false;}% +\immediate\openout\AsyAllStream=\jobname.asy \newif\ifASYattach \newif\ifASYtex - \newif\ifASYPDF + \ifx\pdfoutput\undefined \else \ifcase\pdfoutput @@ -50,19 +47,6 @@ \ASYPDFtrue \fi \fi -\ifx\XeTeXversion\undefined -\ifASYPDF -\immediate\write\AsyStream{settings.tex="pdflatex";}% -\fi -\else -\immediate\write\AsyStream{settings.tex="xelatex";}% -\ASYPDFtrue -\fi - -\ifASYinline -\immediate\write\AsyStream{settings.inlinetex=true;}% -\immediate\write\AsyStream{deletepreamble();}% -\fi \newbox\ASYbox \newcounter{asy} @@ -148,57 +132,57 @@ \gdef\ASYheight{}% \gdef\ASYviewportwidth{\ASYdefaultviewportwidth}% \gdef\ASYviewportheight{}% - \immediate\write\AsyStream{\@charrb);}% - \immediate\write\AsyStream{// End of Asymptote Figure \the\c@asy}% + \immediate\closeout\AsyStream + \ifASYtex - \openin\AsyTestStream=\Jobname-\the\c@asy_.tex + \openin\AsyStream=\AsyFile_.tex \else \ifASYPDF - \openin\AsyTestStream=\Jobname-\the\c@asy.pdf + \openin\AsyStream=\AsyFile.pdf \else - \openin\AsyTestStream=\Jobname-\the\c@asy.eps + \openin\AsyStream=\AsyFile.eps \fi \fi - \ifeof\AsyTestStream + \ifeof\AsyStream \ifASYtex - \PackageWarning{asymptote}{file \Jobname-\the\c@asy_.tex does not exist}% + \PackageWarning{asymptote}{file \AsyFile_.tex does not exist}% \else - \openin\AsyTestTeXStream=\Jobname-\the\c@asy_.tex + \openin\AsyTestTeXStream=\AsyFile_.tex \ifeof\AsyTestTeXStream \ifASYPDF - \PackageWarning{asymptote}{file \Jobname-\the\c@asy.pdf does not exist}% + \PackageWarning{asymptote}{file \AsyFile.pdf does not exist}% \else - \PackageWarning{asymptote}{file \Jobname-\the\c@asy.eps does not exist}% + \PackageWarning{asymptote}{file \AsyFile.eps does not exist}% \fi \else \catcode`:=12 - \input \Jobname-\the\c@asy_.tex% + \input \AsyFile_.tex% \fi \closein\AsyTestTeXStream% \fi - \closein\AsyTestStream% + \closein\AsyStream% \else - \closein\AsyTestStream% + \closein\AsyStream% \ifASYtex \catcode`:=12 - \input \Jobname-\the\c@asy_.tex% + \input \AsyFile_.tex% \else \ifASYattach \ifASYPDF - \openin\AsyTestStream=\Jobname-\the\c@asy+0.pdf + \openin\AsyStream=\AsyFile+0.pdf \fi - \ifeof\AsyTestStream - \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\Jobname-\the\c@asy}}% + \ifeof\AsyStream + \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile}}% \else - \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\Jobname-\the\c@asy+0}}% + \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile+0}}% \fi - \textattachfile{\Jobname-\the\c@asy.pdf}{\phantom{\copy\ASYbox}}% + \textattachfile{\AsyFile.pdf}{\phantom{\copy\ASYbox}}% \vskip-\ht\ASYbox% \indent% \box\ASYbox% - \closein\AsyTestStream% + \closein\AsyStream% \else - \includegraphics[hiresbb]{\Jobname-\the\c@asy}% + \includegraphics[hiresbb]{\AsyFile}% \fi \fi \fi @@ -229,22 +213,38 @@ \let\par\empty \stepcounter{asy}% \setkeys{ASYkeys}{#1}% - \immediate\write\AsyStream{}% - \immediate\write\AsyStream{// Beginning of Asymptote Figure \the\c@asy}% - \immediate\write\AsyStream{eval(quote\@charlb}% - \immediate\write\AsyStream{defaultfilename='\Jobname-\the\c@asy';}% + \immediate\write\AsyAllStream% + {eval(quote\@charlb include "\jobname-\the\c@asy";\@charrb);}% + \immediate\openout\AsyStream=\jobname-\the\c@asy.asy + \gdef\AsyFile{\Jobname-\the\c@asy} + \immediate\write\AsyStream{if(!settings.multipleView)}% + \immediate\write\AsyStream{ settings.batchView=false;}% + \ifx\XeTeXversion\undefined + \ifASYPDF + \immediate\write\AsyStream{settings.tex="pdflatex";}% + \fi + \else + \immediate\write\AsyStream{settings.tex="xelatex";}% + \ASYPDFtrue + \fi + + \ifASYinline + \immediate\write\AsyStream{settings.inlinetex=true;}% + \immediate\write\AsyStream{deletepreamble();}% + \fi + \immediate\write\AsyStream{defaultfilename="\AsyFile";}% \immediate\write\AsyStream{if(settings.render < 0) settings.render=4;}% \ifASYattach \immediate\write\AsyStream{settings.inlineimage=false;}% \immediate\write\AsyStream{settings.embed=false;}% - \immediate\write\AsyStream{settings.outformat='pdf';}% + \immediate\write\AsyStream{settings.outformat="pdf";}% \immediate\write\AsyStream{settings.toolbar=true;}% \else \immediate\write\AsyStream{settings.inlineimage=true;}% \immediate\write\AsyStream{settings.embed=true;}% - \immediate\write\AsyStream{settings.outformat='';}% + \immediate\write\AsyStream{settings.outformat="";}% \immediate\write\AsyStream{settings.toolbar=false;}% - \immediate\write\AsyStream{viewportmargin=(1,1);}% + \immediate\write\AsyStream{viewportmargin=(2,2);}% \fi \immediate\write\AsyStream{\globalASYdefs}% \let\ThisAsymptote\WriteAsyLine% @@ -257,11 +257,11 @@ \AsymptoteEndDef{asydef} \def\AfterasydefAsymptote{} -\AtEndDocument{\immediate\closeout\AsyStream} +\AtEndDocument{\immediate\closeout\AsyAllStream} \newcommand{\ASYanimategraphics}[5][]{% -\openin\AsyTestStream=_#3.pdf -\ifeof\AsyTestStream% +\openin\AsyStream=_#3.pdf +\ifeof\AsyStream% \else% \animategraphics[{#1}]{#2}{_#3}{#4}{#5}% \fi% diff --git a/Master/tlpkg/asymptote/asy.exe b/Master/tlpkg/asymptote/asy.exe index a068d7cfe3b..3daf4a36e76 100755 Binary files a/Master/tlpkg/asymptote/asy.exe and b/Master/tlpkg/asymptote/asy.exe differ diff --git a/Master/tlpkg/bin/tl-update-asy b/Master/tlpkg/bin/tl-update-asy index 80d0469a976..8c5a99c207f 100755 --- a/Master/tlpkg/bin/tl-update-asy +++ b/Master/tlpkg/bin/tl-update-asy @@ -75,8 +75,8 @@ elif false && $update_runtime_from_ainst; then xu=$B/source/utils xy=$xu/asymptote cd $xy - cp binaries/i386-win32/texlive/asy.exe $cb/ - cp binaries/i386-win32/texlive/asy.exe $pg/asymptote/ + $cp binaries/i386-win32/texlive/asy.exe $cb/ + $cp binaries/i386-win32/texlive/asy.exe $pg/asymptote/ cd /tmp/ainst $cp share/info/{*/,}*.info $xmf/doc/info @@ -102,7 +102,7 @@ elif false && $update_runtime_from_ainst; then $xmf/tex/*/asymptote" svn status $ci | sed -n 's/^\?//p' | fgrep -v binaries - #svn add ... + svn add `!!` cd /tmp/ainst diff -qr share/asymptote/ /home/texlive/karl/Master/texmf/asymptote/ | fgrep -v .svn -- cgit v1.2.3