1

I'm a relatively new user of Latex. I'm using TeXStudio on a Windows 8.1 system writing a long document (document class book). I'm trying to make glossaries package work properly and after ~2-3h of googling it kinda work. The same TeXStudio on a MacBook, with exact same *.tex files work flawlessly.

On windows, when I compile the glossary (F9), i get the following:

Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\\@input{ <-- HERE (.+)\.aux/ at C:\Program Files\MiKTeX 2.9\scripts\glossaries\makeglossaries line 634.

I'm not familiar with Perl syntax, but the 634 line is the following:

634 if (m/\\\@input{(.+)\.aux/})
635    {
636       &scan_aux($1);
 .
 .      # v2.04 added
 .      # (Fix provided by Daniel Grund) 
 .      next;
641    }

Compiling on the Mac is working properly.

I want to make it work on the windows system, as it's the professional computer that I use more often (I don't carry my Mac at work or my Win at home).

\documentclass[12pt]{book}
...
\usepackage[acronym, toc]{glossaries}
\input{./Tex_files/glossary.tex}
\makeglossaries

The glossary.tex is the following:

\newacronym{EBL}{EBL}{Electron Blocking Layer}
\newacronym{TFB}{TFB}{name)}

And i cite in the text as follows in two occasions, in chapters 1 and 2.

\acrfull{EBL}
\acrfull{TFB}

The main.tex file i use after the \begin{document} is as follows:

\begin{document}
....
\printglossary[type=\acronymtype, title= List of Abbreviations]
\mainmatter
\include{./TeX_files/chapter01} % Chapter 1
\include{./TeX_files/chapter02} % Chapter 2

I installed the Strawberry Perl version 5.26 64bit from perl.org as before installing it I got the message : "Perl interpreter not found".

My google searching didn't show any relative answers and therefore the post.. Sorry if it's a duplicate!

Many thanks in advance...

Alex

PS. Edited the document to add preamble and the rest of the code.

  • Showing a complete, minimal example that demonstrates the error is necessary. How else can we test if we can reproduce the problem? – Ulrike Fischer Jun 25 '17 at 15:26
  • Thanks for your reply. I edited the text to add the parts missing. – Alex Rpd Jun 25 '17 at 15:35
  • This is not minimal. – Ulrike Fischer Jun 25 '17 at 15:37
  • 1
    Your version of glossaries needs updating. – Nicola Talbot Jun 25 '17 at 19:07
  • 1
    @AlexandrosRapidis Your problem is probably resolved by Nicola's remark. But a remark regarding the example: In most cases it should be so that others can copy&paste it and try out if they can reproduce the problem and then perhaps debug it. This is easiest if examples are short and self-contained. \input, \include and snippets collections makes it more difficult to test the issue. – Ulrike Fischer Jun 25 '17 at 20:08
2

The key here is your Perl version on Windows. As you can see at the Perl doc site, one of the changes introduced in Perl 5.26 was forbidding of using unescaped braces { and } in regular expressions.

This means that line 634 in the makeglossaries script is now considered a bug and has to be reported to the glossaries package authors and fixed. This bug is already fixed, as Nicola Talbot said.

So if you can, you should upgrade your glossaries package.

If you can't do that you can escape the braces yourself (by prepending backslash to them) in this and other places

634 if (m/\\\@input\{(.+)\.aux/\})
635    {
636       &scan_aux($1);
 .
 .      # v2.04 added
 .      # (Fix provided by Daniel Grund) 
 .      next;
641    }

or downgrade your Perl distribution to 5.24.

  • The problem was fixed back in v2.17. (The current version of makeglossaries is v2.21.) So the simplest solution is to upgrade to the latest version of glossaries. – Nicola Talbot Jun 25 '17 at 19:06
  • @NicolaTalbot: Thank you for pointing to that. I've updated the answer. – Sergei Golovan Jun 25 '17 at 19:13
  • @NicolaTalbot and Sergei Many thanks for your answer guys. Much appreciated. Uninstalling and reinstalling Miktex 2.9 fixed the solution. Now I do get a warning of "XX.glo" is empty, but the compiling is going through! – Alex Rpd Jun 25 '17 at 23:59
  • @AlexandrosRapidis The empty .glo warning means you haven't used any entries in the main glossary. I'm guessing you're just using the acronym glossary. In which case use the package option nomain to indicate that you don't need the main (.glo) glossary and the warning should go away. – Nicola Talbot Jun 26 '17 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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