I just have started to write my master thesis dissertation and I want to have an index section. I know about makeidx
package and \index{An important word!}
command. However, I was wondering if it's possible to create an external file containing all the words that I want to appear in the index section without using \index
command in the .tex
source file.
The point is if I'm going to use \index
command, eventually I will forgot to do so in some points.
If it is possible to use an external file, is it also possible to limit the depth of such indexing mechanism? What I mean by limiting is that [as an example] it only index the words if they appear in the subsections (and not in the subsubsection) or index only the first three occurrence in each section.
Obviously I can do this with some simple find-and-replace mechanism in a text editor or a script but I was wondering if there is some LaTeX magic for this purpose.
\input{file}
? that file can have your section, or other indexes.\index
and that is likely to be a far more robust approach.\index
command: Index-worthy terms that are used often should be given a macro that prints the word in text and in the index (and, ideally, an optional argument that will allow for you to give further sub-category differentiation); and an indexing command like\Index{<term>}
that will print in the text and in the index. Then using external tools for search-and-replace will become even easier to use. But as @egreg says: context is everything! You need to think at a higher level about the intended meaning of your document in order to index properly.