2 ==================================================================================
3 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
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
10 http://www.apache.org/licenses/LICENSE-2.0
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 ==================================================================================
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.
27 Author: E. Scott Daniels
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
50 .dv nf .sp 1 ^:^: .br .ll -2 .in +2
51 .dv fo .in -2 .ll +2 .sp 1
53 .dv indent .ll -.25i .in +.25i
54 .dv uindent .in -.25i .ll +.25i
60 .dv esc : .** rst needs an escape for some things
71 .dv beg_dlist .sp 1 .bd $1
75 .dv center_start .bc start
76 .dv center_end .bc end
78 .** for now we allow only a single layer of defitems
83 .dv ex_start .sp 1 .ll -2 .in +2 .nf
84 .dv ex_end .fo on .in -2 .ll +2 .sp 1
86 .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf
87 .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3
89 .** fonts and font macros
95 .dv table .sp 1 ^[table not supported in plain txt output] .if false
100 .dv super .sm ^[ .sm ^&{ss_num}]
102 .dv note .dv ss_num ^[ ?%.0f ^&ss_num 1 + ] ^: .sm ^^[^&{ss_num}]
103 .** pure ascii out has no concept of a page, so all notes go to the close of the doc