4

I'm having trouble getting makeglossaries to run with xindy under MiKTeX.

Take example.tex here:

\documentclass[12pt]{book}   
\usepackage[xindy]{glossaries}

\newglossaryentry{egbert}{name={Egbert}, description={Egbert the Egg.}}     
\makeglossaries

\begin{document}

\gls{egbert} is my favourite!

\printglossaries

\end{document}

When makeglossaries is run on it, it yields the following error:

c:\example>makeglossaries -x "C:\localtexmf\scripts\xindy\xindy.pl" "example"
makeglossaries version 2.09 (2013-11-12)
added glossary type 'main' (glg,gls,glo)
C:\localtexmf\scripts\xindy\xindy.pl  -L english  -I xindy -M "example" -t "example.glg" -o "example.gls" "example.glo"
Opening logfile "example.glg" (done)
Reading indexstyle...
Loading module "KrcJssJlGD"...
Loading module "lang/english/latin9-lang.xdy"...
Loading module "lang/english/latin9.xdy"...
Finished loading module "lang/english/latin9.xdy".
Finished loading module "lang/english/latin9-lang.xdy".
Loading module "example.xdy"...
Loading module "tex.xdy"...
Finished loading module "tex.xdy".
Finished loading module "example.xdy".
Finished loading module "KrcJssJlGD".
Finished reading indexstyle.
Finalizing indexstyle... (done)

Reading raw-index "\"yPYZwvNIIm\""...ERROR: PARSE-NAMESTRING: syntax error in filename "\"yPYZwvNIIm\"" at position 0


***Call to xindy failed***

Check 'example.glg' for details

Edit (2014-01-13 8:41 EST):

xindy version information:

C:\example>xindy.pl --version
xindy release: 2.4
xindy.pl script version: 1.16
xindy kernel version: 3.0
CLISP version 2.49 (2010-07-07) (built on cj3001517-a [192.168.1.20])
architecture: PC/686

Output of xindy called by itself is the same: (except for the name of raw-index)

C:\example>C:\localtexmf\scripts\xindy\xindy.pl  -L english  -I xindy -M "example" -t "example.glg" -o "example.gls" "example.glo"
Opening logfile "example.glg" (done)
Reading indexstyle...
Loading module "uG0b_gG5K2"...
Loading module "lang/english/latin9-lang.xdy"...
Loading module "lang/english/latin9.xdy"...
Finished loading module "lang/english/latin9.xdy".
Finished loading module "lang/english/latin9-lang.xdy".
Loading module "example.xdy"...
Loading module "tex.xdy"...
Finished loading module "tex.xdy".
Finished loading module "example.xdy".
Finished loading module "uG0b_gG5K2".
Finished reading indexstyle.
Finalizing indexstyle... (done)

