1.\" Copyright (c) 1983, 1990 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)lookbib.1 6.3 (Berkeley) 07/24/90 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.Cx \&( 55.Ar file 56.Cx .ia), 57.Cx 58a posting file 59.Cx \&( 60.Ar file 61.Cx .ib), 62.Cx 63and a tag file 64.Cx \&( 65.Ar file 66.Cx .ic), 67.Cx 68all in the working directory. 69.Pp 70.Nm Lookbib 71uses an inverted index made by 72.Nm indxbib 73to find sets of bibliographic references. 74It reads keywords typed after the ``>'' prompt on the terminal, 75and retrieves records containing all these keywords. 76If nothing matches, nothing is returned except another ``>'' prompt. 77.Pp 78.Nm Lookbib 79will ask if you need instructions, and will print some brief information if 80you reply ``y''. The 81.Fl n 82flag turns off the prompt for instructions. 83.Pp 84It is possible to search multiple databases, 85as long as they have a common index made by 86.Nm indxbib . 87In that case, only the first argument given to 88.Nm indxbib 89is specified to 90.Nm lookbib . 91.Pp 92If 93.Nm lookbib 94does not find the index files (the 95.Cx \&( 96.Ar file 97.Cx .i[abc] 98.Cx 99files), 100it looks for a reference file with the same name as the argument, 101without the suffixes. 102It creates a file with a 103`.ig' suffix, suitable for use with 104.Xr fgrep 1 . 105It then uses this fgrep file to find references. 106This method is simpler to use, but the 107.Cx Ar file 108.Cx .ig 109.Cx 110is slower to use 111than the 112.Cx Ar file 113.Cx .i[abc] 114.Cx 115files, and does not allow the use of multiple reference files. 116.Sh FILES 117.Dw /usr/libexec/mkey 118.Di L 119.Dp Pa \&*.ia 120entry file 121.Dp Pa \&*.ib 122posting file 123.Dp Pa \&*.ic 124tag file 125.Dp Pa \&*.ig 126ascii file created if index files not found. 127.Dp Pa /usr/libexec/mkey 128make keys program 129.Dp Pa /usr/libexec/inv 130hash and invert program 131.Dp 132.Sh SEE ALSO 133.Xr refer 1 , 134.Xr addbib 1 , 135.Xr sortbib 1 , 136.Xr roffbib 1 , 137.Xr lookbib 1 138.Sh BUGS 139More than one blank line in between citations 140can wreak havoc. 141.Pp 142Probably all dates should be indexed, 143since many disciplines refer to literature 144written in the 1800s or earlier. 145.Sh HISTORY 146A 147.Nm lookbib 148appeared in Version 32 AT&T Unix. 149