3

I am currently working on my master thesis and have to use MiKTeX in combination with TeXnicCenter for writing. I ran across a problem with makeindex.

In my Tex Files I use the glossary package. With this I create glossary entries and acronyms. TeXnicCenter allows me to insert one makeindex command. This is currently

"%tm".glo -t "%tm".glg -s "%tm".ist -o "%tm".gls

With this command I do not get what I exactly want. I get this via running the windows commands:

makeindex Masterarbeit.glo -s Masterarbeit.ist -t Masterarbeit.glg -o Masterarbeit.gls
makeindex -s Masterarbeit.ist -t Masterarbeit.alg -o Masterarbeit.acr Masterarbeit.acn

Is it possible to merge this into one and insert it into TeXnicCenter?

I noticed, that makeindex has to be executed before the pdf generation. How to trigger this? (So that new acronyms and glossary entries will be used then)

Thanks!

EDIT: This is the message, when I do not run my windows commands before pdf creation:

pdfTex warning (dest): name{glo:ABC} has been referenced but does not exist, replaces by a fixed one

  • Do you actually mean the glossary package (which has been obsolete for nearly 10 years) or did you mean to write the glossaries package? – Nicola Talbot Dec 16 '15 at 11:09
2

The right order of runs to get your pdf file including glossary and acronyms is:

  1. pdflatex Masterarbeit.tex (This first run creates the files you need for the creation of glossary and acronyms)
  2. makeindex (to make the glossary and the second makeindex to create the acronyms (later we use a batch to do both runs with one call))
  3. pdflatex (to include TOC, glossary and acronyms)
  4. pdflatex (to get correct page numbers at last)

I think the quickest way is to create a Windows batch file mwe.bat with two lines, containing both commands you need to run makeindex two times:

makeindex Masterarbeit.glo -s Masterarbeit.ist -t Masterarbeit.glg -o Masterarbeit.gls
makeindex -s Masterarbeit.ist -t Masterarbeit.alg -o Masterarbeit.acr Masterarbeit.acn

Put the batch file into the same directory where you have your tex code.

I could be that you have to add the relevant pathes, you will see when you try it.

In TeXnicCenter you have predefined output profiles, but you can define new ones by your own. Go in TeXnicCenter menu to Build --> Define Output profiles and select the profile you use to compile. Click Copy and type in a new name for the new copied profile, for example mwe-makeindex.

Check (La)TeX and click on the last box to uncheck (do not use makeindex in this profile).

Now click on post processor, click on new (find the symbol for a directory) and type a post processor name glossary. Add to executables the name of your batch file mwe.bat (add the path if needed). To close the window click on the OK button.

With this construction you can use the new output profile to compile your tex code and to use afterwards automaticly by TeXnicCenter the batch file mwe.bat to run both makeindex commands you need.

After compiling first, you get all files you need for makeindex. Then the batch is called to run both commands (thats the reason I used the post processor!).

The next compile run can work with both results of both makeindex commands.

I have only the german version of TeXnicCenter, but if you want I can include screenshots if the advice above is not clear.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.