Latex Glossaries with TeXnicCenter

Well, sometimes Latex can be annoying. How to create a glossary?

The package glossaries seems to be state of the art. I set it up as the following on my Windows machine with TeXnicCenter:

% in the preamble
\usepackage{glossaries}
\makeglossaries

Define a new output profile: Copy one of the existing profiles (e.g. "LaTeX > PDF") and add the following entries to the postprocessing tab:

    • makeglossaries #1
      Application: {full path to}/makeindex.exe
      Arguments: -s "%bm".ist -t "%bm".glg -o "%bm".gls "%bm".glo
    • makeacronyms #1
      Application: {full path to}/makeindex.exe
      Arguments: -s "%bm".ist -t "%bm".alg -o "%bm".acr "%bm".acn
    • pdflatex #2
      copy from (La)Tex tab
    • makeglossaries #2
      Application: {full path to}/makeindex.exe
      Arguments: -s "%bm".ist -t "%bm".glg -o "%bm".gls "%bm".glo
    • makeacronyms #1
      Application: {full path to}/makeindex.exe
      Arguments: -s "%bm".ist -t "%bm".alg -o "%bm".acr "%bm".acn
    • pdflatex #3
      copy from (La)Tex tab

This procedure avoids to use of makeglossaries.exe which requires that you have Perl installed. The iterative calls are described in the Latex Wikibook and it seems to work well this way. You can import my output profile:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<txcop:outputProfiles version="1" xmlns:txcop="http://schemas.ToolsCenter.org/TeXnicCenter/OutputProfiles.xsd">
<outputProfileList>
<outputProfile name="LaTeX &#8680; PDF (Glossary+Acronym)" stopOnLatexError="false">
<texCommand execute="true" path="pdflatex.exe" arguments="-interaction=nonstopmode -max-print-line=120 &quot;%pm&quot;"/>
<bibTexCommand execute="true" path="bibtex.exe" arguments="&quot;%bm&quot;"/>
<makeIndexCommand execute="true" path="makeindex.exe" arguments="&quot;%bm&quot;"/>
<postProcessors>
<processor name="makeglossaries #1" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.glg -o &quot;%bm&quot;.gls &quot;%bm&quot;.glo" inputFile="" outputFile=""/>
<processor name="makeacronyms #1" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.alg -o &quot;%bm&quot;.acr &quot;%bm&quot;.acn" inputFile="" outputFile=""/>
<processor name="pdflatex #2" path="pdflatex.exe" arguments="-interaction=nonstopmode -max-print-line=120 &quot;%pm&quot;" inputFile="" outputFile=""/>
<processor name="makeglossaries #2" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.glg -o &quot;%bm&quot;.gls &quot;%bm&quot;.glo" inputFile="" outputFile=""/>
<processor name="makeacronyms #2" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.alg -o &quot;%bm&quot;.acr &quot;%bm&quot;.acn" inputFile="" outputFile=""/>
<processor name="pdflatex #3" path="pdflatex.exe" arguments="-interaction=nonstopmode -max-print-line=120 &quot;%pm&quot;" inputFile="" outputFile=""/>
</postProcessors>
<viewer path="Acrobat.exe" closeBeforeCompilation="true">
<viewProjectCommand type="dde">
<commandLineCommand path="" arguments=""/>
<ddeCommand path="Acrobat.exe" server="acroview" topic="control" command="[DocOpen(&quot;%bm.pdf&quot;)][FileOpen(&quot;%bm.pdf&quot;)]"/>
</viewProjectCommand>
<viewCurrentFileCommand type="dde">
<commandLineCommand path="" arguments=""/>
<ddeCommand path="Acrobat.exe" server="acroview" topic="control" command="[DocOpen(&quot;%bm.pdf&quot;)][FileOpen(&quot;%bm.pdf&quot;)]"/>
</viewCurrentFileCommand>
<viewCloseCommand type="dde">
<commandLineCommand path="" arguments=""/>
<ddeCommand path="" server="acroview" topic="control" command="[DocClose(&quot;%bm.pdf&quot;)]"/>
</viewCloseCommand>
</viewer>
</outputProfile>
</outputProfileList>
</txcop:outputProfiles>

Mind, that if you use the hyperref package, to load this before the glossaries package. This way glossary entries will be automatically linked in the PDF output.


Reading Tip

Join the conversation

6 Comments

  1. Hi,
    your profile works well, if you replace the %bm with %tm. Otherwise makeindex will fail to handle files on Windows 7.

    Regards,

    bolbotos

  2. Hi there,
    thanks a lot. it took my a day to figure this out,
    anyhow i am using windows 8 with texniccenter (miktex) and it seems to work as well, just set the pdfreader again and you are good to go.
    One happy user
    sty

  3. Turns out Glossaries is one of those packages set out to f* beginners. If you dont use \glsaddall in the preamble or add a reference to a glossary entry in the text, nothing shows up. Just like Bibtex.
    It's working fine now.

    P.S.: Latex sucks if you have little time at your hands.

  4. Thanks for providing this explanation, Mr. Hoffmann. I wasted a whole day with trying the glossaries package to work. (I hope LaTeX will die out finally, due to its user-unfriendliness.)

    As an additional information:
    On my Windows 10 with TeXnicCenter 2.02 and with MikTeX 2.9 I also have to replace %bm by %tm

    Furthermore as an aside, to create a list of symbols, one has to add the following entry to the postprocessing-tab:

    Application: {full path to}/makeindex.exe
    Arguments: -s "%tm.ist" -t "%tm.slg" -o "%tm.syi" "%tm.syg"

    Again, create two such entries, call them makesymbols#1 and makesymbols#2 and place them in front of the respective pdflatex-entries.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.