diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-17 00:50:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-17 00:50:23 +0000 |
commit | ddb181442c75e8cc1bd5c45a049086cf23346a8d (patch) | |
tree | dad30b2aba5f6ae1b3f2146cae74133186abb3ba /Master/texmf-dist/scripts | |
parent | b69e4a3602ebc7d4526af84b680cf63ed0cf9021 (diff) |
glossaries 3.01 (13apr11)
git-svn-id: svn://tug.org/texlive/trunk@22100 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/glossaries/makeglossaries | 61 |
1 files changed, 46 insertions, 15 deletions
diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries b/Master/texmf-dist/scripts/glossaries/makeglossaries index 51cf7780c12..df289eb8a39 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 : 2.02 (2011/04/02) +# Version : 2.03 (2011/12/02) # 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. -my $version="2.02 (2011-04-02)"; +my $version="2.03 (2011-12-02)"; # History: +# v2.03 (2011-04-12): +# * added warning about possibly needing 'nomain' package option # v2.02 (2011-04-2): # * Prints version number at start of run unless -q # * Added more diagnostics. @@ -368,12 +370,42 @@ else next; } + my $transcript; + +# v2.01 changed 'if ($opt_t eq "")' with 'unless ($opt)' + unless ($opt_t) + { + $transcript = "$name.$thistype{'log'}"; + } + else + { + $transcript = $opt_t; + } + # v1.6 added file empty test if (-z $inputfile) { - print "Warning: File '$inputfile' is empty.\n", + my $message = + "Warning: File '$inputfile' is empty.\n". "Have you used any entries defined in glossary '$type'?\n"; + if ($type eq 'main') + { + $message .= + "Remember to use package option 'nomain' if you\n". + "don't want to use the main glossary.\n"; + } + + warn $message; + + # Write warning to transcript file. + + if (open TRANSFD, ">$transcript") + { + print TRANSFD $message; + close TRANSFD; + } + # create an empty output file and move on to the next glossary if (open OFD, ">$outfile") @@ -389,18 +421,6 @@ else next; } - my $transcript; - -# v2.01 changed 'if ($opt_t eq "")' with 'unless ($opt)' - unless ($opt_t) - { - $transcript = "$name.$thistype{'log'}"; - } - else - { - $transcript = $opt_t; - } - # v2.01 remove old transcript file unless ($opt_n) @@ -834,6 +854,17 @@ sub xindy{ "No language detected.". "\nHave you remembered to use \\printglossary\n". "or \\printglossaries in your document?"; + + if ($in eq 'glo') + { + # or it may be that the user doesn't want to use the main + # glossary and has forgotten to suppress it with the + # "nomain" package option + + $diagnostic .= + "\nRemember to use package option 'nomain' if you don't\n". + "want to use the main glossary."; + } } die "\n***Call to xindy failed***\n", |