On Wednesday 24 October 2007 17:00, Frederick Noronha [फ़रेदरिक नोरोनया] wrote: > Is there some way I can automate the generation of a Lyx index? > Manually selecting all the entries (multiple times) can be tiresome > and time-consuming... FN
The following answer to your question is my subjective opinion -- treat it as such. You could write a script to generate index entries, but the result would be a disservice to your readers. Having an index entry for every occurrence of a word, which is what would be produced by an index-entry-making script, would produce many irrelevent index entries, and drown the important entries in a sea of irrelevencies. Not only that, but in many cases you need to mark a range of pages as an index entry (using |( and |)), and that could not be produced with an index-entry-making script. As a result, index entries must be input by hand. It's the most boring, dirty, distasteful work an author does, but it's necessary to produce a product useful to the reader. Here's how I do it: 1) I write the LyX file out to text. 2) Using Vim, I put each word on its own line A: %s/\s\s*/\r/g 3) I run the resulting file through sort -u 4) I now have an alphabetized list of every word in the book. For each word, I think of all book relevent phrases that could be made with that word. I add such phrases to the list. If the word is not important, nor is it part of a relevent phrase, I delete it from the list. Generally speaking, I can delete all non upper case words 4 letters or less. That gets rid of a heck of a lot of stuff at once. 5) When finished with step 4, I have a list of every desired index item. Starting at the top, I go through the book and find all occurrences I wish to index, and mark them. The preceding took me about a day for an 80 page book. It's a horrible job, but if you self publish you've gotta do it. HTH SteveT Steve Litt Books written in LyX: Troubleshooting Techniques of the Successful Technologist Twenty Eight Tales of Troubleshooting Troubleshooting: Just the Facts