aboutsummaryrefslogtreecommitdiff
path: root/mk/krefer.tmac
blob: 78de8251dd3433a8d80afbfc452149948aec1596 (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
.\"                                          "/.
.\"          refer support for mk            "/.
.\"               (harvard)                  "/.
.\"                                          "/.
.\" Permission to use, copy, modify and/or   "/.
.\" distribute this software for any purpose "/.
.\" with or without fee is hereby granted.   "/.
.\"                                          "/.
.\" Use the following command line:          "/.
.\"    refer -P -S -e -p <bib>               "/.
.\"                                          "/.
.\" If you want to use a manual inline       "/.
.\" citation format, provide the -k flag and "/.
.\" put the correct reference format in the  "/.
.\" %L field of each reference, e.g.:        "/.
.\"    %L     Davidson et al 1990            "/.
.\"                                          "/.
.
.eo
.
. \" translation of "and" in author list
. ds [& and
.
. \" oxford comma in author list (disabled by default)
. ds [,
.
.\" ]< -- begin reference list
.de ]<
..
.
.\" ]> -- end reference list
.de ]>
..
.
.\" ][ -- put full reference
.de ][
. [\$1
..
.
.\" [0 -- other
.de [0
. x
. [a
\*([A
..
.
.\" [1 -- book
.
.\" [2 -- article
.
.\" [3 -- journal article
.
.\" [4 -- tech report
.
.\" [5 -- ???
.
.\" [a -- replace "(,) and" in list of authors
.de [a
. if '\*([,',' .if '\*([&'and' .return
.
. \" replace ", and "
. index _ [A ", and 
. if \n_>-1 \{\
. ds _a \*([A
. ds _b \*([A
. substring _a 0 \n_-3
. substring _b \n_+4
. ds [A "\*(_a\*([, \*([& \*(_b
. return
.\}
.
. \" replace " and "
. index _ [A " and 
. if \n_=-1 .return
. ds _a \*([A
. ds _b \*([A
. substring _a 0 \n_
. substring _b \n_+2
. ds [A "\*(_a \*([& \*(_b
..
.
.ec