I use vim-latex. For the sake of SyncTeX, I usually format my paragraphs into separate lines, using a customized gqip
.
I used to put \index
after the term to be indexed, as suggested here. For example
Bla bla bla bla bla bla bla bla bla bla. A
\emph{quasipseudometaball}\index{quasipseudometaball} is defined as follows
However, this produces a long string without spaces, which is not practical when I format the paragraph in Vim with gqip
, as shown in the example above.
Putting space or line break before \index
is not a good idea, neither, because
Let $B$ be a ball \index{ball}.
will put a space before the period. Anyway, putting \index
within the text makes the defining paragraphs unreadable in the source code. I don't like it.
I now decide to put them before the relative paragraphs, but sometimes the paragraph is long, and the location is not precise anymore.
It may be a silly question, but I would like to know where do you put \index
?
\index
inside a macro. So instead of doingball\index{ball}
I'll do\term{ball}
or something similar and then define\term
(or whatever) to use\index
. (Although that additionally requires escapingmakeindex
special characters etc, unless I use\usepackage[index]{glossaries}
which does it for me.) – Nicola Talbot Mar 12 '14 at 15:03cats\index{cat}.
orcats.\index{cat}
- the second seems to work better. – bombcar Mar 23 '14 at 23:11\index
before the paragraph that contains the keywords? I guess most people just start reading a paragraph from the beginning. – Leonardo Castro Feb 9 '16 at 20:25