Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Can you show us a minimal example. –  Marco Daniel May 4 '11 at 17:54
    
@Marco it's working on my machine at home. it still sucks that it does not work at work but it will do. I still get the uninitialized value error but the glossary gets created. if someone else has the same problem, I would be willing to create a working example after my thesis (which is soon). But for me this problem is fixed. –  Malone May 4 '11 at 18:50
    
Is there a reason to call makeglossaries twice? I think you only need to call it once after the first pdflatex run. Is there any math used in the acronyms and id dyou pass the acronym option to the package? –  Martin H Jun 21 '11 at 13:43
    
Based on 'working for me', this is too localized. –  Joseph Wright Sep 3 '11 at 21:11
add comment

closed as too localized by Joseph Wright Sep 3 '11 at 21:10

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 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;  <<<<<<<<<<<<<----------------
      }
share|improve this answer
3  
Could you please add some text what this is supposed to be? –  Caramdir Jun 21 '11 at 13:42
    
Adding the marked line will fix the error. Apparently the recursive call will undefine $_. Hence the subsequent tests "if(m/...)" trigger the warning. As those test will not match if the first one matched, it is save to simply skip to the next loop iteration, which is done by next; –  Daniel Jun 21 '11 at 13:55
    
@Daniel Could you please include an explanation in your answer by editing it? –  N.N. Nov 16 '11 at 17:17
    
@Daniel, how to use it? Is this should kept in .latexmk file? –  volatNumbers Feb 2 '12 at 18:14
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.