|
Edit Links |
Tips /
IndexingCategories: Index << Change Tracking Lyx 1-3-2 | Page list | Nomenclature >>This page is for adding tips about writing an index. feel free to add to it. LinksDiscussions on the users' list:
Index entriesIn Lyx, index entries are added with Insert --> Index Entry. This will create a box Click on that box to fine-tune your entry. In markup, you would have to write \index{foo}
for any entry that you want to appear in your index. Since LyX takes care of the \index command and the braces, you need to specify the 'foo' part only. Here is a handy list of arguments you can put in LyX's index entry box, and of what they produce. Note that the given page numbers are, of course, entirely fictitious.
The Index List is added to your document with Insert --> List/TOC --> Index List. This will create an Index box The index heading can be changed by adding the command \renewcommand{\indexname}{foo} to the preamble of your document, with ' It is also possible to put a preamble right before the index entries. To do so, add \setindexpreamble{foo} to your document preamble. Tips for creating indexesMultiple indexesParticularly in fields such as law, it is common to have more than one index; such as a Table of Cases and Table of Statutes as well as a regular index. This isn't supported natively by LyX, but is supported by the Memoir class and can be made to work with LyX with some fiddling. This simple example is to add one new index called index2:
Nested Index(Tip from Chris Lale.) This seems to be an undocumented feature, but it works for me. Insert the index entries in the normal way
Separate the entry text from the sub-entry text with an exclamation mark ("!"). Insert the index list at the end of the document as usual.
For instance, these index entries
produce this index list
Emails from the thread that started this pageThis page was started from this thread. Below are some of the mails in the thread. Ed Sawicki: I love LyX but I dislike the way an index is created. The indexed words are turned into boxes on the screen that I find annoying. I'd also like a bit more automation to make indexing easier. I'm wondering whether I'm overlooking a capability in LyX and whether someone has already created a solution. If there's no other solution, here's what I plan: 1. When the book is finished, convert it to ASCII and LaTex. 2. From the ASCII file, create a word list that consists of all the words in the book. Pare this list down to only the words that should be indexed using some automation and manual inspection and editing. 3. Add phrases that should be indexed to the list. I'll have to maintain a list of phrases manually as I write the book. 4. Have a script automatically insert indexing markup into the LaTeX file. 5. Fix any problems with manual editing of the LaTeX file. 6. Use the marked up LaTeX file to print the final book. Whenever changes to the book are needed, I modify the LyX version of the book. When finished, I go to step 1. Jean-Pierre: Seems to me that a good index need more than simply indexing words and that index substructuring and typographic control is quite important, and should be made while writing. The contents of the index tags is quite important IMHO Helge Hafting: Be careful with "fully automated indexing". Indexing every page where some word occur usually makes for a poor index. It is easy, because all you need is to pick the words and let the computer do the rest. But the result is rarely good, as a normal text contain many indexable words in places people aren't interested in looking up. I've got the following advice on index creation: 1. Try to not index more than three locations for a word. People simply don't try 20 locations, so it is a waste *even* if all of them are equally relevant. There may be exceptions to this depending on what you're writing - this is the general advice. 2. Avoid foo:56,57,58,59 (or foo:56--59) Simply index the start of the range, people will go there and read through it. 3. Index only the important places a word is used. People looking in the index for "foo" want to find the important pieces about "foo", not everytime the word was used. This advice is more work and stands in the way of automation. Still, it usually results in better books. |