Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / mm / refer-mm.tmac
1 .\" refer-mm.tmac
2 .\"
3 .\" Refer support for mm macros.
4 .\"
5 .\" Copyright (C) 2011-2018 Free Software Foundation, Inc.
6 .\"   Written by Werner Lemberg (wl@gnu.org)
7 .\"
8 .\" This file is part of groff.
9 .\"
10 .\" groff is free software; you can redistribute it and/or modify it under
11 .\" the terms of the GNU General Public License as published by the Free
12 .\" Software Foundation, either version 3 of the License, or
13 .\" (at your option) any later version.
14 .\"
15 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 .\" for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public License
21 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 .\"
23 .\" Please send comments to groff@gnu.org.
24 .
25 .
26 .als ref*error @warning
27 .
28 .de ref*text-label-start
29 .  FS "\\$1"
30 ..
31 .de ref*text-label-end
32 .  FE
33 ..
34 .
35 .de ref*biblio-item-start
36 .  ref@start-print "\\$1"
37 ..
38 .de ref*biblio-item-start-nolabel
39 .  ref@start-print \&
40 ..
41 .de ref*biblio-item-end
42 .  ref@stop-print
43 ..
44 .
45 .ds ref*refnum-start \" empty
46 .ds ref*refnum-end   .\"
47 .
48 .ds [. \v'-.4m'\s-3[\"
49 .ds .] ]\s0\v'.4m'\"
50 .
51 .ds ref*spec!0  Q A T S V N P I C D O
52 .ds ref*spec!1  Q A T J S V N P I C D O
53 .ds ref*spec!2  Q A T S V P I C D O
54 .ds ref*spec!3  Q A T B E S V P I C D O
55 .ds ref*spec!4  Q A T R G P I C D O
56 .
57 .ds ref*spec!A     ",  " "
58 .ds ref*spec!B     """ " " "in \fI" ""    "\fP"
59 .ds ref*spec!D     """ " " "("      ")"
60 .ds ref*spec!E     ",  " " "ed.\& "
61 .ds ref*spec!G     """ " " "("      ")"
62 .ds ref*spec!J     ",  " " "\fI"    ""    "\fP"
63 .ds ref*spec!N     """ "(" ""       ")"
64 .ds ref*spec!O     ".  " "
65 .ds ref*spec!P     ",  " " "p.\~"
66 .ds ref*spec!PP    ",  " " "pp.\~"
67 .ds ref*spec!T     ",  " " "\(lq"   ""    "\(rq"
68 .ds ref*spec!T:0   ",  " " "\fI"    ""    "\fP"
69 .ds ref*spec!T:2   ",  " " "\fI"    ""    "\fP"
70 .ds ref*spec!V     """ " " "\fB"    "\fR"
71 .ds ref*spec!dflt  ",  " "
72 .
73 .\" For the bibliography section, we emulate the .RS/.RF mechanism of mm by
74 .\" collecting references (enclosed with .]- and .][) in macro 'ref*mac'.
75 .\" This macro gets expanded while calling the .RP macro.
76 .
77 .de ref*][-first-pass
78 .  ec
79 .  am ref*mac
80 .    ds [F "\\*([F\"
81 .    ][ "\\$1" "\\$2"
82 \\..
83 ..
84 .
85 .de ref*biblio-start-hook
86 .  als ref*][-second-pass ][
87 .  als ][ ref*][-first-pass
88 .  de ref*item-start-hook
89 .    eo
90 .    am ref*mac ][
91 \\..
92 ..
93 .
94 .de ref*biblio-end-hook
95 .  als ][ ref*][-second-pass
96 .  rm ref*item-start-hook
97 .  als ref*print ref*end-print
98 .  RP
99 .  als ref*print ref*normal-print
100 ..
101 .
102 .mso refer.tmac
103 .
104 .\" ====================================================================
105 .\" Editor settings
106 .\" ====================================================================
107 .
108 .\" Local Variables:
109 .\" mode: nroff
110 .\" fill-column: 72
111 .\" End:
112 .\" vim: set filetype=groff textwidth=72: