Bib -- a replacement for refer (macros and documentation)

utzoo!decvax!harpo!utah-cs!arizona!whm utzoo!decvax!harpo!utah-cs!arizona!whm
Fri Nov 12 23:34:08 AEST 1982


The following files are a reference guide for writing macros for the
bib program and a collection of macro packages 
and support files that are used at
Arizona.  The macros only handle the bibliographic aspects and are
intended to be used with some other macro package (me, ms, or your
local favorite).
The support files are explained in the reference guide.

The files must be placed in /usr/lib/bmac as that is where bib expects
them.  The file common should also be placed in this directory.

See other posting for bib source, reference guide, and man pages.

===== refdoc             =====
.de Ex
.sp
.QS
.nf
..
.ce 100
\fBReference File Formats\fP
.ce 0
.sp
.PP
A reference file is simply a file containing any number of reference
items.  Reference items are separated by one or more blank lines.
There are no restrictions placed on the order of items in a file,
although generally users will want to impose some order (such as sorting
items alphabetically) to simplify updates.
.PP
A reference item is simply a collection of field tags and values.
A field tag is a percent sign followed by a single letter.
Currently the following field tags are recognized:
.Ex
.ta 0.5i
A	Author's name
B	Title of book containing item
C	City of publication
D	Date
E	Editor(s) of book containing item
F	Caption
G	Government (NTIS) ordering number
I	Issuer (publisher)
J	Journal name
K	Keys for searching
N	Issue number
O	Other information
P	Page(s) of article
R	Technical report number
S	Series title
T	Title
V	Volume number
W	Where the item can be found locally
.QE
.PP
With the exception of the author field, each field can occur only once
in any reference.  The field information is as long as necessary,
and can extend onto new lines.
Lines that do not begin with a percent sign or a period
are treated as continuations of the previous line.
The order of fields is irrelevant, except that authors
are listed in the order of occurrence.
.PP
Generally a reference will fall into one of several basic categories.
An example of each and a brief comment is given below.  With less
standard references (Archival Sources, Correspondence, Government
Documents, Newspapers) generally some experimentation will be necessary.
.SH
Books
.PP
A book is something with a publisher that isn't a journal article or
a technical report.  Generally books also have authors and titles
and dates of publication (although some don't).  For books not published
by a major publishing house it is also helpful to give a city for the
publisher.  Some government documents also qualify as books, so a book
may have a government ordering number.
.PP
It is conventional that the authors names appear in the reference in
the same form as on the title page of the book.  Note also that
string definitions are provided for most of the major publishing houses
(PRHALL for Prentice-Hall, for example).
.Ex
%A R. E. Griswold
%A J. F. Poage
%A I. P. Polonsky
%T The SNOBOL4 Programming Language
%I PRHALL
%D second edition 1971
.QE
.PP
Sometimes a book (particularly old books) will have no listed publisher.
The reference entry must still have an I field.
.Ex
%A R. Colt Hoare
%T A Tour through the Island of Elba
%I (no listed publisher)
%C London
%D 1814
.QE
.PP
If a reference database contains entries from many people (such
as a departmental-wide database) The W field can be used to indicate
where the referenced item can be found; using the initials of the owner,
for example.
Any entry style can take a W field, since this field is not used in
formating the reference.
.PP
The K field is used to define general subject categories for an entry.
This is useful in locating all entries pertaining to a specific subject
area.
.Ex
%A Dennie Van\e Tassel
%T Program Style, Design, Efficiency,
Debugging and Testing
%I PRHALL
%D 1978
%W tab
%K testing debugging
.QE
.SH
Journal article
.PP
The only requirement for a journal article is that it have a
journal name and a volume number.
Usually journal articles will also have authors, titles, page
numbers, and a date of publication.  They may also have numbers, and,
less frequently, a publisher.  (Generally publishers are only listed for
obscure journals).
.PP
Note that string names (such as CACM for \fICommunications of the ACM\fP
are defined for most major journals.
There are also string names for the months of the year, so that months
can be abbreviated to the first three letters.
Note also in this example the use of the K field to define a short
name (hru) which can be used in searching for the reference.
.Ex
%A M. A. Harrison
%A W. L. Ruzzo
%A J. D. Ullman
%T Protection in Operating Systems
%J CACM
%V 19
%N 8
%P 461-471
%D AUG 1976
%K hru
.QE
.SH
Article in conference proceedings
.PP
An article from a conference is printed as though it were a journal
article and the journal name was the name of the conference.
Note that string names (SOSP) are also defined for the major
conferences (Symposium on Operating System Principles).
.Ex
%A M. Bishop
%A L. Snyder
%T The Transfer of Information and Authority
in a Protection System
%J Proceedings of the 7th SOSP
%P 45-54
%D 1979
.QE
.SH
Article in book
.PP
An article in a book has two titles, the title of the article and the title
of the book.  The first goes into the T field and the second into the B
field.  Similarly the author of the article goes into the A field and the
editor of the book goes into the E field.
.Ex
%A John B. Goodenough
%T A Survey of Program Testing Issues
%B Research Directions in Software Technology
%E Peter Wegner
%I MIT Press
%P 316-340
%D 1979
.QE
.PP
Unlike author fields, which can be repeated, if a work as more than
one editor they are all listed in a single E field.
.Ex
%A R. J. Lipton
%A L. Snyder
%T On Synchronization and Security
%E R. A. DeMillo, D. P. Dobkin, A. K. Jones and R. J. Lipton
%B Foundations of Secure Computation
%P 367-388
%I ACPRESS
%D 1978
.QE
.PP
Sometimes the book is part of a multi-volume series, and hence may
contain a volume field and/or a series name.
.Ex
%A C.A.R. Hoare
%T Procedures and parameters: An axiomatic approach
%B Symposium on semantics of algorithmic languages
%E E. Engeler
%P 102-116
%S Lecture Notes in Mathematics
%V 188
%I Springer-Verlag
%C Berlin-Heidelberg-New York
%D 1971
.QE
.PP
In any reference format, the O field can be used to give additional information.
This is frequently used, for example, for secondary references.
.Ex
%A Girard
%A J-C Rault
%T A Programming Technique for Software Reliability
%B Symposium on Software Reliability
%I IEEE
%C Montvale, New Jersey
%D 1977
%O (Cited in Glib [32])
.QE
.SH
Compilations
.PP
A compilation is the work of several authors gathered together by an editor
into a book.  In fact the reference format is the same as for a book, with
the editor(s) taking the place of the author.
Note the word "editors" has been added to the last author field.
.Ex
%A R. A. DeMillo
%A D. P. Dobkin
%A A. K. Jones
%A R. J. Lipton,\e editors
%T Foundations of Secure Computation
%I ACPRESS
%D 1978
.QE
.SH
Technical Reports
.PP
A technical report must have a report number.  They usually have authors,
titles, dates and an issuing institution (the I field is used for this).
They may also have a city and a government issue number.  Again string
values (UATR for \*(oqUniversity of Arizona Technical Report\*(cq) will
frequently simplify typing references.
.Ex
%A T. A. Budd
%T An APL Complier
%R UATR 81-17
%D 1981
.QE
.PP
If the institution name is not part of the technical report number, then
the institution should be given separately.
.Ex
%A Douglas Baldwin
%A Frederick Sayward
%T Heuristics for Determining Equivalence of Program Mutations
%R Technical Report Number 161
%I Yale University
%D 1979
.QE
.SH
PhD Thesis
.PP
A PhD thesis is listed as if it were a book, and the institution granting
the degree the publisher.
.Ex
%A Martin Brooks
%T Automatic Generation of Test Data for
Recursive Programs Having Simple Errors
%I PhD Thesis, Stanford University
%D 1980
.QE
.PP
Some authors prefer to treat Masters and Bachelor theses similarly, although
most references on style instruct say to treat a masters degree as an
article or as a report.
.Ex
%A A. Snyder
%T A Portable Compiler for the Language C
%R Master's Thesis
%I M.I.T.
%D 1974
.QE
.SH
Miscellaneous
.PP
A miscellaneous object is something that does not fit into any other form.
It can have any of the the following fields; an author, a title, a date,
page numbers, and, most generally, other information (the O field).
.PP
Any reference item can contain an F field, and the corresponding text
will override whatever citation would otherwise be constructed.
.Ex
%F BHS--
%A Timothy A. Budd
%A Robert Hess
%A Frederick G. Sayward
%T User's Guide for the EXPER Mutation Analysis system
%O (Yale university, memo)
.QE
===== bform.open         =====
.ds [ [
.ds ] ]
.ds , ,\|
.ds <. \ \&
.ds <, \ \&
.ds >. .
.ds >, ,
.ds c[ ,\0
.ds n[ \0and\0
.ds m[ , and\0
.\"
.de s[   \" start reference
.nh
.IP [\\*([F]\0  \\n(a[
..
.de e[   \" end reference
.[-
..
.de []   \" start to display collected references
.SH
References
.LP
..
.de ][   \" choose format
.ie !"\\*([J""     .nr t[ 1    \" journal
.el .ie !"\\*([B"" .nr t[ 3    \" article in book
.el .ie !"\\*([R"" .nr t[ 4    \" technical report
.el .ie !"\\*([I"" .nr t[ 2    \" book
.el                .nr t[ 0    \" other
.\\n(t[[
..
.de 0[   \" other
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.br
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.br
.if !~\\*([O~~ \\*([O\c
.if !~\\*([D~~ , \\*([D\c
\&.
.e[
..
.de 1[ \" journal article
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.br
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.br
.ds a[ \\fI\\*([J\\fP
.ie !"\\*([V"" \{\
.       as a[ , \\*([V
.       if !~\\*([N~~ .as a[ (\\*([N)
.       if !~\\*([P~~ .as a[ :\\*([P\}
.el .if !~\\*([P~~ .as a[ , pages \\*([P
.if !~\\*([I~~ .as a[ , \\*([I
.if !~\\*([D~~ .as a[ , \\*([D
\\*(a[.
.br
.if !~\\*([O~~ \\*([O
.e[
..
.de 2[ \" book
.s[
.if !~\\*(.A~.~ .as [A .
.ie !"\\*([A"" \\*([A
.el .if !~\\*([E~~ \{\
.       ie \\n([E \\*([E, editors.
.       el \\*([E, editor.\}
.br
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\fI\\*([T\\fP
.br
.rm a[
.if !~\\*([I~~ .ds a[ \\*([I
.if !~\\*([C~~ \{\
.       if !~\\*(a[~~ .as a[ ,\\0
.       as a[ \\*([C\}
.if !~\\*([D~~ \{\
.       if !~\\*(a[~~ .as a[ ,\\0
.       as a[ \\*([D\}
\\*(a[.
.br
.if !~\\*([G~~ Government ordering number \\*([G.
.br
.if !~\\*([O~~ \\*([O.
.e[
..
.de 3[ \" article in book
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.br
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.br
.if !~\\*([P~~ pp. \\*([P\0\c
in \\fI\\*([B\\fP\c
.if !~\\*([V~~ , Vol \\*([V\c
.if !~\\*([E~~ , ed. \\*([E\c
\&.
.br
.if !~\\*([I~~ \\*([I\c
.if !~\\*([C~~ , \\*([C\c
.if !~\\*([D~~ , \\*([D\c
\&.
.if !~\\*([O~~ \\*([O.
.e[
..
.de 4[ \" report
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.br
.if !~\\*(.T~.~ .as [T .
\\*([T
.br
\\*([R\c
.if !~\\*([G~~ \& (\\*([G)\c
.if !~\\*([I~~ , \\*([I\c
.if !~\\*([C~~ , \\*([C\c
.if !~\\*([D~~ , \\*([D\c
\&.
.br
.if !~\\*([O~~ \\*([O.
.e[
..
.de [-   \" clean up after yourself
.rm [A [B [C [D
.rm [E [F [G
.rm [I [J [K
.rm [N [O [P
.rm [R [T
.rm [V [W
.rm .A .T
..

===== bform.std          =====
.ds [ [
.ds ] ]
.ds , ,\|
.ds <. \ \&
.ds <, \ \&
.ds >. .
.ds >, ,
.ds c[ ,\0
.ds n[ \0and\0
.ds m[ , and\0
.\"
.de s[   \" start reference
.nh
.IP [\\*([F]\0  \\n(a[
..
.de e[   \" end reference
.[-
..
.de []   \" start to display collected references
.SH
References
.LP
..
.de ][   \" choose format
.ie !"\\*([J""     .nr t[ 1    \" journal
.el .ie !"\\*([B"" .nr t[ 3    \" article in book
.el .ie !"\\*([R"" .nr t[ 4    \" technical report
.el .ie !"\\*([I"" .nr t[ 2    \" book
.el                .nr t[ 0    \" other
.\\n(t[[
..
.de 0[   \" other
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.if !~\\*([O~~ \\*([O\c
.if !~\\*([D~~ , \\*([D\c
\&.
.e[
..
.de 1[ \" journal article
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.ds a[ \\fI\\*([J\\fP
.ie !"\\*([V"" \{\
.       as a[ , \\*([V
.       if !~\\*([N~~ .as a[ (\\*([N)
.       if !~\\*([P~~ .as a[ :\\*([P\}
.el .if !~\\*([P~~ .as a[ , pages \\*([P
.if !~\\*([I~~ .as a[ , \\*([I
.if !~\\*([D~~ .as a[ , \\*([D
\\*(a[.
.if !~\\*([O~~ \\*([O
.e[
..
.de 2[ \" book
.s[
.if !~\\*(.A~.~ .as [A .
.ie !"\\*([A"" \\*([A
.el .if !~\\*([E~~ \{\
.       ie \\n([E \\*([E, editors.
.       el \\*([E, editor.\}
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\fI\\*([T\\fP
.rm a[
.if !~\\*([I~~ .ds a[ \\*([I
.if !~\\*([C~~ \{\
.       if !~\\*(a[~~ .as a[ ,\\0
.       as a[ \\*([C\}
.if !~\\*([D~~ \{\
.       if !~\\*(a[~~ .as a[ ,\\0
.       as a[ \\*([D\}
\\*(a[.
.if !~\\*([G~~ Government ordering number \\*([G.
.if !~\\*([O~~ \\*([O.
.e[
..
.de 3[ \" article in book
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.if !~\\*(.T~.~ .as [T .
.if !~\\*([T~~ \\*([T
.if !~\\*([P~~ pp. \\*([P\0\c
in \\fI\\*([B\\fP\c
.if !~\\*([V~~ , Vol \\*([V\c
.if !~\\*([E~~ , ed. \\*([E\c
\&.
.if !~\\*([I~~ \\*([I\c
.if !~\\*([C~~ , \\*([C\c
.if !~\\*([D~~ , \\*([D\c
\&.
.if !~\\*([O~~ \\*([O.
.e[
..
.de 4[ \" report
.s[
.if !~\\*(.A~.~ .as [A .
.if !~\\*([A~~ \\*([A
.if !~\\*(.T~.~ .as [T .
\\fI\\*([T\\fP
\\*([R\c
.if !~\\*([G~~ \& (\\*([G)\c
.if !~\\*([I~~ , \\*([I\c
.if !~\\*([C~~ , \\*([C\c
.if !~\\*([D~~ , \\*([D\c
\&.
.if !~\\*([O~~ \\*([O.
.e[
..
.de [-   \" clean up after yourself
.rm [A [B [C [D
.rm [E [F [G
.rm [I [J [K
.rm [N [O [P
.rm [R [T
.rm [V [W
.rm .A .T
..

===== bib.fullnames      =====
# full journal names, and other names
#
# journals
D ACTA Acta Informatica
D BIT B\&IT
D BSTJ Bell System Technical Journal
D CACM Communications of the ACM
D COMP Computer
D COMPJOUR The Computer Journal
D COMPLANG Computer Languages
D COMPSUR ACM Computer Surveys
D I&C Information and Control
D IEEETSE IEEE Transactions on Software Engineering
D IEEETC IEEE Transactions on Computers
D IPL Information Processing Letters
D JACM Journal of the ACM
D JCSS Journal of Computer and System Sciences
D NMATH Numerical Mathematics
D SIAMJC Siam Journal on Computing
D SIAMJNA Siam Journal on Numerical Analysis
D SIGACT S\&IGACT News
D SIGPLAN SI\&GPLAN Notices
D SIGSOFT Software Engineering Notes
D SP&E Software \(em Practice & Experience
D TODS ACM Transactions on Database Systems
D TOMS ACM Transactions on Mathematical Software
D TOPLAS ACM Transactions on Programming Languages and Systems
#
# conferences
#
D POPL ACM Symposium on Principles of Programming Languages
D POPL5 Conference Record of the Fifth POPL
D POPL6 Conference Record of the Sixth POPL
D POPL7 Conference Record of the Seventh POPL
D POPL8 Conference Record of the Eighth POPL
D POPL9 Conference Record of the Ninth POPL
D POPL10 Conference Record of the Tenth POPL
D STOC Annual ACM Symposium on Theory of Computing
D FOCS Annual Symposium on Foundations of Computer Science
D SOSP Symposium on Operating System Principles
D ICSE International Conference on Software Engineering
#
#  publishers
#
D ACPRESS Academic Press
D PRHALL Prentice Hall
D WILEY Wiley
#
# months
#
D JAN January
D FEB February
D MAR March
D APR April
D MAY May
D JUN June
D JUL July
D AUG August
D SEP September
D OCT October
D NOV November
D DEC December
#
#  miscelaneous
#
D UATR University of Arizona Technical Report
D DPCS  Department of Computer Science
D CSDP Computer Science Department
===== bib.open           =====
#
#  open format macros
#  style adapted from "A Handbook for Scholars"
#                     by Mary-Claire van Leunen
#
#  (check for periods following author and titles)
T AT
.so /usr/lib/bmac/bform.open
===== bib.std            =====
#
#  standard format macros
#  style adapted from "A Handbook for Scholars"
#                     by Mary-Claire van Leunen
#
# (detect periods at end of authors, titles)
T AT
.so /usr/lib/bmac/bform.std
===== bmac.hnf           =====
#
#  Hanson Normal Form
#
SAD-2
CA3lD-2
A
I /usr/lib/bmac/bib.fullnames
.ds [ [
.ds ] ]
.ds , ,
.ds <. \ \&
.ds <, \ \&
.ds >. .
.ds >, ,
.ds c[ ,\0
.ds n[ \0and\0
.ds m[ , and\0
.\"
.de s[   \" start reference
.nh
.IP [\\*([F] 2m
.br
..
.de e[   \" end reference
.[-
..
.de []   \" start to display collected references
.SH
References
.LP
..
.de ][   \" choose format
.ie !"\\*([J"" \{\
.    ie !"\\*([V"" .nr t[ 1    \" journal
.    el            .nr t[ 5    \" conference paper
.\}
.el .ie !"\\*([B"" .nr t[ 3    \" article in book
.el .ie !"\\*([R"" .nr t[ 4    \" technical report
.el .ie !"\\*([I"" .nr t[ 2    \" book
.el                .nr t[ 0    \" other
.\\n(t[[
..
.de 0[   \" other
.s[
.if !"\\*([A"" \\*([A.
.if !"\\*([T"" \\*([T.
.if !"\\*([O"" \\*([O\c
.if !"\\*([D"" , \\*([D\c
\&.
.e[
..
.de 1[ \" journal article
.s[
.if !"\\*([A"" \\*([A,
.if !"\\*([T"" \\*([T,
\\fI\\*([J\\fP
\\fI \\*([V\\fP,
.if !"\\*([N"" \\*([N
.if !"\\*([D"" (\\*([D),
.if !"\\*([P"" \\*([P\c
.if !"\\*([I"" , \\*([I\c
\\&.
.if !"\\*([O"" \\*([O.
.e[
..
.de 2[ \" book
.s[
.ie !"\\*([A"" \\*([A,
.el .if !"\\*([E"" \{\
.       ie \\n([E \\*([E, editors,
.       el \\*([E, editor,\}
.if !"\\*([T"" \\fI\\*([T\\fP,
.rm a[
.if !"\\*([I"" .ds a[ \\*([I
.if !"\\*([C"" \{\
.       if !"\\*(a["" .as a[ ,\\0
.       as a[ \\*([C\}
.if !"\\*([D"" \{\
.       if !"\\*(a["" .as a[ ,\\0
.       as a[ \\*([D\}
\\*(a[.
.if !"\\*([G"" Government ordering number \\*([G.
.if !"\\*([O"" \\*([O.
.e[
..
.de 3[ \" article in book
.s[
.if !"\\*([A"" \\*([A.
.if !"\\*([T"" \\*([T.
.if !"\\*([P"" pp. \\*([P\0\c
in \\fI\\*([B\\fP\c
.if !"\\*([V"" , Vol \\*([V\c
.if !"\\*([E"" , ed. \\*([E\c
\&.
.if !"\\*([I"" \\*([I\c
.if !"\\*([C"" , \\*([C\c
.if !"\\*([D"" , \\*([D\c
\&.
.if !"\\*([O"" \\*([O.
.e[
..
.de 4[ \" report
.s[
.if !"\\*([A"" \\*([A,
\\*([T,\\*([R\c
.if !"\\*([G"" \& (\\*([G)\c
.if !"\\*([I"" , \\*([I\c
.if !"\\*([C"" , \\*([C\c
.if !"\\*([D"" , \\*([D\c
\&.
.if !"\\*([O"" \\*([O.
.e[
..
.de [-   \" clean up after yourself
.rm [A [B [C [D
.rm [E [F [G
.rm [I [J [K
.rm [N [O [P
.rm [R [T
.rm [V [W
..


===== bmac.opena         =====
#
#  standard open alphabetic format
#
SAD-2
C2D-2
I /usr/lib/bmac/bib.fullnames
I /usr/lib/bmac/bib.open
# a[ - amount to indent reference
.nr a[ 8
===== bmac.openn         =====
#
#  standard open numeric format
#
SAD-2
C1
I /usr/lib/bmac/bib.fullnames
I /usr/lib/bmac/bib.open
# a[ - amount to indent references
.nr a[ 5
===== bmac.stda          =====
#
#  standard alphabetic format
#
SAD-2
C2D-2
I /usr/lib/bmac/bib.fullnames
I /usr/lib/bmac/bib.std
# a[ - amount to indent reference
.nr a[ 8
===== bmac.stdn          =====
#
#  standard numeric format
#
C1
I /usr/lib/bmac/bib.fullnames
I /usr/lib/bmac/bib.std
# a[ - amount to indent references
.nr a[ 5
===== bmac.stdsn         =====
#
#  standard sorted numeric
#
SAD-2
I /usr/lib/bmac/bmac.stdn
===== bmac.supn          =====
#
#  standard superscripted numeric format
#
C1
I /usr/lib/bmac/bib.fullnames
I /usr/lib/bmac/bib.std
# redefine string for citations
.ds [ \u
.ds ] \d
.ds >.
.ds <. .
.ds >,
.ds <, ,
.nr a[ 5
===== common             =====
and
for
the
an
be
of
in
at
on
by
to
no
as
tr
with
some
about
jan
feb
mar
apr
may
june
jun
july
jul
aug
sep
sept
oct
nov
dec



More information about the Comp.sources.unix mailing list