Thread View: net.oa
1 messages
1 total messages
Started by ucbvaxGtut
Thu, 11 Feb 1982 21:54
refer bibliographies
Author: ucbvaxGtut
Date: Thu, 11 Feb 1982 21:54
Date: Thu, 11 Feb 1982 21:54
269 lines
5443 bytes
5443 bytes
To answer Amalia Grunfeld's questions of several days ago:
1) There's no way to prevent the "Too many hits" problem without
rewriting refer, to my knowledge. You could, however, do a
shell escape, run lookbib, and put each reference in its own
bracket pair.
2) If lookbib barfs when you're trying to find too many references
(as when searching for a particular subject), use awk to look
for a specific keyword field. A null RS means to treat blank
lines as record separators.
3) A version of pubindex, now called indxbib, appears below, with
a short version of lookbib.
4) To output formatted references without doing a search, you
could use the roffbib program, which also appears below. It
relies on annobib, which simply changes blank lines to .[ .]
pairs, and converts the %X into an .AP\n (annotation paragraph).
Unfortunately roffbib is written for the C shell. This letter
closes with macros for roffbib. (The " marks in the string
comparisons were changed to ^G so that double quotes could be
part of fields.)
I'm willing to give the C code for addbib, sortbib, and annobib to
anyone who wants it. (See the letter in net.general.)
Bill Tuthill
::::::::::::::
indxbib
::::::::::::::
: indxbib sh script
if test $1
then /usr/lib/refer/mkey $* | /usr/lib/refer/inv X$1
mv X$1.ia $1.ia
mv X$1.ib $1.ib
mv X$1.ic $1.ic
else
echo 'Usage: indxbib database [ ... ]'
echo ' first argument is the basename for indexes'
echo ' indexes will be called database.{ia,ib,ic}'
fi
::::::::::::::
lookbib
::::::::::::::
: lookbib sh script
if test $1
then /usr/lib/refer/hunt $1
else
echo 'Usage: lookbib database'
echo ' database must have indexes built by indxbib'
echo ' lookbib finds citations specified on standard input'
fi
::::::::::::::
roffbib
::::::::::::::
# roffbib csh script
set loc = ~hum/bin/
set flags =
getflags:
if ($#argv > 0) then
switch ($argv[1])
case -o*:
case -n*:
case -s*:
case -r*:
case -T*:
case -e:
case -h:
set flags = ($flags $argv[1])
shift argv
goto getflags
endsw
endif
if ($#argv == 0) then
annobib | refer -a1 -b | nroff $flags $loc{bibmacs} -
exit
endif
annobib $* | refer -a1 -b | nroff $flags $loc{bibmacs} -
::::::::::::::
bibmacs
::::::::::::::
.nr PI 5n
.if n .nr PD 1v
.if t .nr PD 0.3v
. \" source in -me or -mx accent marks
.so /usr/lib/me/chars.me
.so /usr/lib/tmac/tmac.xacc
. \" HD - header macro
.de HD
.if t .tl '--''--'
'sp |0.5i-1
.if \\n%=1 .tl ''\f1BIBLIOGRAPHY\fP''
.if \\n%>1 .tl ''- % -''
'sp |1i
.ps
.ft
.vs
.ns
..
. \" FO - footer macro
.de FO
.ps 10
.ft 1
.vs 12p
'bp
..
.wh 0 HD
.wh -1i FO
.if n .na
. \" RT - reset everything to normal state
.de RT
.in 0
.ce 0
.ul 0
.ft 1
.ta 5n 10n 15n 20n 25n 30n 35n 40n 45n 50n 55n 60n 65n 70n 75n 80n
.fi
..
. \" XP - exdented paragraph
.de XP
.RT
.ne 3.1
.sp \\n(PDu
.in +\\n(PIu
.ti -\\n(PIu
..
. \" AP - annotation paragraph
.de AP
.RT
.ne 2.1
.sp \\n(PDu
.in +\\n(PIu
..
. \" refer macros for citations
.de []
.][ \\$1
..
.de ][
.if \\$1>4 .tm %M (Bell Labs Memorandum) undefined
.[\\$1
..
.if n .ds [o \&"
.if n .ds [c \&"
.if t .ds [o ``
.if t .ds [c ''
. \" [0 - other type of citation
.de [0
.XP
.nr [: 0
.if !\\*([A \{\
.nr [: 1
\\*([A\c
.\}
.if !\\*([T \{\
.if \\n([:>0 ,
.nr [: 1
\f2\\*([T\f1\c
.\}
.if !\\*([S , \f2\\*([S\f1\c
.if !\\*([V , \\*([V\c
.if !\\*([P \{\
.ie \\n([P>0 , pp. \\*([P\c
.el , p. \\*([P\c
.\}
.if !\\*([C , \\*([C\c
.if !\\*([D \& (\\*([D)\c
.if \\n([:>0 \&.
.if !\\*([O \\*([O
..
. \" [1 - journal article
.de [1
.XP
.if !\\*([A \\*([A,
.if !\\*([T \\*([o\\*([T,\\*([c
\f2\\*([J\f1\c
.if !\\*([V , vol. \\*([V\c
.if !\\*([N , no. \\*([N\c
.if !\\*([P \{\
.ie \\n([P>0 , pp. \\*([P\c
.el , p. \\*([P\c
.\}
.if !\\*([I , \\*([I\c
.if !\\*([C , \\*([C\c
.if !\\*([D \& (\\*([D)\c
\&.
.if !\\*([O \\*([O
..
. \" [2 - book
.de [2
.XP
.if !\\*([A \\*([A,
.if !\\*([T \f2\\*([T,\f1
.if !\\*([S \f2\\*([S,\f1
.if !\\*([V \\*([V,
.if !\\*([P \{\
.ie \\n([P>0 pp. \\*([P,
.el p. \\*([P,
.\}
\\*([I\c
.if !\\*([C , \\*([C\c
.if !\\*([D \& (\\*([D)\c
\&.
.if !\\*([O \\*([O
..
. \" [3 - article in book
.de [3
.XP
.if !\\*([A \\*([A,
.if !\\*([T \\*([o\\*([T,\\*([c
in \f2\\*([B\f1\c
.if !\\*([E , ed. \\*([E\c
.if !\\*([S , \f2\\*([S\f1\c
.if !\\*([V , vol. \\*([V\c
.if !\\*([P \{\
.ie \\n([P>0 , pp. \\*([P\c
.el , p. \\*([P\c
.\}
.if !\\*([I , \\*([I\c
.if !\\*([C , \\*([C\c
.if !\\*([D \& (\\*([D)\c
\&.
.if !\\*([O \\*([O
..
. \" [4 - report
.de [4
.XP
.if !\\*([A \\*([A,
.if !\\*([T \\*([o\\*([T,\\*([c
.if !\\*([R \\*([R\c
.if !\\*([G \& (\\*([G)\c
.if !\\*([P \{\
.ie \\n([P>0 , pp. \\*([P\c
.el , p. \\*([P\c
.\}
.if !\\*([I , \\*([I\c
.if !\\*([C , \\*([C\c
.if !\\*([D \& (\\*([D)\c
\&.
.if !\\*([O \\*([O
..
.de ]<
.[<
..
.de [<
.SH
References
.LP
.rm FS FE
..
.de [>
.]>
..
.de ]>
.sp
..
.de ]-
.[-
..
.de [-
.rm [A [T [J [B [E
.rm [S [V [N [P [I
.rm [C [D [O [R [G
..
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads