Before I index 200 pages of my thesis manually, I need to ask if there is a better way to do this? For example, can I specify a file which contains keywords whose locations are to be indexed?
1 Answers
This can easily be achieved using Emacs and RefTeX.
With your cursor in your thesis,
press M-x reftex-index-visit-phrases-buffer (Alt-X …)
or press C-c | (Control-C, pipe).
This will open up the RefTeX Index Phrases file (a rip file).
Simply add all of your index terms there in the following format:
i <TAB> term <TAB> index entry
i <TAB> term 2 <TAB> index entry 2
...
Syntax highlighting will tell you if the line is in the correct syntax.
Once you've finished this, press C-c C-a.
RefTeX will jump back to your thesis and begin asking you which ones to replace.
I agree with the manual in not doing this all in one go.
This will take more time than you think,
so refer to the manual to see how to do chunks at a time.
The manual also describes all of the different functionality the rip file has;
I gave only the most basic example above.
RefTeX is great.
Edit
If your thesis is split into multiple files, you might also want to use AUCTeX, a huge corpus of excellent functionality for LaTeX within Emacs. You can install both AUCTeX and RefTeX using M-x package-list. (M-x is Alt-X.)
- 27,421
keywordwith\index{keyword}keyword– Sean Allred Jan 11 '14 at 18:42M-x query-replace-regexp. It will be a long process, but somewhat automated. – Sean Allred Jan 11 '14 at 19:44