blob: 2f4e6072a75e6c02b2af3c90c59141c3c3d774b7 [file] [log] [blame]
Ashwin Sridharanfd9cc7a2019-04-03 16:47:02 -04001.if false
2==================================================================================
E. Scott Danielsa3a121c2020-05-06 09:07:08 -04003 Copyright (c) 2019-2020 Nokia
4 Copyright (c) 2018-2020 AT&T Intellectual Property.
Ashwin Sridharanfd9cc7a2019-04-03 16:47:02 -04005
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17==================================================================================
18.fi
19
20.if false
21 Mnemonic: troff.im
22 Abstract: This file provides macros allowing {X}fm source to generate
23 troff input from {X}fm source when the doc is passed through
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040024 tfm. This allows the more easily read {X}fm source to be used
25 to generate man pages, and to be able to generate the man pages
26 in various output formats (txt, rst, etc.).
Ashwin Sridharanfd9cc7a2019-04-03 16:47:02 -040027
28 Author: E. Scott Daniels
29 Date: 27 January 2019
30
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040031 Some roff information was gleanded from these pages:
32 http://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm
33 https://www.gnu.org/software/groff/manual/html_node/Basics.html
Ashwin Sridharanfd9cc7a2019-04-03 16:47:02 -040034.fi
35
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040036.** assume that we're generating roff output when tfm is used. These macros
37.** convert {X}fm input into troff.
38
39.dv h1 .sp 1 ^&bold($1) .br ^&space
40.dv h2 .sp 1 ^&bold($1) .br ^&space
41.dv h3 .sp 1 ^&bold($1) .br ^&space
42
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040043.dv fig
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040044.dv set_font_cw .br ^^.ft CW
45
46.dv nf ^^.nf .br .nf
47.dv fo .fo ^^.fi .br
48
49.dv center .br ^^.ce 1 .br $1 .br
50.dv center_start .br ^^.ce 999
51.dv center_end .br ^.ce 0
52
E. Scott Danielsb7a4b522019-11-07 15:35:17 -050053.dv esc : .** rst needs an escape for some things
54
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040055.dv line_len ^^.ll $1
56.dv space .br ^^.sp 1 .br
57.dv half_space .br ^^.sp 1 .br
58.dv mult_space .br ^^.sp $1 .br
59.dv beg_list
60.dv end_list
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040061.dv item ^&space \(bu
62.dv li ^&space \(bu
63.dv li_sp ^&space \(bu
64
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040065.dv beg_dlist .dv udi -$1 ^: ^^.in +$1 .br ^^.sp 1 .br
66.dv end_dlist .br ^^.in &udi .br
67.dv ditem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040068.dv ditem_nosp ^^.ti ^&udi .br \fB$1\fR .br
69
70.** deprecated, but needed til doc cleaned up
71.dv diitem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br
72.dv di ^^.ti ^&udi .br ^&space .br \fB$1\fR .br
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040073
74.dv ex_start ^^.IP .br ^^.nf .br ^^.ft CW .br .nf
75.dv ex_end .fo on .br ^^.ft P .br ^^.fi .br ^&space
76
E. Scott Daniels06e85b72019-08-06 16:29:00 -040077.dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf
78.dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3
79
E. Scott Daniels4240b8b2019-08-01 10:36:14 -040080.** fonts and font macros
81.dv ital \fI$1\fR
82.dv bold \fB$1\fR
83.dv cw \f(CW$1\fP
84.dv set_font_prop .br ^^.ft P
85
86.ju off
87.in 0
88
89.dv indent ^^.ll -0.5i &space ^^.in +0.25i
90.dv uindent ^^.in -0.25i &space ^^.ll +0.5i
91