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: This file provides macros allowing {X}fm source to generate
23 rts input from {X}fm source when the doc is passed through
24 tfm, and to generate postscirpt output when passed through
25 pfm. Simalar to the roff.im macro set that allows the generation
26 of troff input for man pages.
28 Author: E. Scott Daniels
32 Maybe useful (but doesn't explain why real formatters aren't being used)
33 http://docutils.sourceforge.net/docs/user/rst/quickref.html
38 .** assume that we're generating rts output when tfm is used. These macros
39 .** convert {X}fm input into rts.
40 .** post processing is needed to strip the leading space that tfm insists on adding.
42 .** bloody rst has no consistant marking character, and each header level must be different and as long as the text.
43 .** and of course they don't generate <hx> tags in the resulting HTML, but <section> tags. WTF?
44 .dv h1 .sp 1 $1 .br ============================================================================================ .sp 1
45 .dv h2 .sp 1 $1 .br -------------------------------------------------------------------------------------------- .sp 1
46 .dv h3 .sp 1 $1 .br ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .sp 1
48 .** .dv h1 === $1 .br === .sp 1
49 .** .dv h2 === $1 .br === .sp 1
50 .** .dv h3 === $1 .br === .sp 1
55 .dv nf .sp 1 ^:^: .br .ll -2 .in +2
56 .dv fo .in -2 .ll +2 .sp 1
65 .in 0i .** bloody rst is indention sensitive like markdown; sheesh
71 .dv beg_list .sp 1 .dv lic $1 ^:
75 .dv end_dlist .br .in 0i
77 .** for now we allow only a single layer of defitems
78 .dv di .in 0i .br $1 .br .in +.25i
79 .dv diitem .in 0i .br $1 .br .in +.25i
83 .dv ex_start .sp 1 ^:^: .br .ll -2 .in +2 .nf
84 .dv ex_end .fo on .in -2 .ll +2 .sp 1
90 .** fonts and font macros
96 .dv table .sp 1 ^[table not supported in rst output] .if false
103 .** for postscript output we just need to set macros up to mimic those above; same for
104 .** what ever alternate crap we're generating, so defined once: