-
3.The search window provides a wide variety of searching modes. The search can cover all fields or be limited to a specific field. The search can be further constrained by reference type and year range by specifying either or both a starting and ending (inclusive) year. A list of matching cite keys is listed in this window, and once again double clicking or up/down arrow keys can be used to browse this list using the browser window.
Features
The following are features I think are particularly cute.
•In the browser window you can right-click in a field and it will bring up a menu of string constants. I normally define strings for journal names. The name of the bibtex string file that is used to build the menu can be set in the .tkbibtexrc. file (eg. set strfile strings.bib). It is searched for along the BIBPATH. An example string constant file is strings.bib
•The browser window has an `Annote' button which expands the annotation window. This scrolling text entry box allows for an arbitrary amount of freeform text to be stored in the bibtex file in the ANNOTE field. This is useful for storing commentary or reviews of papers read. This material does not appear in the bibliography with any of the normal reference styles.
•Multiple selection is enabled in the main and search window citation lists.
•Edit/Copy copies the actual BibTeX source of the selected citations to the clipboard.
•Single-key shortcuts exist for most menu functions, see Help for details.
•Every time tkbibtex writes an output file it copies the existing bib file to a unique name. These build up over time and should be periodically culled.
•The .tkbibtexrc can be used to redefine various constants and change the operation of tkbibtex. For instance override builtins like debug, annote_lines_big etc.
The command line option
The command line options are invaluable for creating statistics about a bibliography file or extracting entries that meet certain match criteria. It is very easy to build up quite complex shell scripts based on this tool. Consider the case where you have a personal publications list called publist.bib.
To check how many books you'd written

For a bio you're writing you need to know how many journal and conference papers you've written

Howabout in a specific year range, say 1980 to 1990

or all publications in the last 5 years

or journal papers jointly authored with Foo before 1997

If the -count switch is left off then tkbibtex outputs the bib entries themselves. This can be useful to create a specialized bibliography or publication list

where bib2tex is an old but great script available from the net.
Using with LyX (Unix/Linux only)

LyX can be configured to allow client programs to `drive' LyX. Basically anything you can do via the keyboard or mouse a client can do via this interface. LyX is configured by adding a line like
\serverpipe "/home/autom/pic/.lyxpipe"
to the ~/.lyx/lyxrc file. This will cause LyX to create two named pipes (FIFOs) called .lyxpipe.in and .lyxpipe.out which are used by the client.
These names should match those used by tkbibtex, set in either the top part of tkbibtex proper, via the .tkbibtexrc file, or the -lyx command line option:
tkbibtex -lyx .lyxpipe
The pipe is not actually opened until a citation is pushed.
Citations are pushed by selecting them in the main window and using the menu Edit/Push or the shortcut key `c'. If LyX is running and everything is working well, then you should see the citations appear at the current insertion point in your LyX document.
Note on format of BibTeX file
The BibTeX file format is described in the book by Lamport (and others). It can be easily parsed with a yacc grammar but things are much harder in Tcl. Basically it cannot be parsed just using regular expressions (I'd like to hear from you if you think otherwise).
So to simplify things I've made some assumptions about the format of the file. Basically each entry starts on a new line, and the last line of each entry is a lone right curly like:
@BOOK{Corke99e,
VOLUME = {250},
EDITOR = {P.I. Corke and J. Trevelyan},
PUBLISHER = {Springer-Verlag},
SERIES = {LNCIS},
TITLE = {Experimental Robotics VI},
YEAR = {1999}
}
and the same goes for entries in a strings file
@string{
procra = "Proc. IEEE Int. Conf. Robotics and Automation"
}
tkbibtex always writes the files in a way it can read back in again. The problem is generally when you cut over to it for the first time. So make sure that you:
•Join long lines so that each KEYWORD = DATA record lives on one line
•Make sure that final curly is on a line by itself.
How to get tkbibtex
Click tkbibtex.zip for source code and the man page.
How to get Tcl/Tk for all platforms
Visit the TCL Developer XChange for all downloads (Unix, Mac, Windows) and technical help.
Credits
The original program has been extended and bug fixed by Guenter Milde (G.Milde@physik.tu-dresden.de), Scott Otterson and Steve Juranich.
