Thread View: net.text
1 messages
1 total messages
Started by Douglas M. Bates
Sun, 09 Nov 1986 02:20
Citations with "bib"
Author: Douglas M. Bates
Date: Sun, 09 Nov 1986 02:20
Date: Sun, 09 Nov 1986 02:20
56 lines
2539 bytes
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).
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