aboutsummaryrefslogtreecommitdiff
path: root/fref.1
blob: ec8f9aed0bae969cc6471eb9aa58af471ec86b7f (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
.Dd July 20, 2021
.Dt FREF 1
.Os
.Sh NAME
.Nm fref
.Nd format references
.
.Sh SYNOPSIS
.Nm
.Op Fl l Ar lang
.
.Sh DESCRIPTION
.Pp
.Nm
is a
.Xr troff 1
preprocessor that formats reference lists.
It does not handle inline citations.
.Pp
Unlike
.Xr refer 1 ,
.Nm
does not re-arrange references.
They are inserted in the places they are specified in the
.Xr troff 1
source code.
.Pp
The
.Fl l
flag controls the language of certain strings, such as
.Dq ed. ,
.Dq pp. ,
and
.Dq and .
The following values are supported:
.Bl -tag -width xx -offset indent
.It Em en
English (default)
.It Em ru
Russian
.It Em sv
Swedish
.El
.
.Sh SYNTAX
.Pp
Lines beginning with
.Ql %
(percent) are treated as reference fields.
The percent sign is followed by a two-letter identifier,
signifying the type of field.
The field identifier is followed by a space or tab
and the contents of the field, spanning the rest of the line.
.Pp
Reference list entries are separated by any number of
non-field lines.
.Pp
The following fields are available:
.Bl -tag -width xxx -offset indent
.It Sy %ad
Access date
.It Sy %bo
Book
.It Sy %ci
City
.It Sy %da
Date (year)
.It Sy %ed
Editor
.It Sy %hr
Hypertext reference
.It Sy %is
Issuer, publisher
.It Sy %jo
Journal
.It Sy %la
Label
.It Sy %lc
Reference-specific language
.It Sy %no
TODO: Issue number
.It Sy %pg
Page number(s)
.It Sy %se
TODO: Series
.It Sy %ti
Title
.It Sy %tr
Translator
.It Sy %vo
Volume
.It Sy %xx
Extra information
.El
.Pp
Note that
.Nm
performs no special formatting of the
.Sy %au
field.
Thus, it should be specified as
.Dq "last name, first name" .
.
.Sh EXAMPLES
.Pp
The following
.Xr troff 1
source code
.Bd -literal -offset indent
\&.SH
References
\&.XP
%au     Baudouin de Courtenay, J.
%da     1972
%ti     The Difference between Phonetics and Psychophonetics
%bo     A Baudouin de Courtenay Anthology
%ed     T. A. Sebeok et al.
%tr     Edward Stankiewicz
%ci     Bloomington
%pu     Indiana University Press
%xx     Extra information
\&.XP
\&.\\" ...
.Ed
.Pp
results in the following output:
.Bd -literal -offset indent
\&.SH
References
\&.XP
Baudouin de Courtenay, J. (1972).
The Difference between Phonetics and Psychophonetics.
\\fIA Baudouin de Courtenay Anthology\\fP (ed. T. A. Sebeok et al.).
Trans. Edward Stankiewicz.
Bloomington: Indiana University Press.
Extra information.
\&.XP
\&.\\" ...
.Ed
.
.Sh SEE ALSO
.Pp
.Xr refer 1
.
.Sh AUTHORS
.Pp
.Nm
is written by John Ankarström
.Aq Mt "john (at) ankarstrom.se" .