summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/plain.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-16 17:27:26 +0000
committerKarl Berry <karl@freefriends.org>2017-04-16 17:27:26 +0000
commitfbb7e835bffb3653af5165cbcc62aef0df8bfe93 (patch)
tree556994e281f2760742f38823577c476dbcb84122 /Master/texmf-dist/asymptote/plain.asy
parentdf88f83b1126c57b3ca9b0371071f36caba3fbbf (diff)
asymptote 2.41 for TL17
git-svn-id: svn://tug.org/texlive/trunk@43843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/plain.asy')
-rw-r--r--Master/texmf-dist/asymptote/plain.asy18
1 files changed, 11 insertions, 7 deletions
diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy
index ac7106e6668..3bb8cf7ce93 100644
--- a/Master/texmf-dist/asymptote/plain.asy
+++ b/Master/texmf-dist/asymptote/plain.asy
@@ -281,14 +281,18 @@ if(settings.autoimport != "") {
cputime();
-void nosetpagesize() {
- if(latex()) {
+void nosetpagesize()
+{
+ static bool initialized=false;
+ if(!initialized && latex()) {
// Portably pass nosetpagesize option to graphicx package.
- if(settings.tex == "lualatex") {
- texpreamble("\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi");
- texpreamble("\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi");
- } else
- texpreamble("\let\paperwidthsave\paperwidth\let\paperwidth\undefined\usepackage{graphicx}\let\paperwidth\paperwidthsave");
+ texpreamble("\usepackage{ifluatex}\ifluatex
+\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi
+\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi\else
+\let\paperwidthsave\paperwidth\let\paperwidth\undefined
+\usepackage{graphicx}
+\let\paperwidth\paperwidthsave\fi");
+ initialized=true;
}
}