1.\" Copyright (c) 1983, 1990 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)lookbib.1 6.5 (Berkeley) 07/29/91 7.\" 8.Dd 9.Dt LOOKBIB 1 10.Os BSD 4.2 11.Sh NAME 12.Nm indxbib , lookbib 13.Nd build inverted index for a bibliography, 14find references in a bibliography 15.Sh SYNOPSIS 16.Nm indxbib 17.Ar database ... 18.Nm lookbib 19.Op Fl n 20.Ar database 21.Sh DESCRIPTION 22.Nm Indxbib 23builds an inverted index to the named 24.Ar databases 25(or files), which can then be 26used by 27.Nm lookbib 28and 29.Xr refer 1 . 30The files are assumed to be 31.Xr refer 32style bibliographic databases 33(see 34.Xr addbib 1 ) . 35.Pp 36.Nm Indxbib 37is a shell script which calls 38.Nm mkey 39and 40.Nm inv . 41The first program, 42.Nm mkey , 43truncates words to 6 characters, 44and maps upper case to lower case. 45It also discards words shorter than 3 characters, 46words among the 100 most common English words, 47and numbers (dates) < 1900 or > 2000. 48These parameters can be changed; see page 4 of a 49.Em Refer 50document by Mike Lesk (See the SEE ALSO section below). 51The second program, 52.Nm inv , 53creates an entry file 54.Pq Ar file Ns .ia , 55a posting file 56.Pq Ar file Ns .ib , 57and a tag file 58.Pq Ar file Ns .ic , 59all in the working directory. 60.Pp 61.Nm Lookbib 62uses an inverted index made by 63.Nm indxbib 64to find sets of bibliographic references. 65It reads keywords typed after the ``>'' prompt on the terminal, 66and retrieves records containing all these keywords. 67If nothing matches, nothing is returned except another ``>'' prompt. 68.Pp 69.Nm Lookbib 70will ask if you need instructions, and will print some brief information if 71you reply ``y''. The 72.Fl n 73flag turns off the prompt for instructions. 74.Pp 75It is possible to search multiple databases, 76as long as they have a common index made by 77.Nm indxbib . 78In that case, only the first argument given to 79.Nm indxbib 80is specified to 81.Nm lookbib . 82.Pp 83If 84.Nm lookbib 85does not find the index files (the 86.Ar file Ns .i[abc] 87files), 88it looks for a reference file with the same name as the argument, 89without the suffixes. 90It creates a file with a 91`.ig' suffix, suitable for use with 92.Xr fgrep 1 . 93It then uses this fgrep file to find references. 94This method is simpler to use, but the 95.Ar file Ns ig 96is slower to use 97than the 98.Ar file Ns .i[abc] 99files, and does not allow the use of multiple reference files. 100.Sh FILES 101.Bl -tag -width /usr/libexec/mkey -compact 102.It Pa \&*.ia 103Entry file. 104.It Pa \&*.ib 105Posting file. 106.It Pa \&*.ic 107Tag file. 108.It Pa \&*.ig 109Ascii file created if index files not found. 110.It Pa /usr/libexec/mkey 111Make keys program. 112.It Pa /usr/libexec/inv 113Hash and invert program. 114.El 115.Sh SEE ALSO 116.Xr refer 1 , 117.Xr addbib 1 , 118.Xr sortbib 1 , 119.Xr roffbib 1 , 120.Xr lookbib 1 121.Sh BUGS 122More than one blank line in between citations 123can wreak havoc. 124.Pp 125Probably all dates should be indexed, 126since many disciplines refer to literature 127written in the 1800s or earlier. 128.Sh HISTORY 129A 130.Nm lookbib 131command appeared in 132.At 32v . 133