diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-10 15:35:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-10 15:35:19 +0000 |
commit | eeb7ae4de7332d6c9cd5b58e81748dc9d681887b (patch) | |
tree | 2769cf5cc164fb30cb1762aeeeb0b83014af8856 /Build/source/texk | |
parent | 745bdea88b30a8564c0915e91c2aa08d300598be (diff) |
doc,sync
git-svn-id: svn://tug.org/texlive/trunk@61016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLUtils.pm | 34 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/xeteximage.tex | 76 |
2 files changed, 95 insertions, 15 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index db2ef3421cc..4036f441b38 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -1,4 +1,3 @@ -# $Id: TLUtils.pm 59259 2021-05-18 21:39:53Z karl $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007-2021 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 @@ -6,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 59259 $'; +my $svnrev = '$Revision: 60823 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -112,7 +111,7 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany TeXLive::TLUtils::report_tlpdb_differences(\%ret); TeXLive::TLUtils::tlnet_disabled_packages($root); TeXLive::TLUtils::mktexupd(); - TeXLive::TLUtils::setup_sys_user_mode($optsref,$tmfc, $tmfsc, $tmfv, $tmfsv); + TeXLive::TLUtils::setup_sys_user_mode($prg,$optsref,$tmfc,$tmfsc,$tmfv,$tmfsv); TeXLive::TLUtils::prepend_own_path(); TeXLive::TLUtils::repository_to_array($str); @@ -1184,14 +1183,14 @@ time stamps are preserved and symlinks are created on Unix systems. On Windows, C<(-l $file)> will never return 'C<true>' and so symlinks will be (uselessly) copied as regular files. -If the argument is C<"-L"> and C<$file> is a symlink, the link is +If the first argument is C<"-L"> and C<$file> is a symlink, the link is dereferenced before the copying is done. (If both C<"-f"> and C<"-L"> -are desired, they must be given in that order, although the current code -has no need to do this.) +are desired, they must be given in that order, although the codebase +currently has no need to do this.) -C<copy> invokes C<mkdirhier> if target directories do not exist. Files -have mode C<0777> if they are executable and C<0666> otherwise, with -the set bits in I<umask> cleared in each case. +C<copy> invokes C<mkdirhier> if target directories do not exist. Files +start with mode C<0777> if they are executable and C<0666> otherwise, +with the set bits in I<umask> cleared in each case. C<$file> can begin with a C<file:/> prefix. @@ -1753,7 +1752,7 @@ sub _do_postaction_filetype { } my $cmd = $keyval{'cmd'}; - my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; + my $texdir = `kpsewhich -var-value=TEXMFROOT`; chomp($texdir); my $texdir_bsl = conv_to_w32_path($texdir); $cmd =~ s!^("?)TEXDIR/!$1$texdir/!g; @@ -1828,7 +1827,7 @@ sub _do_postaction_script { if (win32() && defined($keyval{'filew32'})) { $file = $keyval{'filew32'}; } - my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; + my $texdir = `kpsewhich -var-value=TEXMFROOT`; chomp($texdir); my @syscmd; if ($file =~ m/\.pl$/i) { @@ -1903,7 +1902,7 @@ sub _do_postaction_shortcut { &log("postaction $how shortcut for " . $tlpobj->name . "\n"); if ($how eq "install") { - my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; + my $texdir = `kpsewhich -var-value=TEXMFROOT`; chomp($texdir); my $texdir_bsl = conv_to_w32_path($texdir); $icon =~ s!^TEXDIR/!$texdir/!; @@ -4677,9 +4676,14 @@ sub mktexupd { =item C<setup_sys_user_mode($prg, $optsref, $tmfc, $tmfsc, $tmfv, $tmfsv)> -Return two-element list C<($texmfconfig,$texmfvar)> of which directories -to use, either user or sys. If C<$prg> is C<mktexfmt>, and the system -dirs are writable, use them even if we are in user mode. +Return two-element list C<($texmfconfig,$texmfvar)> specifying which +directories to use, either user or sys. If C<$optsref->{'sys'}> is +true, we are in sys mode; else if C<$optsref->{'user'}> is set, we are +in user mode; else a fatal error. + +If C<$prg> eq C<"mktexfmt">, and C<$TEXMFSYSVAR/web2c> is writable, use +it instead of C<$TEXMFVAR>, even if we are in user mode. C<$TEXMFCONFIG> +is not switched, however. =cut diff --git a/Build/source/texk/web2c/tests/xeteximage.tex b/Build/source/texk/web2c/tests/xeteximage.tex new file mode 100644 index 00000000000..7657ddf7918 --- /dev/null +++ b/Build/source/texk/web2c/tests/xeteximage.tex @@ -0,0 +1,76 @@ +% $Id$ +% Copyright 2020 Bruno Voisin <tex-live@tug.org> +% You may freely use, modify and/or distribute this file. +% +\ifx\fmtname\undefined + \input basic + \def\fmtname{basic} + \expandafter\dump +\fi +%================== +\special{pdf:minorversion 7} + +\topskip0pt + +\hbox{\XeTeXpicfile "1-4.jpg" width \hsize height \vsize} +\vfill\eject + +\hbox{\XeTeXpdffile "B.pdf" width \hsize height \vsize} +\vfill\eject + +\hbox{\XeTeXpicfile "lily-ledger-broken.png" width \hsize height \vsize} +\vfill\eject + +\vbox to\vsize{\vfill% + \special{pdf:image + width \the\hsize +% height \the\vsize + (1-4.jpg)}} +\eject + +\vbox to\vsize{\vfill% + \special{pdf:epdf + width \the\hsize +% height \the\vsize + (B.pdf)}} +\eject + +\vbox to\vsize{\vfill% + \special{pdf:image + width \the\hsize +% height \the\vsize + (lily-ledger-broken.png)}} +\eject + +\bye + +Date: Sat, 16 May 2020 01:33:51 +0200 +From: Bruno Voisin via tex-live <tex-live@tug.org> +To: tex-live@tug.org +Subject: Re: xetex test creation for reading pdf images? + +Here's a (very quickly) hacked adaptation of luaimage.tex to xetex. I commented out the format creation section at the beginning to test on my setup, after downloading + +Build/source/texk/web2c/luatexdir/tests/luaimage.tex + +Build/source/texk/web2c/tests/1-4.jpg +Build/source/texk/web2c/tests/B.pdf +Build/source/texk/web2c/tests/lily-ledger-broken.png + +Two forms of image inclusion commands are used: + +- \XeTeXpicfile and \XeTeXpdffile which are the original XeTeX commands, + +- \special{pdf:image and \special{pdf:epdf which are the (x)dvipdfm(x) specials, + +based on XeTeX-notes.pdf, xetex-reference.pdf, dvipdfm.pdf and dvipdfmx.pdf. + +There are some subtle differences between the two forms, not just their syntax but also the way they work. With the latter, specifying both the width and height in a way that alters the aspect ratio of the image does not seem to work: in this case, the image is nowhere to be seen. + +That's odd, because I looked at the associated xetex.def and dvipdfmx.def from the graphics package for double-checking and inspiration, and there seems to be no trick to deal with this, it seems to be business as usual with \Gin@req@width and \Gin@req@height. + +I won't be able to pursue the matter or maintain this file, it's just to get this thing started. (And I didn't attempt to modify the copyright at the beginning.) + +Bruno Voisin + +untyped binary data, xeteximage.tex [Press RETURN to save to a file] |