From cdb8cc3d9c6117cbec0b6935d177d829073b30fe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Nov 2021 23:01:11 +0000 Subject: scripts xetex-unsafe and xelatex-unsafe, for xetex+pstricks+transparency git-svn-id: svn://tug.org/texlive/trunk@61101 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg | 23 +++++--------- .../source/texk/texlive/linked_scripts/Makefile.am | 2 ++ .../source/texk/texlive/linked_scripts/Makefile.in | 14 ++++---- Build/source/texk/texlive/linked_scripts/README | 4 +-- .../source/texk/texlive/linked_scripts/scripts.lst | 8 ++--- .../linked_scripts/texlive-extra/xelatex-unsafe.sh | 24 ++++++++++++++ .../linked_scripts/texlive-extra/xetex-unsafe.sh | 37 ++++++++++++++++++++++ 7 files changed, 83 insertions(+), 29 deletions(-) create mode 100755 Build/source/texk/texlive/linked_scripts/texlive-extra/xelatex-unsafe.sh create mode 100755 Build/source/texk/texlive/linked_scripts/texlive-extra/xetex-unsafe.sh (limited to 'Build') diff --git a/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg b/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg index 18edec9ebe2..2a0f4e50524 100644 --- a/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg +++ b/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg @@ -119,15 +119,8 @@ P 0x003C %% Ghostscript (PS-to-PDF and PDF-to-PDF): %% -%% 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. +%% In TeX Live, we use the rungs wrapper instead of ps2pdf, in order to +%% use our own 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 @@ -137,27 +130,27 @@ P 0x003C %% %% 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). +%% https://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 +%% the lossy DCT (i.e., JPEG) filter. This can lead to inferior %% result (see the discussion at http://electron.mit.edu/~gsteele/pdf/). %% The "-dAutoFilterXXXImages" and "-dXXXImageFilter" options used %% below force all images to be encoded with the lossless Flate (zlib, %% same as PNG) filter. Note that if the PS file already contains DCT %% encoded images (which is possible in PS level 2), then these images %% will also be re-encoded using Flate. To turn the conversion off, -%% simply remove the options mentioned above. +%% remove the options mentioned above. %% -%% Incidentally, especially in TL, more than one dvipdfmx.cfg may exist. +%% Incidentally, more than one dvipdfmx.cfg may exist. %% You can find the one that is active by running: %% kpsewhich -progname=dvipdfmx -format=othertext dvipdfmx.cfg %% and control which one is found by setting DVIPDFMXINPUTS. %% -D "rungs -q -dALLOWPSTRANSPARENCY -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='%o' '%i' -c quit" -%% If you change the above invocation, also change dvipdfmx-unsafe.cfg! +D "rungs -q -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='%o' '%i' -c quit" +%% If you change the above rungs invocation, also change dvipdfmx-unsafe.cfg! % other random ps converters people have experimented with. %D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'" diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am index 4c0486c54a2..7109f4ac07a 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.am +++ b/Build/source/texk/texlive/linked_scripts/Makefile.am @@ -87,6 +87,8 @@ texmf_shell_scripts = \ texlive-extra/texconfig-sys.sh \ texlive-extra/texconfig.sh \ texlive-extra/texlinks.sh \ + texlive-extra/xetex-unsafe.sh \ + texlive-extra/xelatex-unsafe.sh texosquery/texosquery.sh \ texosquery/texosquery-jre5.sh \ texosquery/texosquery-jre8.sh \ diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index 7f3f6c4fb39..39660cb42ab 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -304,12 +304,8 @@ texmf_shell_scripts = \ texlive-extra/texconfig-sys.sh \ texlive-extra/texconfig.sh \ texlive-extra/texlinks.sh \ - texosquery/texosquery.sh \ - texosquery/texosquery-jre5.sh \ - texosquery/texosquery-jre8.sh \ - tikztosvg/tikztosvg \ - typeoutfileinfo/typeoutfileinfo.sh \ - wordcount/wordcount.sh + texlive-extra/xetex-unsafe.sh \ + texlive-extra/xelatex-unsafe.sh texmf_other_scripts = \ a2ping/a2ping.pl \ @@ -738,6 +734,12 @@ scripts-list: Makefile installdirs-local: $(MKDIR_P) $(DESTDIR)$(bindir) + texosquery/texosquery.sh \ + texosquery/texosquery-jre5.sh \ + texosquery/texosquery-jre8.sh \ + tikztosvg/tikztosvg \ + typeoutfileinfo/typeoutfileinfo.sh \ + wordcount/wordcount.sh install-data-hook: installdirs-local @WIN32_TRUE@ @for s in $(texmf_other_scripts); do \ @WIN32_TRUE@ t=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \ diff --git a/Build/source/texk/texlive/linked_scripts/README b/Build/source/texk/texlive/linked_scripts/README index d512a83ddb5..0938fbd6b9d 100644 --- a/Build/source/texk/texlive/linked_scripts/README +++ b/Build/source/texk/texlive/linked_scripts/README @@ -1,5 +1,5 @@ $Id$ -Copyright (C) 2012 Norbert Preining +Copyright 2012-2021 Norbert Preining You may freely use, modify and/or distribute this file. source/texk/texlive/linked_scripts @@ -27,5 +27,5 @@ Steps to add a new script (take your time, do it right): yourself -- don't use versions from distro packages. * make -C BLD/texk/texlive/linked_scripts scripts-list - where BLD is the build tree, to update the file scripts.lst in the + where BLD is the build tree, to update the file ./scripts.lst in the source tree (or manually update that file). diff --git a/Build/source/texk/texlive/linked_scripts/scripts.lst b/Build/source/texk/texlive/linked_scripts/scripts.lst index 0c9aadd46ea..7de1c78fca3 100644 --- a/Build/source/texk/texlive/linked_scripts/scripts.lst +++ b/Build/source/texk/texlive/linked_scripts/scripts.lst @@ -31,12 +31,8 @@ texlive-extra/texconfig-dialog.sh texlive-extra/texconfig-sys.sh texlive-extra/texconfig.sh texlive-extra/texlinks.sh -texosquery/texosquery.sh -texosquery/texosquery-jre5.sh -texosquery/texosquery-jre8.sh -tikztosvg/tikztosvg -typeoutfileinfo/typeoutfileinfo.sh -wordcount/wordcount.sh +texlive-extra/xetex-unsafe.sh +texlive-extra/xelatex-unsafe.sh a2ping/a2ping.pl accfonts/mkt1font accfonts/vpl2ovp diff --git a/Build/source/texk/texlive/linked_scripts/texlive-extra/xelatex-unsafe.sh b/Build/source/texk/texlive/linked_scripts/texlive-extra/xelatex-unsafe.sh new file mode 100755 index 00000000000..de17ee3b7e4 --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive-extra/xelatex-unsafe.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# $Id$ +# Public domain. Originally written by Karl Berry, 2021. +# Run Xe(La)TeX unsafely, for pstricks/transparency. See man page for more. + +if test "x$1" = x--help; then + mydir=`dirname $0` + if test -r "$mydir"/xetex-unsafe; then + xu="$mydir"/xetex-unsafe + elif test -r "$mydir"/xetex-unsafe.sh; then + xu="$mydir"/xetex-unsafe.sh + else + echo "$0: can't find companion xetex-unsafe[.sh] for help msg?" >&2 + exit 1 + fi + exec "$xu" --help # don't want to duplicate help message. + +elif test "x$1" = x--version; then + echo "$Id$" + exit 0 +fi + +cmd=`echo "$0" | sed s/-unsafe//` +exec "$cmd" -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" "$@" diff --git a/Build/source/texk/texlive/linked_scripts/texlive-extra/xetex-unsafe.sh b/Build/source/texk/texlive/linked_scripts/texlive-extra/xetex-unsafe.sh new file mode 100755 index 00000000000..e07493cd6c3 --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive-extra/xetex-unsafe.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# $Id$ +# Public domain. Originally written by Karl Berry, 2021. +# Run Xe(La)TeX unsafely, for pstricks/transparency. See man page for more. + +if test "x$1" = x--help; then + cat <