MakeIndex, Nomenclature, Glossaries and AcronymsUnable to create an index

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
srinivas
Posts: 2
Joined: Sat Sep 04, 2010 4:32 pm

Unable to create an index

Post by srinivas »

Hi,
I have googled a lot and read many suggestions/posts on how to create an index. But, something seems to be lacking in the way I do it and I never been able to get index. Here is the scenario:

1. I use MikTex 2.8 on latest version of TexnicCenter, Windows XP sp 3.
2. makeindex.exe version is 2.14 [2002]
============================================================
3. When I use "%pm" in the command-line arguments to pass to makeindex, it gives an output like this:
This is C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file C:\Publications\ver1.0\main.tex ...done (0 entries accepted, 144 rejected).
Nothing written in C:\Publications\ver1.0\main.ind.
Transcript written in C:\Publications\ver1.0\main.ilg.

Latex-Result: 0 Error(s), 2 warning(s), 3 Bad Box(es), 9 page(s)

4. When I use "%bm" in the command-line arguments to pass to makeindex, it gives an output like this:

Input index file C:\Publications\ver1.0\main not found.
Usage: C:\Program Files\MiKTex 2.8\miktex\bin\makeindex.exe [-ilqrcgLT] ...
==========================================

I ran the "build current file" (Ctrl + F7) like 5 to 10 times....still no index is getting generated. I am unsure what is wrong.


A minimum working example is below:

----------------------------------------------
\documentclass[12pt]{article}

\usepackage{makeidx}
\makeindex

\begin{document}

here is an example of \index{indexing} indexing.

\printindex
\end{document}
----------------------------------------------

Am I missing something here? What exactly should the build commandline arguments be? How do I get the latest version of makeindex.exe (it seems to be very old - 2002). I tried googling and updating MikTex to 2.8...but still, it has an old makeindex.

Your suggestions are appreciated.

-Srinivas.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unable to create an index

Post by localghost »

What if I tell you that it works for me with TXC1 RC1 and TXC2 alpha 3 (Build 1118)?

Code: Select all

This is C:\Programme\MiKTeX 2.8\miktex\bin\makeindex.exe, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file H:\Foren\LaTeX-Community\tmp\srinivas\index-prblm.idx....done (1 entries accepted, 0 rejected).
Sorting entries...done (0 comparisons).
Generating output file H:\Foren\LaTeX-Community\tmp\srinivas\index-prblm.ind....done (5 lines written, 0 warnings).
Output written in H:\Foren\LaTeX-Community\tmp\srinivas\index-prblm.ind.
Transcript written in H:\Foren\LaTeX-Community\tmp\srinivas\index-prblm.ilg.
I ran exactly the code you provided and had no problems.

The striking difference is that in your message MakeIndex scans your *.tex file, and in my log it says that it scans the *.idx file. So there must me something wrong in your output profile. Compare your settings with those in the attachment.


Best regards and welcome to the board
Thorsten
Attachments
The »Profiles« dialogue window of TXC1 RC1.
The »Profiles« dialogue window of TXC1 RC1.
TXC1RC1-Profiles-MakeIndex.png (19.33 KiB) Viewed 17957 times
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Re: Unable to create an index

Post by Montag »

If the main file is a project in TXC, you need to enable the use of makeindex in its properties. This could be the case because apparently you ran the main file via "ctrl + F7".
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
srinivas
Posts: 2
Joined: Sat Sep 04, 2010 4:32 pm

Unable to create an index

Post by srinivas »

Dear Localghost,
Thanks for the response and pointing out the difference. I repeated the compilation and I found that it scans the *.tex file for me as against scanning the *.idx file. I am using TXC 1.0 RC 1.

I was switching back and forth from %bm% to %pm% in the commandline argument...and it generated the index. I am now perplexed as to why it worked now and what was the root cause.

Below is the output of the index-eg.ilg file when I use "%bm% as the commandline argument to the makeindex:

Code: Select all

This is C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file C:\Documents and Settings\Srinivas\Desktop\index-eg.tex...
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 1):
   -- Unknown index keyword \documentclass[12pt].
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 3):
   -- Unknown index keyword \usepackage.
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 5):
   -- Missing arguments -- need two (premature LFD).
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 7):
   -- Unknown index keyword \begin.
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 9):
   -- Unknown index keyword hereisanexampleof\index.
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 11):
   -- Missing arguments -- need two (premature LFD).
!! Input index error (file = C:\Documents and Settings\Srinivas\Desktop\index-eg.tex, line = 13):
   -- Unknown index keyword \end.
done (0 entries accepted, 7 rejected).
Nothing written in C:\Documents and Settings\Srinivas\Desktop\index-eg.ind.
Transcript written in C:\Documents and Settings\Srinivas\Desktop\index-eg.ilg.

And, this is "nice" log when the commandline argument is %bm% - again. I cannot explain this behaviour. It would be nice to know though...

Code: Select all

This is C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file C:\Documents and Settings\Srinivas\Desktop\index-eg.idx....done (1 entries accepted, 0 rejected).
Sorting entries...done (0 comparisons).
Generating output file C:\Documents and Settings\Srinivas\Desktop\index-eg.ind....done (5 lines written, 0 warnings).
Output written in C:\Documents and Settings\Srinivas\Desktop\index-eg.ind.
Transcript written in C:\Documents and Settings\Srinivas\Desktop\index-eg.ilg.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unable to create an index

Post by localghost »

srinivas wrote:[…] I was switching back and forth from %bm% to %pm% in the commandline argument...and it generated the index. I am now perplexed as to why it worked now and what was the root cause. […]
If the problem is solved with that, please mark the topic accordingly as clearly described in the Board Rules. This means to edit the initial post and not the last one.
Post Reply