Add user guide
[ric-plt/xapp-frame-cpp.git] / doc / src / lib / txt.im
1 .if false
2 ==================================================================================
3         Copyright (c) 2020 Nokia
4         Copyright (c) 2020 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 esc : .** rst needs an escape for some things
61
62 .dv line_len .ll $1
63 .dv space .sp 1
64 .dv mult_space .sp $1
65 .dv half_space .sp 1
66 .dv beg_list .bl $1
67 .dv end_list .el
68 .dv li .li
69 .dv item .li
70
71 .dv beg_dlist .sp 1 .bd $1
72 .dv end_dlist .ed
73
74 .dv center .ce $1 ^:
75 .dv center_start .bc start
76 .dv center_end  .bc end
77
78 .dv figure .fg $1
79
80 .** for now we allow only a single layer of defitems
81 .dv di .di $1 ^:
82 .dv diitem  .di $1 ^:
83 .dv item .li
84
85 .dv ex_start .sp 1 .ll -2 .in +2 .nf
86 .dv ex_end .fo on .in -2 .ll +2 .sp 1
87
88 .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf
89 .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3
90
91 .** fonts and font macros
92 .dv ital $1
93 .dv bold $1
94 .dv cw $1
95 .dv set_font_prop
96
97 .dv table .sp 1 ^[table not supported in plain txt output]  .if false
98 .dv tab_cell
99 .dv tab_row
100 .dv end_table .fi
101
102 .dv super .sm ^[ .sm ^&{ss_num}]
103 .dv ss_num 1
104 .dv note .dv ss_num ^[ ?%.0f ^&ss_num 1 + ] ^: .sm ^^[^&{ss_num}]
105 .** pure ascii out has no concept of a page, so all notes go to the close of the doc
106 .dv atbot atclose
107 .ju on
108