summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/glossaries
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-04 21:12:37 +0000
committerKarl Berry <karl@freefriends.org>2017-11-04 21:12:37 +0000
commitfafc6938d345721a476b6c87746b07d6beb09bf3 (patch)
treeb7cda47dcfab2d5a9ee00cfa097fb3b75300b391 /Master/texmf-dist/scripts/glossaries
parent8ff328d8d6a3cf9e4ce34a6cd1ee676afe63be33 (diff)
glossaries (4nov17)
git-svn-id: svn://tug.org/texlive/trunk@45691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/glossaries')
-rw-r--r--Master/texmf-dist/scripts/glossaries/glossaries.perl2
-rwxr-xr-xMaster/texmf-dist/scripts/glossaries/makeglossaries97
-rwxr-xr-xMaster/texmf-dist/scripts/glossaries/makeglossaries-lite.lua21
3 files changed, 81 insertions, 39 deletions
diff --git a/Master/texmf-dist/scripts/glossaries/glossaries.perl b/Master/texmf-dist/scripts/glossaries/glossaries.perl
index 9065e966cf1..121a628350e 100644
--- a/Master/texmf-dist/scripts/glossaries/glossaries.perl
+++ b/Master/texmf-dist/scripts/glossaries/glossaries.perl
@@ -6,6 +6,8 @@
# Description : LaTeX2HTML (limited!) implementation of glossaries
# package. Note that not all the glossaries.sty
# macros have been implemented.
+# Note that this may not work with new versions of
+# LaTeX2HTML.
# This is a LaTeX2HTML style implementing the glossaries package, and
# is distributed as part of that package.
diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries b/Master/texmf-dist/scripts/glossaries/makeglossaries
index 6035b72b131..196662c18ce 100755
--- a/Master/texmf-dist/scripts/glossaries/makeglossaries
+++ b/Master/texmf-dist/scripts/glossaries/makeglossaries
@@ -2,7 +2,7 @@
# File : makeglossaries
# Author : Nicola Talbot
-# Version : 4.33
+# Version : 4.34
# Description: simple Perl script that calls makeindex or xindy.
# Intended for use with "glossaries.sty" (saves having to remember
# all the various switches)
@@ -27,9 +27,11 @@
# glossary-super.sty, glossaries.perl.
# Also makeglossaries and makeglossaries-lite.lua.
-my $version="4.33 (2017-09-20)";
+my $version="4.34 (2017-11-03)";
# History:
+# v4.34:
+# * Added check for \glsxtr@resource
# v4.33:
# * Version number synchronized with glossaries.sty
# v2.21:
@@ -315,18 +317,30 @@ my $letterordering = defined($opt_l);
# v2.19 added:
my $extramkidxopts = '';
-# check aux file for other glossary types
-# and for ist file name
+# v4.34 added:
+my $foundbib2glsresource = '';
+
+# Check aux file for other glossary types,
+# style file name and various other bits of information.
&scan_aux($name);
# has the style file been specified?
unless ($istfile)
{
- die "No \\\@istfilename found in '$name.aux'.\n",
- "Did your LaTeX run fail?\n",
- "Did your LaTeX run produce any output?\n",
- "Did you remember to use \\makeglossaries?\n";
+ if ($foundbib2glsresource)
+ {
+ die "Found \\glsxtr\@resource in '$name.aux',\n",
+ "but not found \\\@istfilename.\n",
+ "You need to run bib2gls not makeglossaries.\n";
+ }
+ else
+ {
+ die "No \\\@istfilename found in '$name.aux'.\n",
+ "Did your LaTeX run fail?\n",
+ "Did your LaTeX run produce any output?\n",
+ "Did you remember to use \\makeglossaries?\n";
+ }
}
# v2.08 added $xindyapp and $makeindexapp
@@ -658,9 +672,17 @@ sub scan_aux{
{
while (<AUXFILE>)
{
- #v2.20 added
+ #v2.14 added
+ if (m/\\\@gls\@reference/ and not $glslist)
+ {
+ die "Your document has used \\makenoidxglossaries\n",
+ "You don't need makeindex or xindy.\n";
+ }
+
if (m/\\glsxtr\@makeglossaries\{(.*)\}/)
{
+ #v2.20 added
+
$glslist = $1;
unless ($opt_q)
@@ -668,28 +690,20 @@ sub scan_aux{
print "only processing subset '$glslist'\n";
}
}
-
- #v2.14 added
- if (m/\\\@gls\@reference/ and not $glslist)
- {
- die "Your document has used \\makenoidxglossaries\n",
- "You don't need makeindex or xindy.\n";
- }
-
- # v1.9 added
- # v2.17 escaped { in regex
- if (m/\\\@input\{(.+)\.aux\}/)
+ elsif (m/\\\@input\{(.+)\.aux\}/)
{
+ # v1.9 added
+ # v2.17 escaped { in regex
&scan_aux($1);
# v2.04 added
# (Fix provided by Daniel Grund)
next;
}
-
- # v2.17 escaped { in regex
- if (m/\\\@newglossary\s*\{(.*)\}\{(.*)\}\{(.*)\}\{(.*)\}/)
+ elsif (m/\\\@newglossary\s*\{(.*)\}\{(.*)\}\{(.*)\}\{(.*)\}/)
{
+ # v2.17 escaped { in regex
+
$exttype{$1}{'log'} = $2;
$exttype{$1}{'out'} = $3;
$exttype{$1}{'in'} = $4;
@@ -699,10 +713,10 @@ sub scan_aux{
print "added glossary type '$1' ($2,$3,$4)\n";
}
}
-
- # v2.17 escaped { in regex
- if (m/\\\@istfilename\s*\{([^}]*)\}/)
+ elsif (m/\\\@istfilename\s*\{([^}]*)\}/)
{
+ # v2.17 escaped { in regex
+
$istfile = $1;
# check if double quotes were added to \jobname
@@ -718,26 +732,35 @@ sub scan_aux{
$istfile=~tr/\*/ /;
}
}
-
- # v1.5 added
- # v2.17 escaped { in regex
- if (m/\\\@xdylanguage\s*\{([^}]+)\}\{([^}]*)\}/)
+ elsif (m/\\\@xdylanguage\s*\{([^}]+)\}\{([^}]*)\}/)
{
+ # v1.5 added
+ # v2.17 escaped { in regex
+
$language{$1} = $2;
}
-
- # v1.5 added
- # v2.17 escaped { in regex
- if (m/\\\@gls\@codepage\s*\{([^}]+)\}\{([^}]*)\}/)
+ elsif (m/\\\@gls\@codepage\s*\{([^}]+)\}\{([^}]*)\}/)
{
+ # v1.5 added
+ # v2.17 escaped { in regex
+
$codepage{$1} = $2;
}
-
- # v2.19 added
- if (m/\\\@gls\@extramakeindexopts\{(.*)\}/)
+ elsif (m/\\\@gls\@extramakeindexopts\{(.*)\}/)
{
+ # v2.19 added
+
$extramkidxopts .= $1;
}
+ elsif (m/\\glsxtr\@resource/)
+ {
+ # v4.34 added
+
+ # No error at this point as a hybrid method is allowed.
+ # Error only occurs if no \@istfilename found.
+
+ $foundbib2glsresource = 1;
+ }
# v1.5 added
# Allow -l switch to override specification in aux file
diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries-lite.lua b/Master/texmf-dist/scripts/glossaries/makeglossaries-lite.lua
index 2b862c5061b..761383190f2 100755
--- a/Master/texmf-dist/scripts/glossaries/makeglossaries-lite.lua
+++ b/Master/texmf-dist/scripts/glossaries/makeglossaries-lite.lua
@@ -26,6 +26,8 @@
This work has the LPPL maintenance status `maintained'.
History:
+ * 4.34:
+ - added check for \glsxtr@resource
* 4.33:
- Version number synchronized with glossaries.sty
* 1.3
@@ -37,7 +39,7 @@
- changed first line from lua to texlua
--]]
-thisversion = "4.33 2017-09-20"
+thisversion = "4.34 2017-11-03"
quiet = false
dryrun = false
@@ -49,6 +51,8 @@ logfile = nil
isxindy = false
+isbib2gls = false
+
xindylang = nil
xindyexec = "xindy"
@@ -329,18 +333,31 @@ assert(io.input(auxfile),
aux = io.read("*a")
+if string.find(aux, "\\glsxtr@resource") ~= nil
+then
+ isbib2gls = true
+end
+
if styfile == nil
then
styfile = string.match(aux, "\\@istfilename{\"?([^}]*%.?%a*)\"?}")
if styfile == nil
then
- error([[
+ if isbib2gls
+ then
+ error([[
+No \@istfilename found but found \glsxtr@resource.
+You need to run bib2gls not makeglossaries-lite.
+ ]])
+ else
+ error([[
No \@istfilename found.
Did your LaTeX run fail?
Did your LaTeX run produce any output?
Did you remember to use \makeglossaries?
]])
+ end
end
end