Reading raw-index "\"RkydxkLNfW\""...
ERROR: PARSE-NAMESTRING: syntax error in filename "\"RkydxkLNfW\"" at position 0
Speravir
  • 19,491
  • Did you add xindy according to How to use Xindy with MiKTeX? (or in a similar manner)? – Speravir Jan 13 '14 at 04:41
  • And forgotten: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Speravir Jan 13 '14 at 04:45
  • @Speravir Yes, I did follow the instructions in that post, although it's possible I made a mistake somewhere in the process. – fsutherland Jan 13 '14 at 04:52
  • It sounds a bit like User names too long or with diacritics except that you don't seem to have problematic path names. – Nicola Talbot Jan 13 '14 at 08:24
  • Just to add, your example works fine for me. What version of xindy are you using? (If you run xindy.pl --version on the command prompt, it should tell you.) Also, try running the xindy command explicitly instead of using makeglossaries. (The 4th line in your transcript above.) – Nicola Talbot Jan 13 '14 at 12:27
  • @NicolaTalbot No, I observe the same problem, and have no diacritics and no spaces in path (just ASCII letters, “-” and “_”). The only entry in TeX-SE_test.glg: *** Unable to execute: 'xindy -L english -I xindy -M "TeX-SE_test" -t "TeX-SE_test.glg" -o "TeX-SE_test.gls" "TeX-SE_test.glo"' ***. But I see now also, that xindy -V leaves to nothing here, not even an error. Must be further investigated. The test case in my linked tutorial works, though. – Speravir Jan 13 '14 at 17:22
  • @fsutherland I do not see no other solution for now than not using xindy, but makeindex. Also the direct call on commandline xindy -L english -I xindy -M "TeX-SE_test" -t "TeX-SE_test.glg" -o "TeX-SE_test.gls" "TeX-SE_test.glo" did not work. The strangest part here is, I do not get any error message. – Speravir Jan 13 '14 at 17:51
  • @Speravir That is a shame, because the document I'm preparing is in Chinese. From what I can gather, makeindex doesn't play well with UTF-8. – fsutherland Jan 13 '14 at 18:27
  • 1
    @fsutherland Use makeindex directly (see glossaries documentation) and its manual sorting rules with actualkey. Or install TeX Live portable. You must use then the command prompt provided from the menu, when you click on the tray bar symbol (also updating works from there). You get the tray entry with starting tl-tray-menu.exe. – Speravir Jan 13 '14 at 18:44
  • 1
    @fsutherland There is also the sort key for \newglossaryentry and companions. – Speravir Jan 13 '14 at 20:33
  • I was successful with giving absolute path to the script. So, the exe wrapper is the culprit here or a changed treatment of texmf.cnf. Perhaps it’s better to avoid this, but this needs tests … – Speravir Jan 13 '14 at 23:27
  • @NicolaTalbot In a test with giving the absolute path of xindy.pl I was successful here, but the error message of the OP shows backslashes in the filename, what are directory dividers in Windows. I remember now, that I once had this problem with glossaries, too. Could it be, that the OP should update your package? – Speravir Jan 14 '14 at 00:22
  • @Speravir It could well be the backslashes. I don't use Windows so I can't test it. According to Platform independent directory separator you can also use / as a directory divider in Windows, so perhaps try makeglossaries -x "C:/localtexmf/scripts/xindy/xindy.pl" "example" – Nicola Talbot Jan 14 '14 at 09:22
  • @NicolaTalbot Yes, this worked. But I did not have a problem with the backslash version, too, when giving the absolute path. The OP shows an error message with escaped double quotes (and the escape sign is the backslash), and this must be (or have been) somewhere in the (make)glossaries code - and must be avoided by the package author, I just do not remember who this is. ;-) – Speravir Jan 14 '14 at 18:03
  • @Speravir :-P Hmm, perhaps you can find someone can jog your memory. ;-) I'll see if I can add a check for backslashes in the path name when the OS is Windows, but I'll need someone to test it as I only have a Linux computer. – Nicola Talbot Jan 14 '14 at 18:10
  • @NicolaTalbot You could make a test for Windows and in dependence treat double quotes different. In xindy perl scripts similar is done. BTW: I’d love to check your test version – alas, I did not observe the issue here any more, so it would be useless. Maybe, it is a problem of Windows XP (I believe now, I still used it then, when I observed the same error). – Speravir Jan 16 '14 at 22:48
  • @Speravir I don't think there's a way for the Perl script to tell if double quotes were used to delimit the argument, but what I've done with v2.11 is checked $^O and if the OS is Windows the script substitutes backslashes for forward slashes (which should work with Perl on Windows). If you want to test it before I upload it to CTAN you can fetch the Perl script from http://www.dickimaw-books.com/expl/makeglossaries (The link will expire after I've uploaded the new version of glossaries.) – Nicola Talbot Jan 17 '14 at 11:11
  • Is there a way to debug the following command: runsystem(xindy -I xindy -L english -M myDoc -C utf8 -t myDoc.clg -o myDoc.cyi myDoc.cyg)...failed. I've 10 glossaries and the above is the only one where xindy fails. How do I check to see what is causing xindy to fail? – RosesBouquet Mar 13 '24 at 03:43

1 Answers1

2

I changed my tutorial How to use Xindy with MiKTeX? to reflect the changes of xindy and texindy executables. The new approach does work with the minimal example in the question.

Speravir
  • 19,491