summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/sortbib.1
blob: 9a7d8fd88fb200d3d173fecd70437883369f44f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
'\" te
.\" Copyright (c) 1992, Sun Microsystems, Inc.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SORTBIB 1 "Sep 14, 1992"
.SH NAME
sortbib \- sort a bibliographic database
.SH SYNOPSIS
.LP
.nf
\fBsortbib\fR [\fB-s\fR \fIKEYS\fR] \fIdatabase\fR...
.fi

.SH DESCRIPTION
.sp
.LP
\fBsortbib\fR sorts files of records containing \fBrefer\fR key-letters by
user-specified keys. Records may be separated by blank lines, or by
`\fB\&.[\fR' and `\fB\&.]\fR' delimiters, but the two styles may not be mixed
together. This program reads through each \fIdatabase\fR and pulls out key
fields, which are sorted separately. The sorted key fields contain the file
pointer, byte offset, and length of corresponding records. These records are
delivered using disk seeks and reads, so \fBsortbib\fR may not be used in a
pipeline to read standard input.
.sp
.LP
The most common key-letters and their meanings are given below.
.sp
.ne 2
.na
\fB\fB%A\fR\fR
.ad
.RS 8n
Author's name
.RE

.sp
.ne 2
.na
\fB\fB%B\fR\fR
.ad
.RS 8n
Book containing article referenced
.RE

.sp
.ne 2
.na
\fB\fB%C\fR\fR
.ad
.RS 8n
City (place of publication)
.RE

.sp
.ne 2
.na
\fB\fB%D\fR\fR
.ad
.RS 8n
Date of publication
.RE

.sp
.ne 2
.na
\fB\fB%E\fR\fR
.ad
.RS 8n
Editor of book containing article referenced
.RE

.sp
.ne 2
.na
\fB\fB%F\fR\fR
.ad
.RS 8n
Footnote number or label (supplied by \fBrefer\fR)
.RE

.sp
.ne 2
.na
\fB\fB%G\fR\fR
.ad
.RS 8n
Government order number
.RE

.sp
.ne 2
.na
\fB\fB%H\fR\fR
.ad
.RS 8n
Header commentary, printed before reference
.RE

.sp
.ne 2
.na
\fB\fB%I\fR\fR
.ad
.RS 8n
Issuer (publisher)
.RE

.sp
.ne 2
.na
\fB\fB%J\fR\fR
.ad
.RS 8n
Journal containing article
.RE

.sp
.ne 2
.na
\fB\fB%K\fR\fR
.ad
.RS 8n
Keywords to use in locating reference
.RE

.sp
.ne 2
.na
\fB\fB%L\fR\fR
.ad
.RS 8n
Label field used by \fB-k\fR option of \fBrefer\fR
.RE

.sp
.ne 2
.na
\fB\fB%M\fR\fR
.ad
.RS 8n
Bell Labs Memorandum (undefined)
.RE

.sp
.ne 2
.na
\fB\fB%N\fR\fR
.ad
.RS 8n
Number within volume
.RE

.sp
.ne 2
.na
\fB\fB%O\fR\fR
.ad
.RS 8n
Other commentary, printed at end of reference
.RE

.sp
.ne 2
.na
\fB\fB%P\fR\fR
.ad
.RS 8n
Page number(s)
.RE

.sp
.ne 2
.na
\fB\fB%Q\fR\fR
.ad
.RS 8n
Corporate or Foreign Author (unreversed)
.RE

.sp
.ne 2
.na
\fB\fB%R\fR\fR
.ad
.RS 8n
Report, paper, or thesis (unpublished)
.RE

.sp
.ne 2
.na
\fB\fB%S\fR\fR
.ad
.RS 8n
Series title
.RE

.sp
.ne 2
.na
\fB\fB%T\fR\fR
.ad
.RS 8n
Title of article or book
.RE

.sp
.ne 2
.na
\fB\fB%V\fR\fR
.ad
.RS 8n
Volume number
.RE

.sp
.ne 2
.na
\fB\fB%X\fR\fR
.ad
.RS 8n
Abstract \(em used by \fBroffbib\fR, not by \fBrefer\fR
.RE

.sp
.ne 2
.na
\fB\fB%Y,Z\fR\fR
.ad
.RS 8n
Ignored by \fBrefer\fR
.RE

.sp
.LP
By default, \fBsortbib\fR alphabetizes by the first \fB%A\fR and the \fB%D\fR
fields, which contain the senior author and date.
.sp
.LP
\fBsortbib\fR sorts on the last word on the \fB%A\fR line, which is assumed to
be the author's last name. A word in the final position, such as `\fBjr.\fR' or
`\fBed.\fR', will be ignored if the name beforehand ends with a comma. Authors
with two-word last names or unusual constructions can be sorted correctly by
using the \fBnroff\fR convention `\fB\e0\fR\&' in place of a blank. A \fB%Q\fR
field is considered to be the same as \fB%A\fR, except sorting begins with the
first, not the last, word. \fBsortbib\fR sorts on the last word of the \fB%D\fR
line, usually the year. It also ignores leading articles (like `\fBA\fR' or
`\fBThe\fR') when sorting by titles in the \fB%T\fR or \fB%J\fR fields; it will
ignore articles of any modern European language. If a sort-significant field is
absent from a record, \fBsortbib\fR places that record before other records
containing that field.
.sp
.LP
No more than 16 databases may be sorted together at one time. Records longer
than 4096 characters will be truncated.
.SH OPTIONS
.sp
.ne 2
.na
\fB\fB-s\fR\fIKEYS\fR\fR
.ad
.RS 10n
Specify new \fIKEYS\fR. For instance, \fB-sATD\fR will sort by author, title,
and date, while \fB-sA+D\fR will sort by all authors, and date. Sort keys past
the fourth are not meaningful.
.RE

.SH SEE ALSO
.sp
.LP
.BR addbib (1),
.BR indxbib (1),
.BR lookbib (1),
.BR refer (1),
.BR roffbib (1),
.BR attributes (7)
.SH BUGS
.sp
.LP
Records with missing author fields should probably be sorted by title.