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 is a setup for a very basic generation of markdown from the few
23 macros which are designed for the RMR doc. It is very scaled down from
24 the markdown imbed file supplied with {X}fm.
26 Author: E. Scott Danils
28 -------------------------------------------------------------------------------
32 .dh 1 m=.5i e=no s=21 i=0 p=16 f=Helvetica-bold
33 .dh 2 m=.5i s=21 i=0 p=14 f=Helvetica-bold
34 .dh 3 m=.5i s=10 i=0 p=12 f=Helvetica-bold
40 .dv esc : .** rst needs an escape for some things
42 .** these macros are common for prfm/tfm, markdown will override some
43 .dv indent .ll -.5i .in +.25i
44 .dv uindent .in -.25i .ll +.5i
45 .dv smindent .ll -.2i .in +.1i
46 .dv smuindent .in -.1i .ll +.2i
53 .dv ex_start .sp .5 .ll -.25i .in +.25i .sf Courier .st ^&extextsize .fo off
54 .** ex_end macro calls _must_ be placed in col 0 to cause an exit from no-format mode.
55 .dv ex_end .fo on .sf ^&textfont .st ^&textsize .in -.25i .ll +.25i .sp .1
57 .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf
58 .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3
66 .** superscript number for start_note macro
68 .dv super .sm ^[ .sm ^&{ss_num}]
69 .dv note .dv ss_num ^[ ^&ss_num 1 + ] ^: .sm ^[ .sm ^&{ss_num}]
72 .dv start_note .cn start atclose Times-roman 8p .5i
86 .** -----------------------------------------------
87 .** not used, but might be needed if doc expanded
88 .** .dv ta .br ^.ta .br |
89 .** .dv et .br ^.et .br
91 .** .dv tr | .br ^.tr .br |
93 .** .dv empty_cell
94 .** -----------------------------------------------
96 .dv break .sm ^` ^` .br
99 .dv image .ep ^[ .sm $2] ($3)
101 .** no concept of a definition list in markdown; no start/end and just make the text bold to emulate
106 .dv di ^&break **$1:**
116 .dv line .sp 1 ------
118 .** leading indention is significant to markdown, so turn it off
126 .dv h1 .sp 2 # $1 .br
127 .dv h2 .sp 1 ## $1 .br
128 .dv h3 .sp 1 ### $1 .br
130 .dv ex_start .sp .5 .ll -4 .in .5i .sp 2 .fo off
131 .dv ex_end .fo on .in 0i .ll +4 .sp 2