I'm generating an author index using natbib, makeidx, and \citep and \citet in the document, with \citeindextrue. This works, but the author entries are of the form:

Hegselmann (2001), 142, 190

Hegselmann (2012), 55, 190

What I would like to appear is just:

Hegselmann, 55, 142, 190

The natbib documentation makes an elliptic reference (page 16) to: "The form of the index entries is set by the internal \NAT@idxtxt, which can be redefined by hackers if wanted (in the natbib.cfg file please). By default, it prints the short author list plus date or number in the current parenthesis style and citation mode."

I have tried '\renewcommand\NAT@idxtxt{\NAT@name\NAT@spacechar}' in the natbib.cfg file, but this doesn't seem to work (index entries are unchanged).

What should I be doing?


NAT@idxtxt is redefined each time a cite is generated, so I suggest you change NAT@index to use something like NAT@myidxtxt. In the preamble you can write:


The reason that your redefinition of \NAT@idxtxt does not work is that natbib sets this definition at \begin{document}, so your earlier definition is overwritten. Hence we need an end run for the latest definition, using \AtBeginDocument.








Note that I also removed the \NAT@spacechar from your definition, as this was used in the original definition to separate names and year.

sample output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.