diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/man/man1/Makefile | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/xelatex-unsafe.1 | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/xelatex-unsafe.man1.pdf | bin | 0 -> 20375 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/xetex-unsafe.1 | 54 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/xetex-unsafe.man1.pdf | bin | 0 -> 20375 bytes | |||
-rw-r--r-- | Master/texmf-dist/dvipdfmx/dvipdfmx-unsafe.cfg | 10 | ||||
-rw-r--r-- | Master/texmf-dist/dvipdfmx/dvipdfmx.cfg | 25 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/texlive-extra/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/texlive-extra/xelatex-unsafe.sh | 24 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive-extra/xetex-unsafe.sh | 37 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/texlive/README | 12 |
11 files changed, 144 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/man/man1/Makefile b/Master/texmf-dist/doc/man/man1/Makefile index e5691a16ed1..b5aa6c6ee11 100644 --- a/Master/texmf-dist/doc/man/man1/Makefile +++ b/Master/texmf-dist/doc/man/man1/Makefile @@ -200,5 +200,8 @@ man1/xdvipdfmx.man1.pdf: man1/xdvipdfmx.1 man1/dvipdfmx.1 man1/xelatex-dev.man1.pdf: man1/xelatex-dev.1 man1/latex-dev.1 $(MKPDF) +man1/xelatex-unsafe.man1.pdf: man1/xelatex-unsafe.1 man1/xetex-unsafe.1 + $(MKPDF) + man1/xelatex.man1.pdf: man1/xelatex.1 man1/latex.1 $(MKPDF) diff --git a/Master/texmf-dist/doc/man/man1/xelatex-unsafe.1 b/Master/texmf-dist/doc/man/man1/xelatex-unsafe.1 new file mode 100644 index 00000000000..288cbb65307 --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/xelatex-unsafe.1 @@ -0,0 +1 @@ +.so man1/xetex-unsafe.1 diff --git a/Master/texmf-dist/doc/man/man1/xelatex-unsafe.man1.pdf b/Master/texmf-dist/doc/man/man1/xelatex-unsafe.man1.pdf Binary files differnew file mode 100644 index 00000000000..b230aa43f14 --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/xelatex-unsafe.man1.pdf diff --git a/Master/texmf-dist/doc/man/man1/xetex-unsafe.1 b/Master/texmf-dist/doc/man/man1/xetex-unsafe.1 new file mode 100644 index 00000000000..0813c8a295a --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/xetex-unsafe.1 @@ -0,0 +1,54 @@ +.TH XETEX-UNSAFE 1 "20 November 2021" +.SH NAME +xetex-unsafe, xelatex-unsafe \- run xe(la)latex unsafely +.SH SYNOPSIS +.B xetex-unsafe +.RI [ xetex-options ] +.B xelatex-unsafe +.RI [ xetex-options ] +.SH DESCRIPTION +\fBxetex-unsafe\fP (\fBxelatex-unsafe\fP) runs XeTeX (XeLaTeX) unsafely; +specifically, using the \fBdvipdfmx-unsafe.cfg\fP configuration file. +.PP +As of TeX Live 2022, doing this is necessary only when running XeTeX on +documents using PSTricks features which require transparency. We strongly +recommend using Lua(La)TeX with PSTricks instead of XeTeX in this case. +.PP +At all costs, avoid using this, or any, unsafe invocation with documents +off the net or that are otherwise untrusted in any way. +.SH WHY? +You might well ask why using transparency features is unsafe in XeTeX. +The answer lies in the implementation history of Ghostscript, starting +as a PostScript interpreter before PDF was invented, when it was +acceptable to abort on an error, whereas with PDF, it must keep going. +The transparency operators, if abused in relation to this error +recovery, can cause internal inconsistencies in Ghostscript's state. +.PP +Thus, to be safe, we must disallow transparency with Ghostscript by +default. The \fBxdvipdfmx\fP backend for XeTeX calls Ghostscript under +certain circumstances, notably when using PSTricks. +\fB(x)dvipdfmx\fP itself is not a PostScript interpreter, which is +exactly what PSTricks requires. +.PP +Thus, to enable transparency, \fBxe(la)tex-unsafe\fP run XeTeX with +arguments to the \fBxdvipdfmx\fP backend (-output-driver="xdvipdfmx -i +dvipdfmx-unsafe.cfg -q -E") to use \fBdvipdfmx-unsafe.cfg\fP, which in +turn tells Ghostscript to enable the transparency operators +(-dALLOWPSTRANSPARENCY). They're disabled by default. +.PP +There have been further complications related to reading from the +filesystem, but as of TL22, these have been solved. The transparency +issue cannot be solved without a different Ghostscript implementation, +and the Ghostscript developers say they have no timeline for this. +.PP +To repeat the above: when using PSTricks and transparency, we strongly +recommend playing it safe and using Lua(La)TeX instead of Xe(La)TeX. +.SH OPTIONS +All command-line arguments except \fB--help\fP and \fB--version\fP are +passed to Xe(La)TeX. +.SH BUGS +For more about XeTeX: https://tug.org/xetex +.PP +For more about PSTricks: https://tug.org/PSTricks +.PP +Email for xe(la)tex-unsafe specifically: https://lists.tug.org/dvipdfmx diff --git a/Master/texmf-dist/doc/man/man1/xetex-unsafe.man1.pdf b/Master/texmf-dist/doc/man/man1/xetex-unsafe.man1.pdf Binary files differnew file mode 100644 index 00000000000..e2a09b95539 --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/xetex-unsafe.man1.pdf diff --git a/Master/texmf-dist/dvipdfmx/dvipdfmx-unsafe.cfg b/Master/texmf-dist/dvipdfmx/dvipdfmx-unsafe.cfg index c37dd820122..e045df74ca9 100644 --- a/Master/texmf-dist/dvipdfmx/dvipdfmx-unsafe.cfg +++ b/Master/texmf-dist/dvipdfmx/dvipdfmx-unsafe.cfg @@ -4,7 +4,13 @@ %% This file is read after reading a default configuration file %% dvipdfmx.cfg via an option -i dvipdfmx-unsafe.cfg. Or, from XeTeX: %% -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" -%% (This is needed for PSTricks in XeTeX.) +%% It is needed for PSTricks in XeTeX. %% +%% Wrapper scripts xetex-unsafe and xelatex-unsafe do the above; +%% see their man page for more details. +%% +%% With the TL22 release and its dvipdfmx, we will remove -dNOSAFER here. +%% https://tug.org/pipermail/tex-live-commits/2021-November/019700.html +%% D "rungs -q -dALLOWPSTRANSPARENCY -dNOSAFER -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.cfg! +%% If you change the above rungs invocation, also change dvipdfmx.cfg! diff --git a/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg b/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg index dc154507acb..2a0f4e50524 100644 --- a/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg +++ b/Master/texmf-dist/dvipdfmx/dvipdfmx.cfg @@ -1,4 +1,4 @@ -%% $Id: dvipdfmx.cfg 38778 2015-11-05 00:08:29Z karl $ +%% $Id$ %% dvipdfmx.cfg for dvipdfmx and xdvipdfmx. (Public domain.) %% (maintained in TeX Live /source/ tree, copied to Master.) %% @@ -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/Master/texmf-dist/scripts/texlive-extra/README b/Master/texmf-dist/scripts/texlive-extra/README index 53854c6f407..55d0cebcecb 100644 --- a/Master/texmf-dist/scripts/texlive-extra/README +++ b/Master/texmf-dist/scripts/texlive-extra/README @@ -13,6 +13,6 @@ inherited from teTeX. See texmf-dist/scripts/texlive/README (i.e., ../texlive/README) for more info. -The principal mailing list is http://lists.tug.org/tex-live. +The principal mailing list is https://lists.tug.org/tex-live. All of these scripts are free software, mostly public domain. diff --git a/Master/texmf-dist/scripts/texlive-extra/xelatex-unsafe.sh b/Master/texmf-dist/scripts/texlive-extra/xelatex-unsafe.sh new file mode 100644 index 00000000000..de17ee3b7e4 --- /dev/null +++ b/Master/texmf-dist/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/Master/texmf-dist/scripts/texlive-extra/xetex-unsafe.sh b/Master/texmf-dist/scripts/texlive-extra/xetex-unsafe.sh new file mode 100755 index 00000000000..e07493cd6c3 --- /dev/null +++ b/Master/texmf-dist/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 <<END_USAGE +Usage: $0 [XETEX-ARGUMENT]... + +Run Xe(La)TeX unsafely, that is, using dvipdfmx-unsafe.cfg. All +command-line arguments, except --help and --version, are passed as-is to +Xe(La)TeX. + +As of TeX Live 2022, doing this is needed only when running XeTeX on +documents using PSTricks features which require transparency. We +recommend using Lua(La)TeX with PSTricks instead of XeTeX in this case. + +At all costs, avoid using this, or any, unsafe invocation with documents +off the net or that are otherwise untrusted in any way. + +For more details on this, please see the xetex-unsafe(1) man page, +or "texdoc xetex-unsafe". + +For more about XeTeX: https://tug.org/xetex +For more about PSTricks: https://tug.org/PSTricks +Email for xe(la)tex-unsafe specifically: https://lists.tug.org/dvipdfmx +END_USAGE + echo '$Id$' + exit 0 + +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/Master/texmf-dist/scripts/texlive/README b/Master/texmf-dist/scripts/texlive/README index 4758e0a84f0..f727fe3390d 100644 --- a/Master/texmf-dist/scripts/texlive/README +++ b/Master/texmf-dist/scripts/texlive/README @@ -2,13 +2,15 @@ $Id$ Master/texmf-dist/scripts/texlive (This file is public domain.) -This directory contains scripts for TeX Live. Unlike everything else -under Master/texmf-dist/scripts, except scripts/texlive-extra, most of -these scripts are actually maintained here, and not under Build. +This directory contains scripts for TeX Live. The scripts here are in +fact maintained here, and not under Build, unlike almost everything else +under Master/texmf-dist/scripts. (The other directory of +Master-maintained scripts is the sibling scripts/texlive-extra/.) There are slave copies of these Master-maintained scripts in Build/source/texk/texlive/linked_scripts, just as for the multitude of -scripts updated from CTAN. +scripts updated from CTAN. tlpkg/bin/tl-update-linked-scripts keeps +them in sync; it's invoked from the nightly cron. The man pages for the programs here, though, are still maintained in Build/, since that is almost 100% true in TL, and it seems better not to @@ -41,6 +43,6 @@ texlive-scripts - infraonly, important scripts (fmtutil, updmap, texlive-scripts-extra - not infraonly, little-used scripts (allcm, allec, texconfig, ...), changes pushed normally. -The principal mailing list is http://lists.tug.org/tex-live. +The principal mailing list is https://lists.tug.org/tex-live. All of these scripts are free software, mostly public domain. |