diff options
author | Karl Berry <karl@freefriends.org> | 2016-11-12 23:00:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-11-12 23:00:13 +0000 |
commit | 60b942cf4d468afdd4f89723f3c9575573bede0b (patch) | |
tree | a00f7497448ff7c4a0394da206cba9b68bc4df95 /Master/texmf-dist | |
parent | a5aba51a5e74b818caca645a873f9c7ec9774586 (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.asy | 22 |
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"); |