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 got help yesterday on how to make \makeindex work (see link at bottom). I now realize that it would be better if I could make the perl script makeglossaries work, since I currently have to modify the call arguments for makeindex each time I want to define an additional glossary. When I try to run makeglossaries.bat from within TeXnicCenter, I get the following error message:

Can't execute C:\Program Files\MiKTeX 2.8\scripts\glossaries\makeglossaries.

The file makeindex is the perl script, and makindex.bat is a file that calls the perl script with the following lines:

@rem = '-*- Perl -*-
@echo off
perl -S "%~dp0makeglossaries" %*

A MWE of some sample code that I would like to be able to compile follows:

\documentclass{article}
\usepackage{glossaries}

\newacronym{SEM}{SEM}{scanning electron microscope}
\newacronym{TEM}{TEM}{transmission electron microscopy}
\newacronym{UHV}{UHV}{ultra-high vacuum}

\newglossary{variables}{vrb}{var}{List of variables}
\newglossaryentry{ai}{type=variables,name={a$_i$},sort=ai,description={Distribution coefficient}}
\newglossaryentry{ciI}{type=variables,name={c$_i^{I}$},sort=ciI,description={Concentration of element i}}

\makeglossaries

\begin{document}
\section{First Section} \label{Intro}

Intro. At some point, we used a \gls{SEM}, and the variable \gls{ai}.

\section{List of variables} \label{LoV}

\printglossaries
\end{document}

Any ideas on what goes wrong?

EDIT:

  1. makeindex works if used directly (from within TeXnicCenter, but without the makeglossaries perl script)

2 and 3. I am not sure to what degree the script and batch file work as intended. Here is a copy of what I did in the command prompt to examine this:

Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>perl makeglossaries asfd ^C at - line 1.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>@rem = '-- Perl --

C:\Program Files\MiKTeX 2.8\scripts\glossaries>perl -S "%~dp0makeglossaries" %* Can't execute %~dp0makeglossaries.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>perl -S makeglossaries Can't locate Getopt/Std.pm in @INC at ./makeglossaries line 66. BEGIN failed--compilation aborted at ./makeglossaries line 66.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>copy_makeglossaries Can't execute C:\Program Files\MiKTeX 2.8\scripts\glossaries\copy_makeglossaries .pl.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>copy_makeglossaries

C:\Program Files\MiKTeX 2.8\scripts\glossaries># @echo off '#' is not recognized as an internal or external command, operable program or batch file.

C:\Program Files\MiKTeX 2.8\scripts\glossaries>perl -S "C:\Program Files\MiKTeX 2.8\scripts\glossaries\copy_makeglossaries.pl" Can't execute C:\Program Files\MiKTeX 2.8\scripts\glossaries\copy_makeglossaries .pl.

Does it look like it is working? At least it is doing something, and I guess that means that Perl is working(?). The file copy_makeglossaries.bat calls the file copy_makeglossaries.pl. I wanted to see if adding an extension to the extensionless perl script would help, but it did not change things.


The old question from yesterday:

How do I make [\makeindex] work fully on my WinXP system (works on a different system)

share|improve this question
    
I'm a little confused; do you want to run makeglossaries or makeindex? If it's the first option, I believe the full path to the script has a typo; it would be C:\Program Files\MiKTeX 2.8\scripts\glossaries\makeglossaries instead. :) –  Paulo Cereda Jan 18 '12 at 18:32
    
@Paulo Cereda -- Yes, there was a typo. Thank you for pointing that out. I changed it in the question. –  hjb981 Jan 18 '12 at 20:52
    
Thanks for the update. :) According to your command prompt output, the Perl interpreter is recognized, but the script execution seems to fail. I'm no Perl expert, but I think your Perl distribution is the one to blame (maybe it's somehow broken). :( –  Paulo Cereda Jan 18 '12 at 21:51
    
Can't locate Getopt/Std.pm Yep. Looks like a broken module path or a missing module for Getopt. –  Sharpie Jan 19 '12 at 4:58
    
Thanks for the input. :) I will try two things: re-installing Perl and also updating to the latest glossaries package. I think that my MiKTeX 2.8 distribution came with some kind of Perl. Could it be a problem that I installed Strawberry Perl on top of that? I had the same problems before and after installing Strawberry Perl. –  hjb981 Jan 19 '12 at 7:33
add comment

1 Answer 1

You need to install Perl. There's a free version for Windows: ActivePerl Community Edition.

To debug, don't start with the editor but

  1. Check if makeindex works at all, run it yourself
  2. Test the Perl script
  3. Test the batch script
  4. Now you could test the editor integration
share|improve this answer
    
Thanks for your answer! I have already installed Strawberry Perl, and as far as I can tell, I can run Perl from the Command Prompt. Would it be better to install ActivePerl? –  hjb981 Jan 18 '12 at 18:13
    
    
I have edited my post with some testing of makeindex from the command prompt. I am not sure what to do next. –  hjb981 Jan 18 '12 at 21:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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