Tags for Bibliography References
I love writing my papers in LaTeX. Its declarative style allows me to concentrate on the content, rather than the form. I even format the text according to the content, keeping each phrase or logical unit on a separate line. Many publishers supply style files that format the article according to the journal's specifications. Even better, over the years I've created an extensive collection of bibliographies. I can therefore use BibTeX to cite works with a simple command, without having to re-enter their details. This also allows me to use style files to format references according to the publisher's specification. Yet, there is still the problem of navigating from a citation to the work's details. Here is how I solve it.
Vim, my editor of choice, but also Emacs, support tags, a facility that allows you to jump to a function's definition. This works by storing the file and a regular expression for locating each function in a file named tags. A special keystroke (^] in vi and M-. in Emacs) will use the information on that file to jump to the definition of the element under the cursor. My idea involves creating a tag file for the keys of all entries in each bibliography file. When I then lookup the key of a citation appearing in the text I'm writing my editor will jump to the citation's bibliographic details
To create tags for a set of bibliography files, all you need to do is to run on all your bibliography files the following Unix shell script
#!/bin/sh
awk '/^@/{ printf "%s\t%s\t?^%s?\n",$2,FILENAME,$0}' FS='[,{ (]*' $* |
sort >tags
@awk "/^@/{ printf \"%%s\t%%s\t?^%%s?\n\",$2,FILENAME,$0}" FS="[,{ (]*" %* | sort >tags
btags /home/dds/bib/*.bib *.bib