Indexing Citations with indxcite

James Ashton

May 23, 1996

Abstract The indxcite package allows author index entries to be generated automatically each time a citation is made. Every author (or editor if there are no authors) of a cited work will appear in an index giving the page numbers where the work is cited.

1 Introduction

Sometimes authors of technical books desire an ‘Author Index’ listing authors whose work is referenced in the text. The index package can be used to allow for separate author and subject indices but the work of adding \index commands can be tedious, especially when many of the index entries correspond with citations to the authors’ works. The indxcite package allows a citation and appropriate index entries to be generated with a single command. The use of this package requires additional runs of L^{A}TEX before the output reaches its final form. Starting from scratch the following execution sequence is generally adequate.

 latex
 bibtex
 latex
 makeindex
 latex

2 BibTEX issues

The \bibliographystyle and \citationstyle commands should be used as

required by the harvard package. Note that a specially modified BibTEX style file is required for use with indxcite and that currently dcu_ic is the only style available. The modifications performed on dcu.bst to produce dcu_ic.bst could be used as a guide to creating other BibTEX style files suitable for use

with indxcite.

With dcu_ic.bst index entries are generated for the authors of papers as they appear in the bibliography, i.e., the bibliography is indexed. This feature could be disabled by creating a new BibTEX style file lacking the output.bibindex function of dcu_ic.bst. A new BibTEX entry field indexkey is defined for indxcite. It is defined to allow the key used to order an author’s name within the index to be different from the author’s name. This may be necessary where special characters are present in a name or to handle unusual sorting conventions, e.g., for names beginning ‘Mc’. If a cited work has multiple authors and the use of indexkey is required, the number and order of names in indexkey must match those in author. An example follows:

         author = "K. J. {\AA}strom and B. Wittenmark",
         indexkey = "K. J. Astrom and B. Wittenmark",

Where a cited work has no author, editors are indexed instead. The indexkey field can be used with the editor field in this case. It may be necessary to recompile BibTEX to increase the maximum function space and the maximum number of global strings. Have a local wizard do

this if required. Setting wiz_fn_space=4000 and max_glob_strs=15 should be

adequate.

3 User interface

\citationindex This command controls which index will be used to index authors of cited works. Its one argument must be the tag of the index used. See the documentation for the index package for more information. In the absence of \citationindex the default index is used.

\citationformat Use \citationformat to control the format of the page numbers appearing in the index. An optional argument makes it possible to control the format of the

text in the index as well. Thus, \citationformat[textbf]{textit} would

generate entries like Ashton, J., 12 .

\indexcite \indexcite acts exactly like the \cite command except that it causes author index entries to be generated instead of a citation. Since \indexcite doesn’t generate a citation it’s mainly useful where there is a need to access the page range feature of index. This is done via an optional argument, e.g., \indexcite[(]{tag} is equivalent to \index{author|(}. Where the page range feature is not needed, the following commands are more convenient:

\icite These commands all generate both a citation and one or more index entries. Ex-

\iciteaffixed
\iciteasnoun
\ipossessivecite
\icitename
\iciteyear

cept for their index generation feature, they mirror the function of the harvard package functions with similar names. Their argument should match the tag of a work described in a bibliographical database (.bib file). An optional argument can be used to provide additional text to be included with the citation although this will not fit in well with the text of a document when used with commands like \iciteasnoun.

4 An example

The following is a small example which illustrates a few of the features of the package. Just run it through L^{A}TEX twice, then use makeindex (with the arguments noted in the comment in the file, and finally run L^{A}TEX again.

⟨∗example⟩

\documentclass{article}
\usepackage{indxcite}
\newindex{aut}{adx}{and}{Author Index} % makeindex -o example.and example.adx
\begin{document}
\bibliographystyle{dcu_ic}
\citationstyle{dcu}
\citationindex{aut}
\citationformat{textit}
This is a small example demonstrating the use of the \texttt{indxcite}
package.
It is possible, with a single command, to both make a citation and
generate index entries for the authors of the cited word,
for example, \iciteasnoun{latexcomp}.
\pagebreak
Unusual effects are possible.  If you want you can have the authors' names to
appear in small caps in the index with a typewriter font used for the
page numbers thusly.
\citationformat[textsc]{texttt}
And make the citation \icite[Chapter 5]{latexcomp}.
You can then reset the format back to a more conventional setting.
\citationformat{textit}
Using a format other than roman can be a good idea so that automatically
generated index entries are distinguishible from manually generated
ones\index[aut]{Goossens, M.}.
Note that if the authors' names are indexed with more than one format
as in this document (i.e., usually in roman but once in small caps) then
multiple index entries will be generated.
\pagebreak
\indexcite[(]{latexcomp}
If a citation is refered to over several paragraphs you may want to
index the whole range of text.
In this case you need to use three commands:  one to generate the
citation\cite{latexcomp}; one to mark the begining of the text to
be indexed and one to mark the end of the text to be indexed.
\pagebreak
Then, if the indexed text runs over multiple pages, this will be

reflected in the index entry\indexcite[)]{latexcomp}.
It is a good idea to reset the citation format before the bibliography
is processed so that index entries for the bibliography can be easily
distinguished for those for the rest of the document.
\citationformat{textbf}
\begin{thebibliography}{xx}
\harvarditem[Goossens et~al.]{Goossens, Mittelbach \harvardand\
  Samarin}{1993}{latexcomp}{\\{Goossens, M.}\\{Mittelbach, F.}\\{Samarin, A.}}
Goossens, M., Mittelbach, F. \harvardand\ Samarin, A.  \harvardyearleft
  1993\harvardyearright .
\newblock {\em The {\LaTeX{}} Companion}, Addison-Wesley, Reading,
  Massachusetts.\indexcite{latexcomp}
\end{thebibliography}
\printindex[aut]
\end{document}

⟨/example⟩