(Simple?) Index question

Christina Thiele cthiele at ccs.carleton.ca
Thu Nov 27 17:32:18 CET 2003


David Ireland writes:
>
> Firstly, thanks to Robin Fairbairns for the answer to my previous BiBtEx
> question - problem solved.
>
> I have a question now about index generation:
>
> My document frogs.tex is structured
>
> \documentclass{book}
> \usepackage{makeidx}
> \makeindex
> \begin{document}
> The text of the document about frogs\index{frogs} and other wee jumpy
> beasties\index{beasties}.
> \printindex
> \end{document}
>
> Running frogs.tex I get a frogs.idx file (which has picked up my specifed
> \index entries).  Goossens' book tells me to then
>
> "...run the Makeindex program by typing the following command
>
> makeindex main.idx  %%(obviously I would use frogs.idx)
>
> This produces the file main.ind...you can now rerun LaTeX on the document
> and the index will appear."
>
> Other books say similar things.  Now I know I'm probably being really dumb
> here, but where exactly do I type this command to get my frogs.ind file?
>
> Thanks very much for any help
>
> David
>
>
>


David, I'm on a unixbox, so things may be a little bit different for
you but nevertheless, here are my instructions-to-me ;-) that I've
added to over the years, as I've worked with makeindex.

Secondly, I run `oldtex' for all my production files while `newtex' is
where the makeindex utilities reside.

See if there's anything here that will help.

Ch.

=============

Index-making via MakeIndex program:
==================================

%% To generate the index:
%%  a. tag all items in source .tex files with \index{...} command
%%     Coding tips:
%%       i. use @ for font switches:
%%                \index{word@{\it word}}
%%                \index{ACRO@\acro{ACRO}}
%%      ii. use " in front of ``
%%     iii. ensure \index is NOT inside a macro that includes a font
%%          or case switch, as these attributes will extend to the
%%          index entry itself
%%  b. create a run-file (this file), to process all files into one
%%     .dvi file
%%  c. confirm [makeidx] option in \documentstyle line of run-file
%%  d. add \makeindex command in run-file
%%  e. process run-file several times -- \makeindex generates an .idx
%%     file
%%  f. invoke `newtex', as MakeIndex program is provided with 2e
%%     distribution
%%  g. run `makeindex run-files.idx', to generate the .ind file,
%%     which has all the entries alphabetised, page ranges
%%     inserted, page duplicates suppressed. Check .ilg file for
%%     comments that mention `entries rejected' -- locate in the
%%     generated .idx file:
%%        Some causes: leading space: \index{ The ...
%%                     leading accents: \index{\'E...}
%%                                  --> \index{E...@\'E...}
%%                     \index{@...} --> \index{... at ...}
%%                     empty \index or \index{@} code
%%        \pit = \it in non-\normalsize contexts; to avoid, input
%%                   {\protect\it ...\/} rather than {\it ...\/}
%%
%%        Look at all entries for apparent duplicates and
%%           identify the small diffs: UC vs lc; spacing, font use,
%%           etc.
%%     Keep reprocessing until (most) all problems resolved.
%%  h. revert to `oldtex'
%%  i. insert the contents of run-files.ind file into a TeX-able
%%     index.tex file (uncomment `input index.tex' near bottom of this
%%     run-file) and process as a normal file
%%

\makeindex   %% requires [makeidx] in the above line





More information about the yandytex mailing list