Table of contents


bibsearch - search BibTeX bibliography files




bibsearch uses the mgquery(1) database search engine to provide superfast searching in a collection of BibTeX bibliography database files. The database is generally updated nightly, and on startup, bibsearch displays the date of the last update, plus some statistics on the size of the collection. It also gives some helpful hints about commonly-used commands.

The bibliography files make up the BibNet and TeX User Group bibliography archive, and cover these subject areas:

The collection includes about 80 journal-specific bibliographies, of which about 20 provide complete coverage of their respective journals.

Each search result normally begins with a separator line of dashes, followed by a World Wide Web Universal Resource Locator (URL) address that uniquely identifies the location of the bibliography file. Local users can see these files directly in the UNIX network file system, without having to launch ftp(1) or a Web browser: just change the prefix ``'' to ``/u/ftp'' to create a local file name. This may be handy if you want to find related bibliography entries serendipitously, without knowing exactly what they contain.

By default, bibsearch uses query-ranked searching: you type several words, and the search engine responds with a sorted list of bibliography entries that contain one or more of those words, in order of decreasing number of matches.

To switch to Boolean searching, which allows combination of words with Boolean AND (&), OR (|), and NOT (!) operators, issue the mgquery command

.set query boolean

Searching is based on words, where a word is a consecutive string of letters, digits, hyphen (minus), underscore, backslash, or apostrophe. This permits searching for ordinary words, as well as for ISSN and ISBN value, for programming language variable names, for TeX control sequences, and for names like ``O'Reilly''. All other characters are treated as word separators, so to search for ``input/output'', you must search for two words, ``input'' and ``output''. Similarly, you could search for an e-mail address ``'' with the string ``rms prep ai mit edu'', assuming the default query-ranked search mode.

Searches always ignore letter case.

Partial word matches are not usually accepted: if you search for ``tex'', neither ``text'' nor ``texture'' will match. However, mg(1) will `stem' search words, removing common English suffixes, so a search for ``mathematical'' will first be reduced to ``mathemat'' and that will match ``mathematical'', ``mathematics'', and ``mathematician''. The current version of mgquery(1) does not at present provide any way to suppress this stemming.

You may find that using

.set mode hilite
makes it easier to spot the matched strings in the output. However, the highlighting requires additional control characters that contaminate any output directed to a file, so in such a case, you should turn it off, by e.g.
.set mode text
.set pager "cat >>/tmp/foo.log"

For further information on searching with mgquery(1), consult its manual pages, or use the


Finally, to exit from bibsearch, use the mgquery(1)


With each BibTeX entry retrieved, bibsearch provides definitions of any BibTeX strings used in the entry. This will likely result in many duplicate string definitions, but they are easily eliminated by a subsequent pass of the bibliography data through bibsort(1). Acknowledgement strings are not included in this output, because they are often large, and because few, if any, BibTeX styles use them. You can find their definitions near the top of the original BibTeX file identified at the start of each search result.


bibcheck(1), bibclean(1), bibdup(1), bibextract(1), bibjoin(1), biblabel(1), biblex(1), biborder(1), bibparse(1), bibsort(1), bibtex(1), bibunlex(1), citesub(1), emacs(1), mg(1), mgquery(1).


Nelson H. F. Beebe, Ph.D.
Center for Scientific Computing
Department of Mathematics
University of Utah
Salt Lake City, UT 84112
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: <>