summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-12 23:00:13 +0000
committerKarl Berry <karl@freefriends.org>2016-11-12 23:00:13 +0000
commit60b942cf4d468afdd4f89723f3c9575573bede0b (patch)
treea00f7497448ff7c4a0394da206cba9b68bc4df95 /Master/texmf-dist
parenta5aba51a5e74b818caca645a873f9c7ec9774586 (diff)
pagesize compatibility, https://github.com/vectorgraphics/asymptote/issues/24
git-svn-id: svn://tug.org/texlive/trunk@42496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/asymptote/plain.asy22
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy
index c86cca630a6..2d4c419ae00 100644
--- a/Master/texmf-dist/asymptote/plain.asy
+++ b/Master/texmf-dist/asymptote/plain.asy
@@ -281,6 +281,22 @@ if(settings.autoimport != "") {
cputime();
-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");
+void nosetpagesize() {
+ if(latex() && pdf()) {
+ // Portably pass nosetpagesize option to graphicx package.
+ texpreamble("\makeatletter\newif\ifGin@setpagesize");
+ if(settings.tex == "pdflatex")
+ texpreamble("\input pdftex.def");
+ else if(settings.tex == "xelatex")
+ texpreamble("\input xetex.def");
+ else if(settings.tex == "lualatex") {
+ texpreamble("\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi");
+ texpreamble("\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi");
+ }
+ }
+}
+
+nosetpagesize();
+
+if(settings.tex == "luatex")
+ texpreamble("\input luatex85.sty");