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:
- 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)
makeglossaries
ormakeindex
? If it's the first option, I believe the full path to the script has a typo; it would beC:\Program Files\MiKTeX 2.8\scripts\glossaries\makeglossaries
instead.:)
:)
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).:(
Can't locate Getopt/Std.pm
Yep. Looks like a broken module path or a missing module for Getopt.