texlive[42496] Master/texmf-dist/asymptote/plain.asy: pagesize

commits+karl at tug.org commits+karl at tug.org
Sun Nov 13 00:00:13 CET 2016


Revision: 42496
          http://tug.org/svn/texlive?view=revision&revision=42496
Author:   karl
Date:     2016-11-13 00:00:13 +0100 (Sun, 13 Nov 2016)
Log Message:
-----------
pagesize compatibility, https://github.com/vectorgraphics/asymptote/issues/24

Modified Paths:
--------------
    trunk/Master/texmf-dist/asymptote/plain.asy

Modified: trunk/Master/texmf-dist/asymptote/plain.asy
===================================================================
--- trunk/Master/texmf-dist/asymptote/plain.asy	2016-11-12 22:26:34 UTC (rev 42495)
+++ trunk/Master/texmf-dist/asymptote/plain.asy	2016-11-12 23:00:13 UTC (rev 42496)
@@ -281,6 +281,22 @@
 
 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 at 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");



More information about the tex-live-commits mailing list