Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Master file:

\documentclass[dvipsnames,cmyk]{book}

% File Containing All the Control Settings
\usepackage{../../Style/mystyle}
\makeindex

\begin{document}

% Front Cover
\include {Front_Cover/frontcover}


% Chapters
\include {Chapters/CH_Analysis_of_Algorithms/Analysis_of_Algorithms}
\include {Chapters/CH_Abstract_Data_Types/Abstract_Data_Types}
\include {Chapters/CH_Arrays/Arrays}
\include {Chapters/CH_Linked_Lists/Linked_Lists}
\include {Chapters/CH_Stacks/Stacks}
\include  {Bibliography/biblio}

% Index
\printindex
\end{document}

I compiled it as follows:

$pdflatex master.tex

=> Empty idx file generated

$makeindex master.idx

This is makeindex, version 2.15 [TeX Live 2012] (kpathsea + Thai support). Scanning input file master.idx...done (0 entries accepted, 0 rejected). Nothing written in master.ind. Transcript written in master.ilg.

$pdflatex master.tex

Output: PDF with NO Index.

I am compiling from the command line using pdflatex (don't use latex to avoid boxing issues with graphics)

Please guide me on this issue.

share|improve this question
1  
The file you have provided here cannot compile as is: \printindex will make pdflatex choke. I assume you have something in your mystyle.sty file that allows you to compile your document. Also, why are you calling makeindex master.idx and yet makeindex is scanning control.idx for index entries (and, clearly finding none!)? Finally, are the dvipsnames and cmyk options mentioned when you are not using them? Minimal working examples are always valuable, but they can't be too minimal. –  jon Aug 24 '12 at 5:35
    
@HarishKumar -- You mean makeindex master.idx (or just master without an explicit extension)? –  jon Aug 24 '12 at 6:07
    
The command I fired was: makeindex master.idx. Should I drop '.idx' extension here? –  Sandeep Singh Aug 24 '12 at 6:19
2  
Then you should boil down to a MWE and only share that. This is a classic debug technique and could also help you find the mistake yourself. –  canaaerus Aug 24 '12 at 6:22
7  
Do you have \index commands at all? Without \index the .idx file would remain empty. –  Heiko Oberdiek Aug 24 '12 at 7:05
show 2 more comments

2 Answers 2

up vote 6 down vote accepted

(Just to end this thing:) In your given MWE were two problems:

  1. I can't see that you loads package makeidx. It seems you load it in mystyle.sty (your cited message tells this).
  2. As Heiko mentioned you have no macros \index{...} in your MWE.

A real working MWE for your case would look like this:

%http://tex.stackexchange.com/questions/68538/pdflatex-unable-to-generate-index
\documentclass{book}

\usepackage{makeidx}   % load package
\makeindex             % make file(s) *.idx

\begin{document}
Test\index{Test} Text\index{Text|textbf}

\printindex            % print index here
\end{document}

with the result, that everything is working now. Building such a MWE by your own helps you a lot to learn how TeX/LaTeX is working. Hope this helps you.

share|improve this answer
    
I was confused by the term 'automatic index generation'. I was expecting some dictionary generation. Thanks for the clarification. –  Sandeep Singh Aug 25 '12 at 2:56
add comment

when invoking makeindex from TexnicCenter I had the same error message. It screened mydocument.idx which was an empty file created when running LaTeX and subsequently found no entries and produced no output. I found the nomenclatures in mydocument.nlo where they are supposed to be. So makeindex just took the wrong input file and consequently produced no output because it was empty.

So you have to invoke makeindex on your own via the command window in windows (cmd). You have to go in the directory where your document lies (with cd ...) Then just run

makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls

And indeed makeindex makes the output file mydocuemnt.nls.

When you run LaTeX again it will find mydocument.nls and produce the nomenclature list.

share|improve this answer
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Torbjørn T. Mar 1 '13 at 18:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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