[Tex/LaTex] Creating glossaries with package glossaries and its script makeglossaries

glossaries

I'm trying do add a list of acronyms and glossary items with the package glossaries. the \gls{...} are being replaced with the correct acronym.

I'm using MikTex 2.9 (with latest updates done 04.05.2011) and have Strawberry Perl 5.12.2 installed.

to generate my PDF file I run following commands

pdflatex thesis
bibtex thesis
makeglossaries thesis
pdflatex thesis
makeglossaries thesis
pdflatex thesis

while running makeglossaries thesis I get following message in my terminal.

makeglossaries version 2.03 (2011-12-02)
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 18.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 18.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 18.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 18.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 18.
added glossary type 'main' (glg,gls,glo)
added glossary type 'acronym' (alg,acr,acn)
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 27.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 27.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 27.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 27.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 27.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 28.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 28.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 28.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 28.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 28.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 29.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 29.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 29.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 29.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 29.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 30.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 30.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 30.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 30.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 30.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 31.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 31.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 31.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 31.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 31.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 461, <AUXFILE> line 32.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 473, <AUXFILE> line 32.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 482, <AUXFILE> line 32.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 488, <AUXFILE> line 32.
Use of uninitialized value $_ in pattern match (m//) at C:\Program Files (x86)\MiKTeX 2.9\scripts\glossaries\makeglossaries line 497, <AUXFILE> line 32.
Warning: File 'thesis.acn' is empty.
Have you used any entries defined in glossary 'acronym'?
Warning: File 'thesis.glo' is empty.
Have you used any entries defined in glossary 'main'?
Remember to use package option 'nomain' if you
don't want to use the main glossary.

I'm not sure what I'm doing wrong. I hope someone can help me.

Best Answer

sub scan_aux{
  my $name = shift;

  # v2.0 added
  local(*AUXFILE);

  if (open AUXFILE, "$name.aux")
  {
    while (<AUXFILE>)
    {

      # v1.9 added
      if (m/\\\@input{(.+)\.aux}/)
      {
        &scan_aux($1);
        next;  <<<<<<<<<<<<<----------------
      }
Related Question