From ae24a641cd600f8ea75caac073a5eeac2e1c9708 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 1 Jul 2009 00:35:43 +0000 Subject: asyfig update (30jun09) git-svn-id: svn://tug.org/texlive/trunk@14037 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/asyfig/README | 12 ++++ Master/texmf-dist/doc/latex/asyfig/README.txt | 12 ++++ Master/texmf-dist/doc/latex/asyfig/asyfig.pdf | Bin 280740 -> 287660 bytes Master/texmf-dist/doc/latex/asyfig/asyfig.tex | 84 +++++++++++++++++----- Master/texmf-dist/tex/latex/asyfig/asyalign.sty | 70 +++++++++++++----- Master/texmf-dist/tex/latex/asyfig/asyfig.sty | 4 +- Master/texmf-dist/tex/latex/asyfig/asyprocess.sty | 2 +- 7 files changed, 143 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/asyfig/README b/Master/texmf-dist/doc/latex/asyfig/README index 22cb1bd947c..6295a8e66a3 100644 --- a/Master/texmf-dist/doc/latex/asyfig/README +++ b/Master/texmf-dist/doc/latex/asyfig/README @@ -1,8 +1,20 @@ __________________ The ASYFIG package +v0.1b This package provides an alternative to the asymptote package for including Asymptote graphics in a LaTeX document. In this package, all Asymptote figures are defined separately from the source in their own individual ".asy" files. This package uses Asymptote's inline mode so that labels in the graphics are produced by the main typesetting run; this ensures consistent font and size selection of text within the graphics. In addition, each individual ".asy" graphic can be very quickly processed individually to facilitate easy maintenance and editing of the graphics. +______________ +CHANGE HISTORY + +v0.1b + - Now supports Asymptote v1.78 (an internal macro was + changed that needed to be mirrored in this package) + +v0.1a + - Initial public release after Asymptote was added to + CTAN and TeX Live + ____________ INSTALLATION diff --git a/Master/texmf-dist/doc/latex/asyfig/README.txt b/Master/texmf-dist/doc/latex/asyfig/README.txt index 22cb1bd947c..6295a8e66a3 100644 --- a/Master/texmf-dist/doc/latex/asyfig/README.txt +++ b/Master/texmf-dist/doc/latex/asyfig/README.txt @@ -1,8 +1,20 @@ __________________ The ASYFIG package +v0.1b This package provides an alternative to the asymptote package for including Asymptote graphics in a LaTeX document. In this package, all Asymptote figures are defined separately from the source in their own individual ".asy" files. This package uses Asymptote's inline mode so that labels in the graphics are produced by the main typesetting run; this ensures consistent font and size selection of text within the graphics. In addition, each individual ".asy" graphic can be very quickly processed individually to facilitate easy maintenance and editing of the graphics. +______________ +CHANGE HISTORY + +v0.1b + - Now supports Asymptote v1.78 (an internal macro was + changed that needed to be mirrored in this package) + +v0.1a + - Initial public release after Asymptote was added to + CTAN and TeX Live + ____________ INSTALLATION diff --git a/Master/texmf-dist/doc/latex/asyfig/asyfig.pdf b/Master/texmf-dist/doc/latex/asyfig/asyfig.pdf index 0fc486aaf1b..8729afb2595 100644 Binary files a/Master/texmf-dist/doc/latex/asyfig/asyfig.pdf and b/Master/texmf-dist/doc/latex/asyfig/asyfig.pdf differ diff --git a/Master/texmf-dist/doc/latex/asyfig/asyfig.tex b/Master/texmf-dist/doc/latex/asyfig/asyfig.tex index f18c8eda5e5..3416c24c0ca 100644 --- a/Master/texmf-dist/doc/latex/asyfig/asyfig.tex +++ b/Master/texmf-dist/doc/latex/asyfig/asyfig.tex @@ -2,9 +2,21 @@ \begin{filecontents*}{README.txt} __________________ The ASYFIG package +v0.1b This package provides an alternative to the asymptote package for including Asymptote graphics in a LaTeX document. In this package, all Asymptote figures are defined separately from the source in their own individual ".asy" files. This package uses Asymptote's inline mode so that labels in the graphics are produced by the main typesetting run; this ensures consistent font and size selection of text within the graphics. In addition, each individual ".asy" graphic can be very quickly processed individually to facilitate easy maintenance and editing of the graphics. +______________ +CHANGE HISTORY + +v0.1b + - Now supports Asymptote v1.78 (an internal macro was + changed that needed to be mirrored in this package) + +v0.1a + - Initial public release after Asymptote was added to + CTAN and TeX Live + ____________ INSTALLATION @@ -34,7 +46,7 @@ Copyright 2008-2009 %%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5 \begin{filecontents}{asyfig.sty} -\ProvidesPackage{asyfig}[2009/06/23 v0.1a +\ProvidesPackage{asyfig}[2009/06/30 v0.1b Commands for using asymptote figures] % This package is the main user interface for inserting external |asy| figures @@ -187,46 +199,78 @@ Copyright 2008-2009 \newbox\ASYbox \newdimen\ASYdimen -\def\ASYbase#1#2{% - \setbox\ASYbox=\hbox{#1}% +\long\def\ASYbase#1#2{% + \leavevmode + \setbox\ASYbox\hbox{#1}% \ASYdimen=\ht\ASYbox - \setbox\ASYbox=\hbox{#2}% - \lower\ASYdimen\box\ASYbox} + \setbox\ASYbox\hbox{#2}% + \lower\ASYdimen\box\ASYbox +} \ifpdf - \def\ASYalign(#1,#2)(#3,#4)#5#6{% + + \long\def\ASYaligned(#1,#2)(#3,#4)#5#6#7{% \leavevmode - \setbox\ASYbox=\hbox{#6}% + \setbox\ASYbox\hbox{#7}% \setbox\ASYbox\hbox{% + \ASYdimen\ht\ASYbox + \advance\ASYdimen\dp\ASYbox \kern#3\wd\ASYbox - \raise#4\dimexpr\ht\ASYbox+\dp\ASYbox\relax\box\ASYbox}% + \raise#4\ASYdimen + \box\ASYbox + }% \put(#1,#2){% + #5\wd\ASYbox 0pt\dp\ASYbox 0pt\ht\ASYbox 0pt\box\ASYbox#6% + }% + } + + \long\def\ASYalignT(#1,#2)(#3,#4)#5#6{% + \ASYaligned(#1,#2)(#3,#4){% \special{pdf:q #5 0 0 cm}% - \wd\ASYbox\z@\dp\ASYbox\z@\ht\ASYbox\z@ - \box\ASYbox + }{% \special{pdf:Q}% - }} + }{#6}% + } + + \long\def\ASYalign(#1,#2)(#3,#4)#5{\ASYaligned(#1,#2)(#3,#4){}{}{#5}} + \let\ASYraw\@firstofone \else - \def\ASYalign(#1,#2)(#3,#4)#5#6{% + + \long\def\ASYaligned(#1,#2)(#3,#4)#5#6#7{% \leavevmode - \setbox\ASYbox=\hbox{#6}% + \setbox\ASYbox\hbox{#7}% \setbox\ASYbox\hbox{% + \ASYdimen\ht\ASYbox% + \advance\ASYdimen\dp\ASYbox \kern#3\wd\ASYbox - \raise#4\dimexpr\ht\ASYbox+\dp\ASYbox\relax\box\ASYbox}% - \put(#1,#2){% + \raise#4\ASYdimen + \box\ASYbox + }% + \put(#1,#2){#5\wd\ASYbox 0pt\dp\ASYbox 0pt\ht\ASYbox 0pt\box\ASYbox#6}% + } + + \long\def\ASYalignT(#1,#2)(#3,#4)#5#6{% + \ASYaligned(#1,#2)(#3,#4){% \special{% ps:gsave currentpoint currentpoint translate - [#5 0 0] concat neg exch neg exch translate}% - \box\ASYbox + [#5 0 0] concat neg exch neg exch translate% + }% + }{% \special{ps:currentpoint grestore moveto}% - }} + }{#6}% + } + + \long\def\ASYalign(#1,#2)(#3,#4)#5{\ASYaligned(#1,#2)(#3,#4){}{}{#5}} + \def\ASYraw#1{% currentpoint currentpoint translate matrix currentmatrix 100 12 div -100 12 div scale #1 - setmatrix neg exch neg exch translate} + setmatrix neg exch neg exch translate% + } + \fi \end{filecontents} @@ -411,6 +455,8 @@ Support for |asy| in a \LaTeX\ document is provided by the \pkg{asymptote} packa This package, \pkg{asyfig}, provides an alternative, whereby all |asy| figures are defined \emph{separately} from the source in their own individual |.asy| files. \pkg{asyfig} uses Asymptote's inline mode so that labels in the graphics are produced by the main typesetting run; this ensures consistent font and size selection of text within the graphics. In addition, each individual |.asy| graphic can be very quickly processed individually to facilitate easy maintenance and editing of the graphics. +This package works with Asymptote v1.78 (and later, probably). + \section{Getting started} Load the \pkg{asyfig} package like any other. I'll discuss the workflow of the package with an illustrative example. diff --git a/Master/texmf-dist/tex/latex/asyfig/asyalign.sty b/Master/texmf-dist/tex/latex/asyfig/asyalign.sty index 1bc05a30f7d..366c6f0e970 100644 --- a/Master/texmf-dist/tex/latex/asyfig/asyalign.sty +++ b/Master/texmf-dist/tex/latex/asyfig/asyalign.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `asyalign.sty' %% generated by the `filecontents' environment -%% from source `asyfig' on 2009/06/24. +%% from source `asyfig' on 2009/07/01. %% \ProvidesPackage{asyalign} @@ -11,45 +11,77 @@ \newbox\ASYbox \newdimen\ASYdimen -\def\ASYbase#1#2{% - \setbox\ASYbox=\hbox{#1}% +\long\def\ASYbase#1#2{% + \leavevmode + \setbox\ASYbox\hbox{#1}% \ASYdimen=\ht\ASYbox - \setbox\ASYbox=\hbox{#2}% - \lower\ASYdimen\box\ASYbox} + \setbox\ASYbox\hbox{#2}% + \lower\ASYdimen\box\ASYbox +} \ifpdf - \def\ASYalign(#1,#2)(#3,#4)#5#6{% + + \long\def\ASYaligned(#1,#2)(#3,#4)#5#6#7{% \leavevmode - \setbox\ASYbox=\hbox{#6}% + \setbox\ASYbox\hbox{#7}% \setbox\ASYbox\hbox{% + \ASYdimen\ht\ASYbox + \advance\ASYdimen\dp\ASYbox \kern#3\wd\ASYbox - \raise#4\dimexpr\ht\ASYbox+\dp\ASYbox\relax\box\ASYbox}% + \raise#4\ASYdimen + \box\ASYbox + }% \put(#1,#2){% + #5\wd\ASYbox 0pt\dp\ASYbox 0pt\ht\ASYbox 0pt\box\ASYbox#6% + }% + } + + \long\def\ASYalignT(#1,#2)(#3,#4)#5#6{% + \ASYaligned(#1,#2)(#3,#4){% \special{pdf:q #5 0 0 cm}% - \wd\ASYbox\z@\dp\ASYbox\z@\ht\ASYbox\z@ - \box\ASYbox + }{% \special{pdf:Q}% - }} + }{#6}% + } + + \long\def\ASYalign(#1,#2)(#3,#4)#5{\ASYaligned(#1,#2)(#3,#4){}{}{#5}} + \let\ASYraw\@firstofone \else - \def\ASYalign(#1,#2)(#3,#4)#5#6{% + + \long\def\ASYaligned(#1,#2)(#3,#4)#5#6#7{% \leavevmode - \setbox\ASYbox=\hbox{#6}% + \setbox\ASYbox\hbox{#7}% \setbox\ASYbox\hbox{% + \ASYdimen\ht\ASYbox% + \advance\ASYdimen\dp\ASYbox \kern#3\wd\ASYbox - \raise#4\dimexpr\ht\ASYbox+\dp\ASYbox\relax\box\ASYbox}% - \put(#1,#2){% + \raise#4\ASYdimen + \box\ASYbox + }% + \put(#1,#2){#5\wd\ASYbox 0pt\dp\ASYbox 0pt\ht\ASYbox 0pt\box\ASYbox#6}% + } + + \long\def\ASYalignT(#1,#2)(#3,#4)#5#6{% + \ASYaligned(#1,#2)(#3,#4){% \special{% ps:gsave currentpoint currentpoint translate - [#5 0 0] concat neg exch neg exch translate}% - \box\ASYbox + [#5 0 0] concat neg exch neg exch translate% + }% + }{% \special{ps:currentpoint grestore moveto}% - }} + }{#6}% + } + + \long\def\ASYalign(#1,#2)(#3,#4)#5{\ASYaligned(#1,#2)(#3,#4){}{}{#5}} + \def\ASYraw#1{% currentpoint currentpoint translate matrix currentmatrix 100 12 div -100 12 div scale #1 - setmatrix neg exch neg exch translate} + setmatrix neg exch neg exch translate% + } + \fi diff --git a/Master/texmf-dist/tex/latex/asyfig/asyfig.sty b/Master/texmf-dist/tex/latex/asyfig/asyfig.sty index 30b15b6d796..fa3c1dd3913 100644 --- a/Master/texmf-dist/tex/latex/asyfig/asyfig.sty +++ b/Master/texmf-dist/tex/latex/asyfig/asyfig.sty @@ -1,8 +1,8 @@ %% LaTeX2e file `asyfig.sty' %% generated by the `filecontents' environment -%% from source `asyfig' on 2009/06/24. +%% from source `asyfig' on 2009/07/01. %% -\ProvidesPackage{asyfig}[2009/06/23 v0.1a +\ProvidesPackage{asyfig}[2009/06/30 v0.1b Commands for using asymptote figures] % This package is the main user interface for inserting external |asy| figures diff --git a/Master/texmf-dist/tex/latex/asyfig/asyprocess.sty b/Master/texmf-dist/tex/latex/asyfig/asyprocess.sty index c665b37cba0..57b51494880 100644 --- a/Master/texmf-dist/tex/latex/asyfig/asyprocess.sty +++ b/Master/texmf-dist/tex/latex/asyfig/asyprocess.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `asyprocess.sty' %% generated by the `filecontents' environment -%% from source `asyfig' on 2009/06/24. +%% from source `asyfig' on 2009/07/01. %% \ProvidesPackage{asyprocess} \nofiles -- cgit v1.2.3