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