## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ How do I create index

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
nlct
Posts: 275
Joined: Thu Nov 06, 2008 11:15 am

### Re: How do I create index

A proper index needs skill which is why some publishers hire a specialist index editor: you can't expect any system to do that automatically. I think the key is to plan in advance before writing your book, rather than leaving it until you have written 20-30 chapters. What kind of things are you likely to index? If I'm writing a technical report, I often define \keyword{word} which prints its argument and indexes it:
\newcommand*{\keyword}[1]{#1\index{#1}}

\newcommand*{\keyword}[2][]{#2\index{#2#1}}

For example:
Here I mention \keyword{term}. Here is the principle definition of \keyword[|textbf]{term}.

Regards
Nicola Talbot

arwintcher
Posts: 29
Joined: Thu Feb 19, 2009 3:23 pm
Probably because you don't always want every single instance of a word in your index, just the meaningful ones.

diamondsteed
Posts: 2
Joined: Sat Nov 07, 2009 4:19 am
I am writing my .tex file in a text editor and then I use a .bat file to run texify.exe. Where do I put the line
makeindex -s mcgillnopage.ist abbr
to properly generate my index?
Do I put it in the .bat file? Or somewhere in the .tex file (see stripped down version below)?

\documentclass[12pt,Bold,letterpaper,TexShade]{mcgilletdclass}%various \usepackages\makeindex[abbr]\begin{document} \maketitle% \begin{romanPagenumber}{2}% %various frontmatter \tableofcontents %\listoftables %\listoffigures %\printindex[abbr]{List of Symbols and Abbreviations}{List of Symbols and Abbreviations} \end{romanPagenumber} %mainmatter \index[abbr]{EG@example} \end{document}

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
diamondsteed wrote:[...] Do I put it in the .bat file? Or somewhere in the .tex file (see stripped down version below)? [...]

This line goes into the batch file.

Best regards and welcome to the board
Thorsten¹
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

diamondsteed
Posts: 2
Joined: Sat Nov 07, 2009 4:19 am
localghost wrote:
diamondsteed wrote:[...] Do I put it in the .bat file? Or somewhere in the .tex file (see stripped down version below)? [...]

This line goes into the batch file.

Best regards and welcome to the board
Thorsten¹

Thanks!
Linda