-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathasymptote-fix.tex
47 lines (47 loc) · 1.18 KB
/
asymptote-fix.tex
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\ifluatex
\makeatletter
\def\asy@input@graphic{%
\ifASYinline
\IfFileExists{"\AsyFile.tex"}{%
\catcode`:=12\relax
\@@input"\AsyFile.tex"\relax
}{%
\PackageWarning{asymptote}{file `\AsyFile.tex' not found}%
}%
\else
\IfFileExists{"\AsyFile.\AsyExtension"}{%
\ifASYattach
\ifASYPDF
\IfFileExists{"\AsyFile+0.pdf"}{%
\setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile+0.pdf}}%
}{%
\setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile.pdf}}%
}%
\else
\setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile.eps}}%
\fi
\textattachfile{\AsyFile.\AsyExtension}{\phantom{\copy\ASYbox}}%
\vskip-\ht\ASYbox
\indent
\box\ASYbox
\else
\ifASYPDF
\includegraphics[hiresbb]{\AsyFile.pdf}%
\else
\includegraphics[hiresbb]{\AsyFile.eps}%
\fi
\fi
}{%
\IfFileExists{"\AsyFile.tex"}{%
\catcode`:=12
\@@input"\AsyFile.tex"\relax
}{%
\PackageWarning{asymptote}{%
file `\AsyFile.\AsyExtension' not found%
}%
}%
}%
\fi
}
\makeatother
\fi