GeneralPackcage "glossaries" with TeXnicCenter - No glossary!

General information and discussion about TeXnicCenter
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Packcage "glossaries" with TeXnicCenter - No glossary!

Post by nlct »

Mikerada6 wrote:i tried doing as you said but i get an error:
" 'perl' is not recognized as an internal or external command, operable program or batch file."
That means that you don't have Perl installed on your system. If you don't have Perl installed, then you can't use makeglossaries, however you can use makeindex directly. The documentation contains a section called Generating the Associated Glossary Files which gives details.

There is some confusion regarding makeglossaries, so I'll try to explain it in more detail:

The file makeglossaries is a Perl script. When you run it, you need to specify the name of the document without any extension:

Code: Select all

makeglossaries filename
This reads in filename.aux and looks for all occurrences of \@newglossary. The glossaries package always creates the main (default) glossary, so you will always have the line

Code: Select all

\@newglossary{main}{glg}{gls}{glo}
This specifies the extensions required by makeindex:
glg - log file (check this file if something goes wrong with your glossary)
gls - typeset glossary file
glo - list of glossary entries to be sorted by makeindex

Once it has this information, makeglossaries can then run makeindex:

Code: Select all

makeindex -s filename.ist -t filename.glg -o filename.gls filename.glo
It does this for each instance of \@newglossary that it finds in the aux file.

If you don't have Perl installed, you can forget about makeglossaries and just use makeindex directly, but if you can install Perl, I recommend using makeglossaries, especially if you plan on using secondary glossaries (this includes the list of acronyms, if you use the acronym option). That way, you can just add a single makeglossaries entry to your build profile, rather than multiple makeindex lines.

A note on the difference between the files "makeglossaries" and "makeglossaries.bat":

On some systems (such as Unix) you can run a Perl script by typing the name of the Perl script at the terminal (assuming appropriate permissions and paths have been set). For example:

Code: Select all

makeglossaries filename
On other systems (such as Windows) you have to explicitly load the script into Perl. However in this case you will usually need to specify the full pathname to the makeglossaries script. The file makeglossaries.bat will do this for you, so if you type the following at the MSDOS Prompt:

Code: Select all

makeglossaries filename
This is equivalent to

Code: Select all

perl -S "%~dp0makeglossaries" filename
where %~dp0 is the full pathname to the makeglossaries script.

Hope this makes things a bit clearer.

Regards
Nicola Talbot

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply