Add support to generate man pages in txt and md
[ric-plt/lib/rmr.git] / doc / src / txt.im
1 .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:       txt.im
22         Abstract:       To generate raw ASCII we just need to 'disable' the macros which
23                                 are defined to support things like troff, markdown and rts.
24                                 For each of those macros, we just map to real {X}fm commandd
25                                 which do the right thing when generating real .txt output.
26
27         Author:         E. Scott Daniels
28         Date:           29 July 2019
29
30 .fi
31
32
33 .cd 1 6.5i i=0
34 .in .25i
35
36 .** paragraph headers
37 .dv h1 .h1 $1
38 .dv h2 .h2 $1
39 .dv h3 .h3 $1
40 .dv h4 .h4 $1
41
42 .dh 1 s=2,1 i=.25i
43 .dh 2 s=1,1 i=.25i
44 .dh 3 s=1,0 i=.25i
45 .hn off
46
47 .dv fig .fi t=figure
48 .dv set_font_cw
49
50 .dv nf  .sp 1 ^:^: .br .ll -2 .in +2
51 .dv fo  .in -2 .ll +2 .sp 1
52
53 .dv indent .ll -.25i .in +.25i
54 .dv uindent .in -.25i .ll +.25i
55
56 .dv lic1 *
57 .dv lic2 +
58 .dv lic3 -
59
60 .dv line_len .ll $1
61 .dv space .sp 1
62 .dv half_space .sp 1
63 .dv beg_list .sp 1 .dv lic $1 ^:
64 .dv end_list .sp 1
65
66 .dv beg_dlist .sp 1 .bd $1
67 .dv end_dlist .ed
68
69 .** for now we allow only a single layer of defitems
70 .dv di .di $1 ^:
71 .dv diitem  .di $1 ^:
72 .dv item .li
73
74 .dv ex_start .sp 1 .ll -2 .in +2 .nf
75 .dv ex_end .fo on .in -2 .ll +2 .sp 1
76
77 .** fonts and font macros
78 .dv ital $1
79 .dv bold $1
80 .dv cw $1
81 .dv set_font_prop
82
83 .dv table .sp 1 ^[table not supported in plain txt output]  .if false
84 .dv tab_cell
85 .dv tab_row
86 .dv end_table .fi
87
88 .ju on
89