summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/asymptote/asymptote.sty')
-rw-r--r--Master/texmf-dist/tex/latex/asymptote/asymptote.sty27
1 files changed, 18 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
index 4a2f484caad..2915f1238d1 100644
--- a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
+++ b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
@@ -9,7 +9,7 @@
%% The ASYMPTOTE package
%%
%% (C) 2003 Tom Prince
-%% (C) 2003-2010 John Bowman
+%% (C) 2003-2015 John Bowman
%% (C) 2010 Will Robertson
%%
%% Adapted from comment.sty
@@ -17,7 +17,7 @@
%% Licence: GPL2+
%%
\ProvidesPackage{asymptote}
- [2012/08/25 v1.27 Asymptote style file for LaTeX]
+ [2015/05/10 v1.29 Asymptote style file for LaTeX]
\def\Asymptote{{\tt Asymptote}}
\InputIfFileExists{\jobname.pre}{}{}
\newbox\ASYbox
@@ -93,11 +93,14 @@
\ASYattachtrue
}
\ProcessOptions*
+\def\asylatexdir{}
\def\asydir{}
+\def\ASYasydir{}
\def\ASYprefix{}
\newif\ifASYPDF
\ifxetex
\ASYPDFtrue
+ \usepackage{everypage}
\else
\ifpdf
\ASYPDFtrue
@@ -182,15 +185,23 @@
\next%
}
\endgroup
+\def\asy@init{
+ \def\ASYlatexdir{}
+ \ifx\asylatexdir\empty\else
+ \def\ASYlatexdir{\asylatexdir/}%
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYasydir{\asydir/}%
+ \fi
+ \def\ASYprefix{\ASYlatexdir\ASYasydir}%
+}
\newcommand\asy[1][]{%
\stepcounter{asy}%
\setkeys{ASYkeys}{#1}%
\ifASYattach
\ASYinlinefalse
\fi
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
@@ -204,7 +215,7 @@
\asy@input@graphic
}
\def\asy@write@graphic@header{%
- \immediate\openout\AsyStream=\ASYprefix\jobname-\the\c@asy.asy\relax
+ \immediate\openout\AsyStream=\ASYasydir\jobname-\the\c@asy.asy\relax
\gdef\AsyFile{\ASYprefix\Jobname-\the\c@asy}%
\immediate\write\AsyStream{%
if(!settings.multipleView) settings.batchView=false;^^J%
@@ -322,9 +333,7 @@
\ifASYattach
\ASYinlinefalse
\fi
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%