From 0cc93a2d09127f686c92c363911bbdba4a91cbec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 1 Dec 2014 00:02:22 +0000 Subject: -sPAPERSIZE=a0 for pstricks under xetex git-svn-id: svn://tug.org/texlive/trunk@35703 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/dvipdfmx/dvipdfmx.cfg | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg b/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg index 1832f5a9a85..490de000745 100644 --- a/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg +++ b/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg @@ -120,6 +120,25 @@ P 0x003C %% ps2pdf is a front-end to gs. For a complete list of options, see %% http://ghostscript.com/doc/current/Ps2pdf.htm#Options %% +%% In TeX Live, we use the rungs wrapper instead of ps2pdf, becuse we +%% must omit the -dSAFER which ps2pdf specifies: in order for pstricks +%% to work with xetex, +%% /usr/local/texlive/*/texmf-dist/dvips/pstricks/pstricks.pro (for +%% example) needs to be accessed. Also, it is better to use our +%% supplied gs on Windows. +%% +%% Without the -dEPSCROP below, an eps file with negative llx/lly (as +%% created by MetaPost, for example) fails. In 2013, changes were made +%% to the drivers xetex.def, dvipdfmx.def, etc., to handle non-zero +%% llx/lly so we could use it. The file epsf-dvipdfmx.tex is available +%% from CTAN/TL/etc. to support plain's epsf.tex. +%% +%% In 2014, we discovered that -sPAPERSIZE=a0 was needed to support +%% pstricks under xetex; otherwise, images were cropped (see thread at +%% http://tug.org/pipermail/xetex/2014-November/025664.html). +%% Happily, it seems that using both -dEPSCROP and -sPAPERSIZE=a0 +%% simultaneously works ok. So that's we do below. +%% %% By default, gs encodes all images contained in a PS file using %% the lossy DCT (i.e., JPEG) filter. This often leads to inferior %% result (see the discussion at http://electron.mit.edu/~gsteele/pdf/). @@ -130,27 +149,12 @@ P 0x003C %% will also be re-encoded using Flate. To turn the conversion off, %% simply remove the options mentioned above. %% -%% The -dEPSCROP below converts PS files. Before TL 2013, -%% -sPAPERSIZE=a0 was used for this. In 2013, changes were made to -%% xetex.def, dvipdfmx.def, etc., to handle non-zero llx/lly. -%% -%% In TeX Live, we use the rungs wrapper instead of ps2pdf, becuse we -%% must omit the -dSAFER which ps2pdf specifies: in order for pstricks -%% to work with xetex, -%% /usr/local/texlive/*/texmf-dist/dvips/pstricks/pstricks.pro (for -%% example) needs to be accessed. (Also, it is better to use our -%% supplied gs on Windows.) You can also add -dNOSAFER to the ps2pdf -%% command line. -%% %% Incidentally, especially in TL, more than one dvipdfmx.cfg may be %% extant. You can find the one that is active by running: %% kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg %% and control which one is found by setting DVIPDFMXINPUTS. %% -D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit" - -% pre-2013 invocation using -sPAPERSIZE instead of -dEPSCrop, no other changes: -%D "rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit" +D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit" % other random ps converters people have experimented with. %D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'" -- cgit v1.2.3