blob: 27831dacd8f77bea88f59b8d57087c90da6e745e [file] [log] [blame]
Ashwin Sridharanfd9cc7a2019-04-03 16:47:02 -04001.if false
2==================================================================================
3 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
5
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
24 tfm, and to generate postscirpt output when passed through
25 pfm. About the only real use of this is to be able to maintain
26 manual pages in the more easily read {X}fm source format.
27
28 Author: E. Scott Daniels
29 Date: 27 January 2019
30
31 Some roff information was gleanded from this page:
32 http://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm
33.fi
34
35.if tfm
36 .** 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
43 .dv fig
44 .dv set_font_cw .br ^^.ft CW
45
46 .dv nf ^^.nf .br .nf
47 .dv fo .fo ^^.fi .br
48
49 .dv line_len ^^.ll $1
50 .dv space .br ^^.sp 1 .br
51 .dv half_space .br ^^.sp 1 .br
52 .dv beg_list
53 .dv end_list
54 .dv beg_dlist .dv udi -$1 ^: ^^.in +$1 .br ^^.sp 1 .br
55 .dv end_dlist .br ^^.in &udi .br
56 .dv ditem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br
57 .dv item ^&space \(bu
58 .** .dv di ^&ditem
59 .dv di ^^.ti ^&udi .br ^&space .br \fB$1\fR .br
60
61 .dv ex_start ^^.IP .br ^^.nf .br ^^.ft CW .br .nf
62 .dv ex_end .fo on .br ^^.ft P .br ^^.fi .br ^&space
63
64 .** fonts and font macros
65 .dv ital \fI$1\fR
66 .dv bold \fB$1\fR
67 .dv cw \f(CW$1\fP
68 .dv set_font_prop .br ^^.ft P
69
70 .ju off
71 .in 0
72
73 .dv indent ^^.ll -0.5i &space ^^.in +0.25i
74 .dv uindent ^^.in -0.25i &space ^^.ll +0.5i
75.ei
76 .** for postscript output we just pass through to pfm commands
77 .im generic_ps.im
78.fi