[Tex/LaTex] MiKTeX and Xindy problems

glossariesmiktexxindy

Today's updates of MiKTeX include Xindy (at last!). This is great news, but unfortunately I can't get it to work. With the following minimal example:

\documentclass{article}
\usepackage[xindy]{glossaries}
\newacronym{AKA}{AKA}{Also Known As}
\makeglossaries
\begin{document}
\glsaddall
\printglossaries
\end{document} 

makeglossaries fails with exit code 25. This is the contents of the .glg file:

;; This logfile was generated automatically by `xindy'
;; at 20.06.2015  07:29:59
;; Indexstyle: "5i3SDna0ed", Rawindex: "Yl65BHMXsP", Output: "test1.gls"

ERROR: "" is not a valid filename !

*** Unable to execute: '"xindy"  -L english  -I xindy -M "test1" -t "test1.glg" -o "test1.gls" "test1.glo"' ***

Failed with error code 1.

Status report:

Opening logfile "test1.glg" (done)
Reading indexstyle...
Loading module "5i3SDna0ed"...

Error in line 1:
(require "")
ERROR: "" is not a valid filename !

and this is the contents of the generated 5i3SDna0ed file

(require "")
(require "test1.xdy")

Do I need to configure something to get Xindy to work?

Best Answer

The problem is indeed related to a MiKTeX installation in a path containing spaces. It can be solved by a small edit in C:\Program Files\MiKTeX2.9\scripts\xindy\xindy.pl

replace in line 779

        @styles = glob("$lang_dir/$variant$cp*-lang.xdy");

by

        @styles = glob("'$lang_dir/$variant$cp*-lang.xdy'");
Related Question