summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-23 20:14:27 +0000
committerKarl Berry <karl@freefriends.org>2021-09-23 20:14:27 +0000
commite5b21ac8f2058cbf69a1444fd7075f769037151a (patch)
treea4f3c6dc09f7d6b231addafe10e9c87ef82b7201 /Build
parenta0a43165d11c155e15abb9051332c8b4e5576db6 (diff)
glossaries (23sep21)
git-svn-id: svn://tug.org/texlive/trunk@60591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/glossaries/makeglossaries53
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua55
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl22
3 files changed, 84 insertions, 46 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries
index fe1e1248d9b..2d60ff66887 100755
--- a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries
+++ b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries
@@ -2,7 +2,7 @@
# File : makeglossaries
# Author : Nicola Talbot
-# Version : 4.45
+# Version : 4.47
# Description: simple Perl script that calls makeindex or xindy.
# Intended for use with "glossaries.sty" (saves having to remember
# all the various switches)
@@ -31,25 +31,15 @@
# glossaries-babel.sty, glossaries-polyglossia.sty, glossaries.perl.
# Also makeglossaries and makeglossaries-lite.lua.
-my $version="4.45 (2020-01-18)";
+my $version="4.47 (2021-09-20)";
# History:
-# v4.43:
-# * No change.
-# v4.41:
-# * No change.
-# v4.40:
-# * No change.
-# v4.39:
-# * No change.
-# v4.38:
-# * No change.
-# v4.37:
-# * No change.
-# v4.36:
-# * No change.
-# v4.35:
-# * No change.
+# v4.47:
+# * Added hybrid instructions if record option detected but not
+# \makeglossaries
+# * Added quote_if_spaced subroutine
+# v4.35 - v4.46:
+# * No change. (Version number updated in line with glossaries.sty)
# v4.34:
# * Added check for \glsxtr@resource
# v4.33:
@@ -350,9 +340,12 @@ unless ($istfile)
{
if ($foundbib2glsresource)
{
+# v4.47 added extra hybrid instructions
die "Found \\glsxtr\@resource in '$name.aux',\n",
"but not found \\\@istfilename.\n",
- "You need to run bib2gls not makeglossaries.\n";
+ "You need to run bib2gls not makeglossaries.\n",
+ "If you have used record=alsoindex or record=hybrid\n",
+ "then add \\makeglossaries to your preamble.\n";
}
else
{
@@ -818,6 +811,21 @@ sub scan_aux{
}
}
+# v4.47 new
+# Issue #129 was specifically about the Lua script but it's
+# likely the same problem would occur with this Perl script given
+# the same version of cmd.exe
+sub quote_if_spaced{
+ my ($str) = @_;
+
+ if ($str=~/ /)
+ {
+ $str = "\"$str\"";
+ }
+
+ $str;
+}
+
# v2.01 new subroutine run_app added
sub run_app{
my($appname, $appargs, $trans, $quiet, $dontexec) = @_;
@@ -833,9 +841,12 @@ sub run_app{
return if ($dontexec);
+ # v4.47
+ my $cmdstr = &quote_if_spaced($appname) . " $appargs";
+
# v2.11 added double-quotes around $appname
# v2.14 added -k switch
- if (not $opt_k and open (STATUS, "\"$appname\" $appargs 2>&1 |"))
+ if (not $opt_k and open (STATUS, "$cmdstr 2>&1 |"))
{
while (<STATUS>)
{
@@ -861,7 +872,7 @@ sub run_app{
"Retrying without redirection.\n" unless ($quiet or $opt_Q);
}
- $status = `\"$appname\" $appargs`;
+ $status = `$cmdstr`;
$log = $status;
diff --git a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua
index 5e2272ff094..bee21d2cfce 100755
--- a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua
+++ b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua
@@ -36,13 +36,13 @@
Also makeglossaries and makeglossaries-lite.lua.
History:
- * 4.45:
- - no change.
- * 4.44:
- - no change.
- * 4.41:
- - no change.
- * 4.40:
+ * 4.47:
+ - Added hybrid instructions if record option detected but not \makeglossaries
+ - Added extra info to error message on -d
+ - Fixed bug #183 that occurs when \@istfilename is missing
+ - Only add double-quotes if text contains any spaces which
+ may help address issue #129
+ * 4.40 - 4.46:
- no change.
* 4.39:
- corrected script name in version and help messages
@@ -68,7 +68,7 @@
- changed first line from lua to texlua
--]]
-thisversion = "4.45 (2020-01-18)"
+thisversion = "4.47 (2021-09-20)"
quiet = false
dryrun = false
@@ -163,6 +163,17 @@ function dorun(name, glg, gls, glo, language, codepage)
end
+-- v4.47 only add double-quotes if text contains any spaces
+function quote_if_spaced(str)
+
+ if string.find(str, " ") then
+ str = '"' .. str .. '"'
+ end
+
+ return str;
+
+end
+
function doxindy(name, glg, gls, glo, language, codepage)
if codepage == nil
@@ -170,14 +181,14 @@ function doxindy(name, glg, gls, glo, language, codepage)
codepage = "utf8"
end
- cmd = string.format('"%s" -I xindy -L %s -C %s -M "%s" -t "%s" -o "%s"',
- xindyexec, language, codepage, styfile, glg, gls)
+ cmd = string.format('%s -I xindy -L %s -C %s -M %s -t %s -o %s',
+ quote_if_spaced(xindyexec), language, codepage, quote_if_spaced(styfile), quote_if_spaced(glg), quote_if_spaced(gls))
if letterorder then cmd = string.format('%s -M ord/letorder', cmd) end
if quiet then cmd = string.format('%s -q', cmd) end
- cmd = string.format('%s "%s"', cmd, glo)
+ cmd = string.format('%s %s', cmd, quote_if_spaced(glo))
if dryrun then
@@ -194,7 +205,7 @@ end
function domakeindex(name, glg, gls, glo)
- cmd = string.format('"%s"', makeindex_m)
+ cmd = quote_if_spaced(makeindex_m)
if makeindex_c then cmd = cmd .. " -c" end
@@ -206,19 +217,19 @@ function domakeindex(name, glg, gls, glo)
if quiet then cmd = cmd .. " -q" end
- if glg ~= nil then cmd = string.format('%s -t "%s"', cmd, glg) end
+ if glg ~= nil then cmd = string.format('%s -t %s', cmd, quote_if_spaced(glg)) end
- if gls ~= nil then cmd = string.format('%s -o "%s"', cmd, gls) end
+ if gls ~= nil then cmd = string.format('%s -o %s', cmd, quote_if_spaced(gls)) end
if makeindex_p ~= nil then
cmd = string.format("%s -p %s", cmd, makeindex_p)
end
if styfile ~= nil then
- cmd = string.format('%s -s "%s"', cmd, styfile)
+ cmd = string.format('%s -s %s', cmd, quote_if_spaced(styfile))
end
- cmd = string.format('%s "%s"', cmd, glo)
+ cmd = string.format('%s %s', cmd, quote_if_spaced(glo))
if dryrun then
print(cmd)
@@ -275,7 +286,7 @@ while i <= #arg do
elseif arg[i] == "-d"
then
error(string.format(
- "The '%s' option isn't available for this light-weight version.\nYou will need to use the Perl version instead.",
+ "The '%s' option isn't available for this light-weight version. \n(Lua doesn't natively provide a function to change directory.) \nYou will need to use the Perl version instead \nor just change directory before running this script.",
arg[i]))
-- Xindy Options
@@ -382,15 +393,23 @@ then
-- v4.36: corrected check for double-quotes
styfile = string.match(aux, "\\@istfilename{([^}]*)}")
- styfile = string.gsub(styfile, "\"", "");
+
+-- v4.47: added check for null styfile (missing \@istfilename)
+ if styfile ~= nil
+ then
+ styfile = string.gsub(styfile, "\"", "");
+ end
if styfile == nil
then
if isbib2gls
then
+-- v4.47 added extra hybrid instructions
error([[
No \@istfilename found but found \glsxtr@resource.
You need to run bib2gls not makeglossaries-lite.
+If you have used record=alsoindex or record=hybrid
+then add \makeglossaries to your preamble.
]])
else
error([[
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index c3fce2f2678..d0eb1cf8165 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 60157 2021-08-04 01:42:52Z preining $
+# $Id: tlmgr.pl 60557 2021-09-20 10:46:43Z preining $
#
# Copyright 2008-2021 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 60157 $';
-my $datrev = '$Date: 2021-08-04 03:42:52 +0200 (Wed, 04 Aug 2021) $';
+my $svnrev = '$Revision: 60557 $';
+my $datrev = '$Date: 2021-09-20 12:46:43 +0200 (Mon, 20 Sep 2021) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -1658,7 +1658,15 @@ sub action_info {
} elsif ($opts{'data'}) {
# output format is changed to csv with " as quotes
# we need to determine the fields
- @datafields = split(',', $opts{'data'});
+ #
+ # Try to work around stupidiy in Windows where "," is interpreted in
+ # powershell (and cmd?)
+ # We optionally split at ":"
+ if ($opts{'data'} =~ m/:/) {
+ @datafields = split(':', $opts{'data'});
+ } else {
+ @datafields = split(',', $opts{'data'});
+ }
# check for correctness of data fields and whether remote is necessary
my $load_remote = 0;
for my $d (@datafields) {
@@ -8480,8 +8488,8 @@ C<--only-installed> and C<--only-remote> cannot both be specified.
=item B<--data C<item1,item2,...>>
-If the option C<--data> is given, its argument must be a comma separated
-list of field names from: C<name>, C<category>, C<localrev>,
+If the option C<--data> is given, its argument must be a comma or colon
+separated list of field names from: C<name>, C<category>, C<localrev>,
C<remoterev>, C<shortdesc>, C<longdesc>, C<installed>, C<size>,
C<relocatable>, C<depends>, C<cat-version>, C<cat-date>, C<cat-license>,
plus various C<cat-contact-*> fields (see below).
@@ -10231,7 +10239,7 @@ This script and its documentation were written for the TeX Live
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 60157 2021-08-04 01:42:52Z preining $
+$Id: tlmgr.pl 60557 2021-09-20 10:46:43Z preining $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html