9a666d735c3a72ad94854e58ec8f730b19903224
[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 m=.25i
43 .dh 2 s=1,1 i=.25i m=.25i
44 .dh 3 s=1,0 i=.25i m=.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 mult_space .sp $1
63 .dv half_space .sp 1
64 .dv beg_list .bl $1
65 .dv end_list .el
66 .dv li .li
67 .dv item .li
68
69 .dv beg_dlist .sp 1 .bd $1
70 .dv end_dlist .ed
71
72 .dv center .ce $1 ^:
73 .dv center_start .bc start
74 .dv center_end  .bc end
75
76 .** for now we allow only a single layer of defitems
77 .dv di .di $1 ^:
78 .dv diitem  .di $1 ^:
79 .dv item .li
80
81 .dv ex_start .sp 1 .ll -2 .in +2 .nf
82 .dv ex_end .fo on .in -2 .ll +2 .sp 1
83
84 .** fonts and font macros
85 .dv ital $1
86 .dv bold $1
87 .dv cw $1
88 .dv set_font_prop
89
90 .dv table .sp 1 ^[table not supported in plain txt output]  .if false
91 .dv tab_cell
92 .dv tab_row
93 .dv end_table .fi
94
95 .ju on
96