144956Scael.\" Copyright (c) 1983, 1990 Regents of the University of California. 244956Scael.\" All rights reserved. 319724Smckusick.\" 4*50676Scael.\" %sccs.include.redist.roff% 519724Smckusick.\" 6*50676Scael.\" @(#)lookbib.1 6.5 (Berkeley) 07/29/91 744956Scael.\" 844956Scael.Dd 944956Scael.Dt LOOKBIB 1 1044956Scael.Os BSD 4.2 1144956Scael.Sh NAME 1244956Scael.Nm indxbib , lookbib 1344956Scael.Nd build inverted index for a bibliography, 1444956Scaelfind references in a bibliography 1544956Scael.Sh SYNOPSIS 1644956Scael.Nm indxbib 1744956Scael.Ar database ... 1844956Scael.Nm lookbib 1944956Scael.Op Fl n 2044956Scael.Ar database 2144956Scael.Sh DESCRIPTION 2244956Scael.Nm Indxbib 2344956Scaelbuilds an inverted index to the named 2444956Scael.Ar databases 2544956Scael(or files), which can then be 2644956Scaelused by 2744956Scael.Nm lookbib 2819724Smckusickand 2944956Scael.Xr refer 1 . 3044956ScaelThe files are assumed to be 3144956Scael.Xr refer 3244956Scaelstyle bibliographic databases 3344956Scael(see 3444956Scael.Xr addbib 1 ) . 3544956Scael.Pp 3644956Scael.Nm Indxbib 3744956Scaelis a shell script which calls 3844956Scael.Nm mkey 3944956Scaeland 4044956Scael.Nm inv . 4119724SmckusickThe first program, 4244956Scael.Nm mkey , 4319724Smckusicktruncates words to 6 characters, 4419724Smckusickand maps upper case to lower case. 4519724SmckusickIt also discards words shorter than 3 characters, 4619724Smckusickwords among the 100 most common English words, 4719724Smckusickand numbers (dates) < 1900 or > 2000. 4844956ScaelThese parameters can be changed; see page 4 of a 4944956Scael.Em Refer 5044956Scaeldocument by Mike Lesk (See the SEE ALSO section below). 5119724SmckusickThe second program, 5244956Scael.Nm inv , 5344956Scaelcreates an entry file 54*50676Scael.Pq Ar file Ns .ia , 5544956Scaela posting file 56*50676Scael.Pq Ar file Ns .ib , 5744956Scaeland a tag file 58*50676Scael.Pq Ar file Ns .ic , 5919724Smckusickall in the working directory. 6044956Scael.Pp 6144956Scael.Nm Lookbib 6219724Smckusickuses an inverted index made by 6344956Scael.Nm indxbib 6419724Smckusickto find sets of bibliographic references. 6519724SmckusickIt reads keywords typed after the ``>'' prompt on the terminal, 6619724Smckusickand retrieves records containing all these keywords. 6719724SmckusickIf nothing matches, nothing is returned except another ``>'' prompt. 6844956Scael.Pp 6944956Scael.Nm Lookbib 7019725Smckusickwill ask if you need instructions, and will print some brief information if 7144956Scaelyou reply ``y''. The 7244956Scael.Fl n 7344956Scaelflag turns off the prompt for instructions. 7444956Scael.Pp 7519724SmckusickIt is possible to search multiple databases, 7619724Smckusickas long as they have a common index made by 7744956Scael.Nm indxbib . 7819724SmckusickIn that case, only the first argument given to 7944956Scael.Nm indxbib 8019724Smckusickis specified to 8144956Scael.Nm lookbib . 8244956Scael.Pp 8319724SmckusickIf 8444956Scael.Nm lookbib 85*50676Scaeldoes not find the index files (the 86*50676Scael.Ar file Ns .i[abc] 8744956Scaelfiles), 8819724Smckusickit looks for a reference file with the same name as the argument, 8919724Smckusickwithout the suffixes. 9044956ScaelIt creates a file with a 9144956Scael`.ig' suffix, suitable for use with 9244956Scael.Xr fgrep 1 . 9319724SmckusickIt then uses this fgrep file to find references. 94*50676ScaelThis method is simpler to use, but the 95*50676Scael.Ar file Ns ig 9644956Scaelis slower to use 97*50676Scaelthan the 98*50676Scael.Ar file Ns .i[abc] 9944956Scaelfiles, and does not allow the use of multiple reference files. 10044956Scael.Sh FILES 101*50676Scael.Bl -tag -width /usr/libexec/mkey -compact 102*50676Scael.It Pa \&*.ia 103*50676ScaelEntry file. 104*50676Scael.It Pa \&*.ib 105*50676ScaelPosting file. 106*50676Scael.It Pa \&*.ic 107*50676ScaelTag file. 108*50676Scael.It Pa \&*.ig 109*50676ScaelAscii file created if index files not found. 110*50676Scael.It Pa /usr/libexec/mkey 111*50676ScaelMake keys program. 112*50676Scael.It Pa /usr/libexec/inv 113*50676ScaelHash and invert program. 114*50676Scael.El 11544956Scael.Sh SEE ALSO 11644956Scael.Xr refer 1 , 11744956Scael.Xr addbib 1 , 11844956Scael.Xr sortbib 1 , 11944956Scael.Xr roffbib 1 , 12044956Scael.Xr lookbib 1 12144956Scael.Sh BUGS 12244956ScaelMore than one blank line in between citations 12344956Scaelcan wreak havoc. 12444956Scael.Pp 12519724SmckusickProbably all dates should be indexed, 12619724Smckusicksince many disciplines refer to literature 12719724Smckusickwritten in the 1800s or earlier. 12844956Scael.Sh HISTORY 12944956ScaelA 13044956Scael.Nm lookbib 131*50676Scaelcommand appeared in 132*50676Scael.At 32v . 133