% % Here is my contribution Malcolm, for TeXline % if you think it suitable. I've plain \TeX'ed % it upto a point---I didn't fix overfull boxes % (there are only two)---and all the macros % are from \TeX book. Everything below the line % which screams ``HERE'' is needed except for the % endgame lines. % Everything above is Knuth's % chris % PS I'll be away until 18 Sep. % % % HERE % {\let\latex\LaTeX \let\bibtex\BibTeX \def\Makeindex{{\tt make\-index}} \def\pagerefs{{\tt page\-refs}} \def\awk{{\tt awk}} \centerline{\bf Cross Referencing the Bibliography} \smallskip \leftline{\sl Why cross reference?} \noindent When you are looking through an article, do you wish that the bibliography contained cross references to the point in the text where the item was cited? I often do, and in this note I explain why I find this useful and include a small set of \unix\ based tools to accomplish this task quite painlessly using \latex\ and \bibtex\ (Patashnik, 1985). Academic and other sources now publish vast amounts of written material. You can't read it all and you have to make some kind of judgement as to what you read carefully, what you skim quickly and what you ignore. This is especially true in academic circles where we are constantly snowed under with journals, new journals and conferences, as well as books and departmental reports. One of the first things I look at when trying to judge the relevance of an article is its bibliography. I want and expect it to be work I have already seen or know about. There are several occasions though, when something catches your eye about the list of references, and you want to go immediately to some particular point of the article: \item{$\bullet$} Perhaps the article is a survey or tutorial and you want to see how the authors treat your favourite work (or your own!); \item{$\bullet$} Perhaps there is an intriguing article cited: a paper you have come across in a totally different context and is quite unexpected here. Why is it cited? Or more likely, a paper unknown to you. What is it about? \item{$\bullet$} Perhaps you wish to refresh your memory about something -- you have come back to this paper looking for specific comments made by the authors concerning some other work. Where do they talk about it? \noindent A bibliography including this kind of cross reference would be extremely useful to its readers. You can probably think of lots of other examples yourself. Clearly, cross referencing back into the text in a book or a thesis can be a great help, but I would also stress the advantages of doing the same thing in journals accepting long articles and even short reports and conference proceedings. In particular, books which are collections of articles by several authors and have collected bibliographies at the back (or elsewhere!) can benefit greatly from such a scheme. This cross referencing is quite specific to the citation in question. You don't have to go hunting through an index for author's names which may not give you exactly the right places anyway. Instead you get exactly the information you want: where the reference was cited. If you forget the authors' names, bibliographies are often short enough to scan through to get the right item; In any case, what journals and conference proceedings have indexes? Even some (bad) books don't have an index. \smallskip \leftline{\sl Producing the cross references} \noindent No journals or books that I know of have produced such a bibliography. Nevertheless, it's not hard to do so; I have already started and I hope others will follow suit. (I'd like to think that the conference proceedings and technical reports I find myself reading in the future will do so. Maybe even one day the technical journals\dots) I am going to spend the remaining few paragraphs talking about a small program to produce the bibliography in a \latex\ document. The program is very heavily \unix{}\ biased, and was simply thrown together in a few hours, but I hope that the ideas are clear enough. It is not really a very difficult problem. In addition to using \latex, we make use of two other `standard' programs: \bibtex\ and \Makeindex. \bibtex\ will of course come as no surprise. \Makeindex\ is a program written by Pehong Chen at Berkeley, with help from Leslie Lamport, and if you are writing a book with \latex, \Makeindex\ is a program you must consider using. Unfortunately, it is, I believe, only written in C and unavailable outside the \unix{} world. You will need \Makeindex\ to use my particular implementation. If you don't have it I believe it is on the standard \unix{} tape from Washington and several archives, including Aston. If you're not on \unix, I'm afraid you can't use my implementation anyway because it relies on \awk. The suite consists of: \itemitem{1:} a \latex\ style file; \itemitem{2:} a preprocessor made from a couple of \awk\ scripts; \itemitem{3:} \Makeindex; \itemitem{4:} a postprocessor, in C; \itemitem{5:} a shell script, \pagerefs, working on 2--4 above. \noindent\pagerefs\ runs in a manner analogous to \bibtex. \bibtex\ must be run first to produce the {\tt .bbl} file, and then \pagerefs\ to add the page numbers. The style file, {\tt pagebib}, simply redefines |\cite| to write out the page number (but not the |\nocite| command -- it didn't seem appropriate). None of this interferes with the normal citation methods of \latex. The style file also defines a command called |\PageBIB|, which is used to format the references. My current command is \begintt \newcommand{\PageBIB}[1]% {\hspace*{\fill}\hbox{[#1]}} \endtt \noindent You can of course redefine it as you please; I flirted with the idea of putting the page numbers in marginal notes. Step~2 simply puts the citations into a suitable form for \Makeindex, which does all the hard work. Step~4 relies on the fact that the bibliography styles include the bibliographic key from the database, (not the label!) in the {\tt bibitem} entry which is how citations are matched up with labels. I don't know if this is a step \bibtex\ always does but it certainly works for the ones I have used -- |alpha|, |plain|, \hbox{|abbrv|}, |unsrt| and |acm|. Finally, of course, you must run \latex\ again, but this is only a real cost if the last thing you did to your manuscript was to add or delete a reference, in which case you will probably run \bibtex\ again anyway. In the whole scheme of resource usage when writing and producing a book or article, this particular part is really rather small. \smallskip \leftline{\sl The bibliography} \noindent {\frenchspacing\parindent0pt\hangindent20pt\hangafter1 Alfread~V. Aho, Brian~W. Kernighan, and Peter~J. Weinberger, {\awk}: a pattern scanning and processing language, 1978. \hangindent20pt\hangafter1 Leslie Lamport, Makeindex: an index processor, 1988. \hangindent20pt\hangafter1 Oren Patashnik, {\bibtex}ing, 1985. } \rightline{\sl Christopher P. Higgins}