[Tex/LaTex] Specify Perl location for makeglossaries

glossariesperltexniccenter

I am using the glossaries package to typeset some glossaries, on a MikTeX+TexnicCenter (Windows) setup.

There are administrative restrictions on the machine which means that I cannot install Perl, which is required in order to run the makeglossaries script.

I have downloaded the portable version of Strawberry Perl. But, I am not able to specify the bin directory of portable Perl and so makeglossaries script is not able to find the Perl interpreter.

Is there any way I can add the location of the Perl to makeglossaries?

Thanks.

Best Answer

Here is a solution that I have been able to figure out. I make an external batch file (callmakeglossaries.bat) that adds the path to the Perl executable, and then calls makeglossaries. I add this batch file as a postprocessor in the defined output profile, with the argument %tm.

REM batch file to run "makeglossaries" after adding path to portable Perl 
REM add the perl location to the path
path = %PATH%;F:\programming\perl\portableStrawberryPerl\perl\bin
"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\makeglossaries.exe" %1

Then I call that output profile from within TexnicCenter a few times. I hope this is of help to someone else too.

TeXstudio version: Follow the same procedure, but add in TeXstudio under Options/TeXstudio configurations/commands/Makeglossaries "D:\Users\<...>\callmakeglossaries.bat" %

Related Question