summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/utils/asymptote/base/plain.asy11
-rw-r--r--Master/texmf-dist/asymptote/plain.asy11
2 files changed, 6 insertions, 16 deletions
diff --git a/Build/source/utils/asymptote/base/plain.asy b/Build/source/utils/asymptote/base/plain.asy
index 71413ec145b..c86cca630a6 100644
--- a/Build/source/utils/asymptote/base/plain.asy
+++ b/Build/source/utils/asymptote/base/plain.asy
@@ -281,11 +281,6 @@ if(settings.autoimport != "") {
cputime();
-texpreamble("\newdimen\paperwidth");
-texpreamble("\newdimen\paperheight");
-bool luatex=settings.tex == "luatex";
-if(settings.tex == "lualatex" || luatex) {
- texpreamble("\let\pdfpagewidth\paperwidth");
- texpreamble("\let\pdfpageheight\paperheight");
- if(luatex) texpreamble("\input luatex85.sty");
-}
+texpreamble("\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\else\let\paperwidth\pdfpagewidth\fi");
+texpreamble("\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\else\let\paperheight\pdfpageheight\fi");
+if(settings.tex == "luatex") texpreamble("\input luatex85.sty");
diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy
index 71413ec145b..c86cca630a6 100644
--- a/Master/texmf-dist/asymptote/plain.asy
+++ b/Master/texmf-dist/asymptote/plain.asy
@@ -281,11 +281,6 @@ if(settings.autoimport != "") {
cputime();
-texpreamble("\newdimen\paperwidth");
-texpreamble("\newdimen\paperheight");
-bool luatex=settings.tex == "luatex";
-if(settings.tex == "lualatex" || luatex) {
- texpreamble("\let\pdfpagewidth\paperwidth");
- texpreamble("\let\pdfpageheight\paperheight");
- if(luatex) texpreamble("\input luatex85.sty");
-}
+texpreamble("\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\else\let\paperwidth\pdfpagewidth\fi");
+texpreamble("\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\else\let\paperheight\pdfpageheight\fi");
+if(settings.tex == "luatex") texpreamble("\input luatex85.sty");