🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #1222

Citations with "bib"

#1222
From: Douglas M. Bates
Date: Sun, 09 Nov 1986 02:20
56 lines
2539 bytes
> A friend has encountered a problem in using "bib" to prepare
> an article to be submitted to a journal.  The journal requires
> citations in the text to be one of two forms, depending on the context.
> One is a running citation, in which the authors' names
> are included in the text and followed by the date in parentheses, e. g.
> 
> "...results have been confirmed by Smith and Jones (1982)."
> 
> and the other, used where the citation is not part of
> the text, has both authors' names and date included in
> the parentheses, e. g.
> 
> "...results have been confirmed by others (Smith and Jones, 1982)."
> 
> How does one set up the bmac.* and bib.* files
> so that both types of references can be handled automatically by "bib"
> and "troff"?

The reference style you describe is called the Harvard name-date style
and is widely used in statistics journals. We incorporated the style
with "bib" by putting in strings %%%b%%% and %%%e%%% for
`begin-citation' and `end-citation' then filtering the "bib" output
through "sed" before going into "troff". The "sed" script converts the
%%%b%%%'s etc. into strings b1 or b2 depending on the citation type.
Our template for the American Statistical Association style includes
#
#	ASA Style.
#	Should be followed by a sed script to change the %%% strings
#	to calls to the b[12] and e[12] strings.
#
A AR
C 3<%%%b%%%>D<%%%e%%%>
E A
S AD
U
#
I BMACLIB/bibinc.asa
I BMACLIB/bmac.asa
and the bmac.asa file defines strings
.ds b1 , \&
.ds b2 \& (
.ds e1
.ds e2 )
The sed commands which convert the %%%b%%%'s etc. are
/^\.ds \[F.*%%%\([a-z]\)$/s//.ds [M \1/
/%%%e%%%\([a-z]\)/s//\1%%%e%%%/g
/\\\*(\[\[/s/%%%b%%%/\\\*(b1/g
/\\\*(\[\[/s/%%%e%%%/\\\*(e1/g
/\\\*(\[{/s/%%%b%%%/\\\*(b2/g
/\\\*(\[{/s/%%%e%%%/\\\*(e2/g

This has worked quite well for us for a couple of years now. The known
bug in the approach is that putting one citation of each type on
the same line will result in the second one getting the wrong style in
the output. (As best as I can remember, that what happens - I just
know never to do it).
Technical Details
Message-ID: <285@stat.wisc.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!uwvax!uwstat!bates

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!uwvax!uwstat!bates
From: bates@stat.wisc.edu (Douglas M. Bates)
Newsgroups: net.text
Subject: Citations with "bib"
Message-ID: <285@stat.wisc.edu>
Date: Sat, 8-Nov-86 21:20:02 EST
Article-I.D.: stat.285
Posted: Sat Nov  8 21:20:02 1986
Date-Received: Sun, 9-Nov-86 03:28:09 EST
Organization: U of Wisconsin Statistics Dept.
Lines: 56