groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / tmac / an-ext.tmac
1 .\" an-ext.tmac
2 .\"
3 .\" Written by Eric S. Raymond <esr@thyrsus.com>
4 .\"            Werner Lemberg <wl@gnu.org>
5 .\"
6 .\" Version 2007-Feb-02
7 .\"
8 .\" Copyright (C) 2007, 2009 Free Software Foundation, Inc.
9 .\" You may freely use, modify and/or distribute this file.
10 .\"
11 .\"
12 .\" The code below provides extension macros for the `man' macro package.
13 .\" Care has been taken to make the code portable; groff extensions are
14 .\" properly hidden so that all troff implementations can use it without
15 .\" changes.
16 .\"
17 .\" With groff, this file is sourced by the `man' macro package itself.
18 .\" Man page authors who are concerned about portability might add the
19 .\" used macros directly to the prologue of the man page(s).
20 .
21 .
22 .\" Convention: Auxiliary macros and registers start with `m' followed
23 .\"             by an uppercase letter or digit.
24 .
25 .
26 .\" Protect against being sourced twice.
27 .nr mX +1
28 .if \n(mX>1 \
29 .  nx
30 .
31 .\" Check whether we are using grohtml.
32 .nr mH 0
33 .if \n(.g \
34 .  if '\*(.T'html' \
35 .    nr mH 1
36 .
37 .
38 .\" Map mono-width fonts to standard fonts for groff's TTY device.
39 .if n \{\
40 .  do ftr CR R
41 .  do ftr CI I
42 .  do ftr CB B
43 .\}
44 .
45 .\" groff has glyph entities for angle brackets.
46 .ie \n(.g \{\
47 .  ds la \(la\"
48 .  ds ra \(ra\"
49 .\}
50 .el \{\
51 .  ds la <\"
52 .  ds ra >\"
53 .  \" groff's man macros control hyphenation with this register.
54 .  nr HY 1
55 .\}
56 .
57 .nr mS 0
58 .
59 .
60 .\" Declare start of command synopsis.  Sets up hanging indentation.
61 .de SY
62 .  ie !\\n(mS \{\
63 .    nh
64 .    nr mS 1
65 .    nr mA \\n(.j
66 .    ad l
67 .    nr mI \\n(.i
68 .  \}
69 .  el \{\
70 .    br
71 .    ns
72 .  \}
73 .
74 .  HP \w'\fB\\$1\fP\ 'u
75 .  B "\\$1"
76 ..
77 .
78 .
79 .\" End of command synopsis.  Restores adjustment.
80 .de YS
81 .  in \\n(mIu
82 .  ad \\n(mA
83 .  hy \\n(HY
84 .  nr mS 0
85 ..
86 .
87 .
88 .\" Declare optional option.
89 .de OP
90 .  ie \\n(.$-1 \
91 .    RI "[\fB\\$1\fP" "\ \\$2" "]"
92 .  el \
93 .    RB "[" "\\$1" "]"
94 ..
95 .
96 .
97 .\" Start URL.
98 .de UR
99 .  ds m1 \\$1\"
100 .  nh
101 .  if \\n(mH \{\
102 .    \" Start diversion in a new environment.
103 .    do ev URL-div
104 .    do di URL-div
105 .  \}
106 ..
107 .
108 .
109 .\" End URL.
110 .de UE
111 .  ie \\n(mH \{\
112 .    br
113 .    di
114 .    ev
115 .
116 .    \" Has there been one or more input lines for the link text?
117 .    ie \\n(dn \{\
118 .      do HTML-NS "<a href=""\\*(m1"">"
119 .      \" Yes, strip off final newline of diversion and emit it.
120 .      do chop URL-div
121 .      do URL-div
122 \c
123 .      do HTML-NS </a>
124 .    \}
125 .    el \
126 .      do HTML-NS "<a href=""\\*(m1"">\\*(m1</a>"
127 \&\\$*\"
128 .  \}
129 .  el \
130 \\*(la\\*(m1\\*(ra\\$*\"
131 .
132 .  hy \\n(HY
133 ..
134 .
135 .
136 .\" Start email address.
137 .de MT
138 .  ds m1 \\$1\"
139 .  nh
140 .  if \\n(mH \{\
141 .    \" Start diversion in a new environment.
142 .    do ev URL-div
143 .    do di URL-div
144 .  \}
145 ..
146 .
147 .
148 .\" End email address.
149 .de ME
150 .  ie \\n(mH \{\
151 .    br
152 .    di
153 .    ev
154 .
155 .    \" Has there been one or more input lines for the link text?
156 .    ie \\n(dn \{\
157 .      do HTML-NS "<a href=""mailto:\\*(m1"">"
158 .      \" Yes, strip off final newline of diversion and emit it.
159 .      do chop URL-div
160 .      do URL-div
161 \c
162 .      do HTML-NS </a>
163 .    \}
164 .    el \
165 .      do HTML-NS "<a href=""mailto:\\*(m1"">\\*(m1</a>"
166 \&\\$*\"
167 .  \}
168 .  el \
169 \\*(la\\*(m1\\*(ra\\$*\"
170 .
171 .  hy \\n(HY
172 ..
173 .
174 .
175 .\" Continuation line for .TP header.
176 .de TQ
177 .  br
178 .  ns
179 .  TP \\$1\" no doublequotes around argument!
180 ..
181 .
182 .
183 .\" Start example.
184 .de EX
185 .  nr mE \\n(.f
186 .  nf
187 .  nh
188 .  ft CW
189 ..
190 .
191 .
192 .\" End example.
193 .de EE
194 .  ft \\n(mE
195 .  fi
196 .  hy \\n(HY
197 ..
198 .
199 .
200 .\" Start display.
201 .de DS
202 .  \" XXX to be written
203 ..
204 .
205 .
206 .\" End display.
207 .de DE
208 .  \" XXX to be written
209 ..
210 .
211 .\" EOF